> ## Documentation Index
> Fetch the complete documentation index at: https://docs.httpmon.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI reference

> Complete list of httpmon command-line flags

## Flags

| Flag              | Type     | Default      | Description                                                 |
| ----------------- | -------- | ------------ | ----------------------------------------------------------- |
| `--port`          | int      | `8080`       | Proxy listen port                                           |
| `--data-dir`      | string   | `~/.httpmon` | Data directory for CA certs and scripts                     |
| `--buffer-size`   | int      | `10000`      | Max flows in memory                                         |
| `--block`         | string   |              | Comma-separated host patterns to block                      |
| `--allow`         | string   |              | Comma-separated host patterns to allow                      |
| `--throttle`      | string   |              | Throttle preset: `3g`, `4g`, `wifi`                         |
| `--latency`       | duration | `0`          | Added latency per response                                  |
| `--mcp`           | bool     | `false`      | Start MCP server on `127.0.0.1:9551`                        |
| `--mcp-addr`      | string   |              | MCP server listen address (implies `--mcp`)                 |
| `--mcp-token`     | bool     | `false`      | Print MCP bearer token and exit                             |
| `--proto-path`    | string   |              | Path to `.proto` file or directory (repeatable)             |
| `--proto-include` | string   |              | Additional import search dir, like protoc `-I` (repeatable) |
| `--browse`        | string   |              | Open URL in default browser with system proxy configured    |
| `--install-ca`    | bool     | `false`      | Install CA cert and exit (needs sudo)                       |
| `--version`       | bool     | `false`      | Print version and exit                                      |

## Usage examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
httpmon                          # Start on default port
httpmon --port 9090              # Custom port
httpmon --block "*.ads.com"      # Block ad hosts
httpmon --allow "api.example.*"  # Only intercept matching
httpmon --throttle 3g            # Simulate 3G
httpmon --throttle wifi --latency 200ms  # WiFi + custom latency
httpmon --mcp                    # Enable MCP server
httpmon --mcp-addr 127.0.0.1:9000  # Custom MCP address
httpmon --mcp-token              # Print MCP bearer token
sudo httpmon --install-ca        # Install CA cert
httpmon --proto-path ./protos           # Decode with field names
httpmon --proto-path a.proto --proto-path b.proto  # Multiple files
httpmon --proto-include ./vendor  # Import search dirs
httpmon --browse https://example.com  # Open browser with proxy configured
```

The `--block` and `--allow` flags accept wildcard patterns with `*`. You can combine them to control which hosts the proxy intercepts.

The `--throttle` flag applies bandwidth limits and base latency from the selected preset. Use `--latency` alongside it to override the preset's latency value.

The `--proto-path` flag enables named Protobuf field decoding. Pass a `.proto` file or a directory (recursively scans for `*.proto`). Repeat the flag for multiple paths. Paths are appended to any `proto_paths` in `~/.httpmon/config.json`.

The `--proto-include` flag adds import search directories for proto file resolution, similar to protoc's `-I` flag. Repeat for multiple directories.

The `--browse` flag sets the macOS system HTTP/HTTPS proxy to httpmon, opens the given URL in your default browser, and pre-populates the TUI filter with the URL's hostname. The CA certificate is auto-installed if not already trusted. System proxy settings are restored when httpmon exits.
