CLI Reference
APXY — HTTPS network debugging and API mocking tool, optimized for AI agents.
Command tree
Top-level commands (see linked pages for subcommands):
apxy
├── start, stop, status, env,
│ run, shell, browser → [Proxy](/cli-reference/proxy)
├── logs, recording, mark,
│ wait, audit → [Traffic](/cli-reference/traffic)
├── filter → [Filter](/cli-reference/filter)
├── mock → [Mock](/cli-reference/mock)
├── rewrite → [Rewrite](/cli-reference/rewrite)
├── script → [Script](/cli-reference/script)
├── breakpoint → [Breakpoints](/cli-reference/breakpoint)
├── caching → [Caching](/cli-reference/caching)
├── network → [Network](/cli-reference/network)
├── dns → [DNS](/cli-reference/dns)
├── rules → [Rules](/cli-reference/rules)
├── schema → [Schema](/cli-reference/schema)
├── setup, certs, ssl, init,
│ mcp, upgrade → [Setup](/cli-reference/setup)
├── device → [Device](/cli-reference/device)
├── workspace → [Workspace](/cli-reference/workspace)
├── ui → [UI](/cli-reference/ui)
├── license → [License](/cli-reference/license)
└── config → [Config](/cli-reference/config)Common defaults
| Setting | Default |
|---|---|
| Proxy port | 8080 |
| Control API port | proxy port + 1 (8081) |
| Web UI port | proxy port + 2 (8082, 0 to disable) |
| Config file | ~/.apxy/config.yaml |
| Certificate directory | ~/.apxy/certs |
| Traffic database | ~/.apxy/data/apxy.db |
| Global rules file | ~/.apxy/rules.json |
| Workspace rules file | <worktree>/.apxy/rules.json |
Global options
These flags are available on every command:
| Flag | Type | Default | Description |
|---|---|---|---|
--config | string | ~/.apxy/config.yaml | Config file path |
--error-format | string | text | Error output format: text or json |
--help-format | string | default | Help output format: default or agent. agent prints JSON help and does not run the command. |
--no-project | - | false | Ignore the project .apxy/ folder and use the global ~/.apxy |
--output | string | auto | Output format: agent or human (auto-detected from the terminal) |
--verbose | - | false | Enable verbose output |
Environment variables
| Variable | Description | Default |
|---|---|---|
APXY_OUTPUT | Output format, same as --output | auto |
APXY_NO_PROJECT | Set to 1 to ignore the project .apxy/ folder, same as --no-project | unset |
APXY_WORKSPACE | Workspace for the command, as an ID or any name. apxy run sets it for its child. See Workspaces. | unset |
APXY_DISABLE_UPDATE_CHECK | Set to 1 to turn off the new-version notice | unset |
Picking the right interface
Use the CLI when you want:
- Terminal-first inspection and troubleshooting
- Scriptable commands for repeatable workflows
- Precise rule or environment changes
Use the Web UI when you want:
- Live visual traffic browsing
- Guided setup diagnostics
- Visual editing of mocks, filters, redirects, SSL, and network rules
Keeping the CLI reference up to date
Command sections below the {/* apxy:generated */} marker are produced from the auto-generated
files in apxy-core/docs/cli/.
From the apxy-docs repository root (with apxy-core as a sibling directory):
npm run sync-docsOr point at a checkout elsewhere:
APXY_CORE_PATH=/path/to/apxy-core npm run sync-docsUse --dry-run to list files that would change without writing:
npm run sync-docs -- --dry-runHuman-written intro sections live inside {/* apxy:human */} … {/* /apxy:human */} and are
preserved when you re-run the sync.
Last updated on