Skip to Content
CLI ReferenceOverview

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 → [Proxy](/cli-reference/proxy) ├── logs, recording → [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) ├── schema → [Schema](/cli-reference/schema) ├── setup, certs, ssl, init → [Setup](/cli-reference/setup) ├── mcp → [Tools](/cli-reference/tools) (see also request / protobuf / db on that page) ├── license → [License](/cli-reference/license) └── config → [Config](/cli-reference/config)

Dynamic interceptors are configured from the Web UI and Interceptors; there is no apxy interceptor CLI today.

Common defaults

SettingDefault
Proxy port8080
Control API portproxy port + 1 (8081)
Web UI portproxy port + 2 (8082, 0 to disable)
Config file./configs/default.yaml
Certificate directory~/.apxy/certs

Global options

These flags are available on every command:

FlagTypeDefaultDescription
--configstring./configs/default.yamlConfig file path
--error-formatstringtextError output format: text or json
--help-formatstringdefaultHelp output format: default or agent
--verbose-falseEnable verbose output

Environment variables

VariableDescriptionDefault
APXY_CONTROL_URLURL of the control APIhttp://localhost:8081
APXY_DBPath to the local traffic database./data/apxy.db

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-docs

Or point at a checkout elsewhere:

APXY_CORE_PATH=/path/to/apxy-core npm run sync-docs

Use --dry-run to list files that would change without writing:

npm run sync-docs -- --dry-run

Human-written intro sections live inside {/* apxy:human */}{/* /apxy:human */} and are preserved when you re-run the sync.

Last updated on