Skip to content

carapace-sh/carapace-bin / skills/httpie

Use when working with HTTPie (http/https CLI) — the command-line HTTP client for the API era. Covers request items syntax (headers, params, data fields, file uploads), authentication (basic, digest, bearer, plugins), session management, output formatting and printing, SSL/TLS configuration, download mode, configuration files, environment variables, plugin system, exit codes, scripting, and URL syntax. Triggers on: "httpie", "http command", "https command", "http --json", "http --form", "http --download", "http --session", "http --auth", "http --auth-type", "http --print", "http --verbose", "http --follow", "http --offline", "http --check-status", "http --proxy", "http --ssl", "http --cert", "http --verify", "http --format-options", "http --pretty", "http --style", "http --stream", "http --boundary", "http --multipart", "http --raw", "httpie config", "HTTPIE_CONFIG_DIR", "httpie cli plugins", "request items", "data fields", "URL parameters", "HTTP headers", "raw JSON fields", "file upload fields", "named session", "anonymous session", "read-only session", "Content-Disposition", "httpie-unixsocket", "httpie plugins", "AuthPlugin", "TransportPlugin", "ConverterPlugin", "FormatterPlugin".

FileKindSize
SKILL.mdskill md8.2 KB
references/auth.mdmarkdown3.3 KB
references/cli.mdmarkdown6.6 KB
references/config.mdmarkdown4.0 KB
references/downloads.mdmarkdown3.7 KB
references/output.mdmarkdown6.1 KB
references/plugins.mdmarkdown5.6 KB
references/request-items.mdmarkdown4.9 KB
references/scripting.mdmarkdown3.7 KB
references/sessions.mdmarkdown5.0 KB
references/ssl.mdmarkdown2.8 KB
references/url-syntax.mdmarkdown3.5 KB

references/config.md

View on GitHub
# Configuration

HTTPie's configuration system — config file location, `config.json` format, `default_options`, `plugins_dir`, environment variables, and config directory resolution.

## Config File Location

### Default Paths

| Platform | Default Path |
|----------|-------------|
| Linux/macOS | `$XDG_CONFIG_HOME/httpie/config.json` (defaults to `~/.config/httpie/config.json`) |
| Windows | `%APPDATA%\httpie\config.json` |
| Legacy | `~/.httpie/config.json` (if `~/.httpie` directory exists) |

The config file does not exist by default — you must create it manually.

### Resolution Order (Unix-like)

1. If `$HTTPIE_CONFIG_DIR` is set, use that directory
2. If `~/.httpie` exists (legacy), use `~/.httpie/config.json`
3. Otherwise, use `$XDG_CONFIG_HOME/httpie/config.json` (defaults to `~/.config/httpie/config.json`)

### Finding the Config Directory

```bash
$ http --debug 2>&1 | grep config_dir
config_dir: '/home/user/.config/httpie'
```

## Config File Format

The config file is a JSON object with two keys:

### `default_options`

An array of CLI options applied to every invocation:

```json
{
    "default_options": [
        "--style=fruity"
    ]
}
```

Any HTTPie option can be included. Un-set a default for a single invocation with `--no-OPTION`:

```bash
# If config has "--style=fruity", override for one request:
$ http --no-style example.org
```

### `plugins_dir`

The directory where plugins are installed. HTTPie needs read/write access:

```json
{
    "plugins_dir": "/home/user/.local/share/httpie/plugins"
}
```

By default, plugins are stored under the config directory.

## Environment Variables

| Variable | Purpose | Default |
|----------|---------|---------|
| `HTTPIE_CONFIG_DIR` | Override the config directory location | Platform-specific (see above) |
| `XDG_CONFIG_HOME` | Base directory for XDG config home | `~/.config` |
| `HTTP_PROXY` | Proxy for HTTP requests | No proxy |
| `HTTPS_PROXY` | Proxy for HTTPS requests | No proxy |
| `NO_PROXY` | Comma-separated hosts to exclude from proxying | All requests use proxy |
| `ALL_PROXY` | Fallback proxy for all protocols | No fallback |
| `REQUESTS_CA_BUNDLE` | Path to CA bundle for certificate verification | System default |

### Example: Custom Config Directory

```bash
$ export HTTPIE_CONFIG_DIR=/tmp/httpie
$ http pie.dev/get
```

## Session Storage

Named sessions are stored in the `sessions` subdirectory of the config directory:

- `~/.config/httpie/sessions/<host>/<name>.json`

See [sessions.md](sessions.md) for session details.

## Proxies

### Environment Variable Proxies

```bash
$ export HTTP_PROXY=http://10.10.1.10:3128
$ export HTTPS_PROXY=https://10.10.1.10:1080
$ export NO_PROXY=localhost,127.0.0.1
$ http example.org
```

### `--proxy` Flag

The `--proxy` flag takes precedence over environment variables and can be specified multiple times:

```bash
$ http --proxy=http:http://user:pass@host:3128 \
      --proxy=https:https://user:pass@host:1080 \
      example.org
```

SOCKS proxy support:

```bash
$ http --proxy=http:socks5://user:pass@host:port \
      --proxy=https:socks5://user:pass@host:port \
      example.org
```

## Redirects

| Setting | Behavior |
|---------|---------|
| Default | Redirects are NOT followed (only first response shown) |
| `--follow` (`-F`) | Follow 30x Location redirects |
| `--max-redirects=N` | Limit redirects (default: 30) |
| `--all` | Show intermediary redirect responses |
| `307`/`308` | Method and body are reused |
| Other 3xx | Body-less GET is used for the redirect |

## Carapace Completion

The carapace completer does not complete `--proxy` flag values (free-form input). The `--default-scheme` flag is completed with `http://` and `https://`.

## References

- Source of truth: <https://httpie.io/docs/cli/config>
- Environment variables: <https://httpie.io/docs/cli> (Environment variables section)
- Carapace completer: `completers/common/http_completer/cmd/root.go`

## Related Skills

- [sessions.md](sessions.md) — session storage directory
- [ssl.md](ssl.md) — `REQUESTS_CA_BUNDLE`
- [plugins.md](plugins.md) — `plugins_dir`
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall