afhttp CLI reference

Give your AI agent its own private browser — so it reads the real page, past logins and bot walls, without ever touching yours.

afhttp is compiled from a closed cli-spec-v1 registry: one source for argv parsing, typed invocation values, which parameter combinations are legal, output contracts, and help. An invocation runs only when it matches exactly one registered combination.

Global arguments

AFDATA registers these itself, so the syntax in Commands leaves them out.

ArgumentWhereWhat it does
--helpevery commandEvery legal shape of that command, complete, plus its subcommands. JSON by default; --output plain for a terminal.
--versionafhttp onlyName, version, and build identity as one protocol result.
--docsafhttp onlyThis document, rendered from the registry.
--output <FORMAT>per output contractRender as json (default json).
--output-to <DESTINATION>per output contractRoute results and diagnostics to split, stdout, stderr (default split).
--stdout-file <PATH>, --stderr-file <PATH>per output contractAppend that stream to a file instead.

Success output is protocol events, on those terms, unless a command’s own Output line says otherwise.

A shape is one legal set of arguments that may appear together, under a stable id. Where a command has more than one, each id is a heading below. --help returns them all at once, so discovering a command costs one call; there is no recursive mode across commands, and this document is that view.

Commands

afhttp capabilities

Query a host’s /capabilities endpoint.

afhttp capabilities [--endpoint-url <URL>] [--token-secret <SOURCE>]
ArgumentMeaning
--endpoint-urlCDP endpoint of a running host; falls back to AFHTTP_ENDPOINT_URL, then to the local afhttp-host container
--token-secretToken for a protected host; falls back to AFHTTP_TOKEN_SECRET, then to the discovered host’s own token (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, container:NAME, literal:VALUE)

afhttp cdp

Send one raw CDP method to a tab and return its result.

afhttp cdp <METHOD> [--endpoint-url <URL>] [--token-secret <SOURCE>] --tab <TARGET_ID> [--params <JSON|@->] [--wait-event <EVENT:TIMEOUT>]
ArgumentMeaning
METHODCDP method name
--endpoint-urlCDP endpoint of a running host; falls back to AFHTTP_ENDPOINT_URL, then to the local afhttp-host container
--token-secretToken for a protected host; falls back to AFHTTP_TOKEN_SECRET, then to the discovered host’s own token (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, container:NAME, literal:VALUE)
--tabCDP target id to drive
--paramsMethod parameters as a JSON literal, or @- to read them from stdin
--wait-eventWait for a CDP event before exiting, for example Page.loadEventFired:5s

afhttp container install

Build the host image if missing, run the container, and print the client command.

container-install — Build from the release pinned to this binary’s version

afhttp container install [--runtime <docker|podman|apple>] [--name <NAME>] [--port <PORT>] [--profile <NAME>] [--shm-size <SIZE>] [--takeover-provider <off|kasmvnc>] [--with <lightpanda|fingerprint-chromium|camoufox|chrome|brave|kasmvnc>...] [--rebuild] [--reveal-token-secret] [<HOST_ARG>...]

container-install-from-source — Compile from a source checkout, which always rebuilds

afhttp container install [--runtime <docker|podman|apple>] [--name <NAME>] [--port <PORT>] [--profile <NAME>] [--shm-size <SIZE>] [--takeover-provider <off|kasmvnc>] [--with <lightpanda|fingerprint-chromium|camoufox|chrome|brave|kasmvnc>...] --from-source [--context <DIR>] [--reveal-token-secret] [<HOST_ARG>...]

Arguments across every shape above:

ArgumentMeaning
--runtimeContainer runtime; auto-detected when omitted, then AFHTTP_CONTAINER_RUNTIME
--nameContainer name
--portHost CDP port, published on 127.0.0.1
--profileInitial profile inside the container; defaults to - for ephemeral
--shm-sizeChromium /dev/shm size; defaults to 1g, or 2g when takeover is on
--takeover-providerTakeover provider for the built host; off builds a lean headless host
--withExtra image component to build
--rebuildRebuild the image even if it already exists
--from-sourceCompile the image from a source checkout instead of a prebuilt release
--contextSource checkout for –from-source; defaults to the current directory, then this binary’s own checkout
--reveal-token-secretInclude the long-lived host token in the result instead of redacting it
HOST_ARGArguments forwarded to afhttp host inside the container, after –

afhttp container logs

Capture the container logs, or stream them raw.

container-logs — Capture the logs to a file and return a JSON summary of the tail

afhttp container logs [--runtime <docker|podman|apple>] [--name <NAME>]

container-logs-raw — Forward the runtime’s own log bytes; the only shape that can follow

afhttp container logs [--runtime <docker|podman|apple>] [--name <NAME>] [--follow] --raw

Output differs by combination:

Arguments across every shape above:

ArgumentMeaning
--runtimeContainer runtime; auto-detected when omitted, then AFHTTP_CONTAINER_RUNTIME
--nameContainer name
--followKeep following the log output
--rawStream raw runtime logs instead of returning a JSON summary

afhttp container status

Report whether the host is running, with its endpoint and client command.

afhttp container status [--runtime <docker|podman|apple>] [--name <NAME>] [--port <PORT>] [--reveal-token-secret]
ArgumentMeaning
--runtimeContainer runtime; auto-detected when omitted, then AFHTTP_CONTAINER_RUNTIME
--nameContainer name
--portPublished host port, used to format the endpoint and client command
--reveal-token-secretInclude the long-lived host token in the result instead of redacting it

afhttp container uninstall

Stop and remove the container.

afhttp container uninstall [--runtime <docker|podman|apple>] [--name <NAME>] [--purge]
ArgumentMeaning
--runtimeContainer runtime; auto-detected when omitted, then AFHTTP_CONTAINER_RUNTIME
--nameContainer name
--purgeAlso remove the built image and the cached context

afhttp fetch

Fetch a URL over HTTP or a real browser and write the requested artifacts.

fetch — Fetch with no request body

afhttp fetch <URL> [--endpoint-url <URL>] [--token-secret <SOURCE>] [--browser <auto|chromium|chrome|fingerprint-chromium|edge|brave|lightpanda|camoufox>] [--browser-bin <PATH>] [--render <none|auto|always>] [--tab <new|<id>>] [--profile <NAME>] [--wait <SPEC>] [--header <NAME:VALUE>...] [--cookie <NAME=VALUE>...] [--user-agent <UA>] [--evaluate-after-wait <JS>...] [--want <body|rendered_html|text|content|content_json|screenshot|network|console|observation|storage>...] [--method <METHOD>] [--network-bodies <off|xhr|all>] [--network-body-max-bytes <BYTES>] [--readiness-idle-ms <MS>] [--readiness-stable-ms <MS>] [--readiness-min-text-bytes <BYTES>] [--no-network-redact] [--out <DIR>] [--cookie-jar <PATH>] [--no-cookie-jar] [--observe-main-wait-ms <MS>] [--max-response-bytes <BYTES>] [--retry <N>] [--backoff-ms <MS>] [--proxy-url <URL>] [--ca-cert <PATH>] [--tls-insecure] [--timeout-ms <MS>] [--capture-ws] [--capture-sse]

fetch-data — Fetch with a raw request body from –data

afhttp fetch <URL> [--endpoint-url <URL>] [--token-secret <SOURCE>] [--browser <auto|chromium|chrome|fingerprint-chromium|edge|brave|lightpanda|camoufox>] [--browser-bin <PATH>] [--render <none|auto|always>] [--tab <new|<id>>] [--profile <NAME>] [--wait <SPEC>] [--header <NAME:VALUE>...] [--cookie <NAME=VALUE>...] [--user-agent <UA>] [--evaluate-after-wait <JS>...] [--want <body|rendered_html|text|content|content_json|screenshot|network|console|observation|storage>...] [--method <METHOD>] --data <STRING|@FILE> [--network-bodies <off|xhr|all>] [--network-body-max-bytes <BYTES>] [--readiness-idle-ms <MS>] [--readiness-stable-ms <MS>] [--readiness-min-text-bytes <BYTES>] [--no-network-redact] [--out <DIR>] [--cookie-jar <PATH>] [--no-cookie-jar] [--observe-main-wait-ms <MS>] [--max-response-bytes <BYTES>] [--retry <N>] [--backoff-ms <MS>] [--proxy-url <URL>] [--ca-cert <PATH>] [--tls-insecure] [--timeout-ms <MS>] [--capture-ws] [--capture-sse]

fetch-form — Fetch with URL-encoded fields from –form

afhttp fetch <URL> [--endpoint-url <URL>] [--token-secret <SOURCE>] [--browser <auto|chromium|chrome|fingerprint-chromium|edge|brave|lightpanda|camoufox>] [--browser-bin <PATH>] [--render <none|auto|always>] [--tab <new|<id>>] [--profile <NAME>] [--wait <SPEC>] [--header <NAME:VALUE>...] [--cookie <NAME=VALUE>...] [--user-agent <UA>] [--evaluate-after-wait <JS>...] [--want <body|rendered_html|text|content|content_json|screenshot|network|console|observation|storage>...] [--method <METHOD>] --form <NAME=VALUE>... [--network-bodies <off|xhr|all>] [--network-body-max-bytes <BYTES>] [--readiness-idle-ms <MS>] [--readiness-stable-ms <MS>] [--readiness-min-text-bytes <BYTES>] [--no-network-redact] [--out <DIR>] [--cookie-jar <PATH>] [--no-cookie-jar] [--observe-main-wait-ms <MS>] [--max-response-bytes <BYTES>] [--retry <N>] [--backoff-ms <MS>] [--proxy-url <URL>] [--ca-cert <PATH>] [--tls-insecure] [--timeout-ms <MS>] [--capture-ws] [--capture-sse]

fetch-takeover — Hand a wall to a human, with no request body

afhttp fetch <URL> [--endpoint-url <URL>] [--token-secret <SOURCE>] [--browser <auto|chromium|chrome|fingerprint-chromium|edge|brave|lightpanda|camoufox>] [--browser-bin <PATH>] [--render <auto|always>] [--tab <new|<id>>] --takeover [--profile <NAME>] [--wait <SPEC>] [--header <NAME:VALUE>...] [--cookie <NAME=VALUE>...] [--user-agent <UA>] [--evaluate-after-wait <JS>...] [--want <body|rendered_html|text|content|content_json|screenshot|network|console|observation|storage>...] [--method <METHOD>] [--network-bodies <off|xhr|all>] [--network-body-max-bytes <BYTES>] [--readiness-idle-ms <MS>] [--readiness-stable-ms <MS>] [--readiness-min-text-bytes <BYTES>] [--no-network-redact] [--out <DIR>] [--cookie-jar <PATH>] [--no-cookie-jar] [--observe-main-wait-ms <MS>] [--max-response-bytes <BYTES>] [--retry <N>] [--backoff-ms <MS>] [--proxy-url <URL>] [--ca-cert <PATH>] [--tls-insecure] [--timeout-ms <MS>] [--capture-ws] [--capture-sse]

fetch-takeover-data — Hand a wall to a human, with a raw request body from –data

afhttp fetch <URL> [--endpoint-url <URL>] [--token-secret <SOURCE>] [--browser <auto|chromium|chrome|fingerprint-chromium|edge|brave|lightpanda|camoufox>] [--browser-bin <PATH>] [--render <auto|always>] [--tab <new|<id>>] --takeover [--profile <NAME>] [--wait <SPEC>] [--header <NAME:VALUE>...] [--cookie <NAME=VALUE>...] [--user-agent <UA>] [--evaluate-after-wait <JS>...] [--want <body|rendered_html|text|content|content_json|screenshot|network|console|observation|storage>...] [--method <METHOD>] --data <STRING|@FILE> [--network-bodies <off|xhr|all>] [--network-body-max-bytes <BYTES>] [--readiness-idle-ms <MS>] [--readiness-stable-ms <MS>] [--readiness-min-text-bytes <BYTES>] [--no-network-redact] [--out <DIR>] [--cookie-jar <PATH>] [--no-cookie-jar] [--observe-main-wait-ms <MS>] [--max-response-bytes <BYTES>] [--retry <N>] [--backoff-ms <MS>] [--proxy-url <URL>] [--ca-cert <PATH>] [--tls-insecure] [--timeout-ms <MS>] [--capture-ws] [--capture-sse]

fetch-takeover-form — Hand a wall to a human, with URL-encoded fields from –form

afhttp fetch <URL> [--endpoint-url <URL>] [--token-secret <SOURCE>] [--browser <auto|chromium|chrome|fingerprint-chromium|edge|brave|lightpanda|camoufox>] [--browser-bin <PATH>] [--render <auto|always>] [--tab <new|<id>>] --takeover [--profile <NAME>] [--wait <SPEC>] [--header <NAME:VALUE>...] [--cookie <NAME=VALUE>...] [--user-agent <UA>] [--evaluate-after-wait <JS>...] [--want <body|rendered_html|text|content|content_json|screenshot|network|console|observation|storage>...] [--method <METHOD>] --form <NAME=VALUE>... [--network-bodies <off|xhr|all>] [--network-body-max-bytes <BYTES>] [--readiness-idle-ms <MS>] [--readiness-stable-ms <MS>] [--readiness-min-text-bytes <BYTES>] [--no-network-redact] [--out <DIR>] [--cookie-jar <PATH>] [--no-cookie-jar] [--observe-main-wait-ms <MS>] [--max-response-bytes <BYTES>] [--retry <N>] [--backoff-ms <MS>] [--proxy-url <URL>] [--ca-cert <PATH>] [--tls-insecure] [--timeout-ms <MS>] [--capture-ws] [--capture-sse]

Arguments across every shape above:

ArgumentMeaning
URLURL to fetch
--endpoint-urlCDP endpoint of a running host; falls back to AFHTTP_ENDPOINT_URL, then to the local afhttp-host container
--token-secretToken for a protected host; falls back to AFHTTP_TOKEN_SECRET, then to the discovered host’s own token (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, container:NAME, literal:VALUE)
--browserBrowser backend for the inline host; ignored when –endpoint-url is set
--browser-binBrowser binary for the inline host when auto-discovery cannot find one
--renderRender strategy: none is the HTTP fast path, auto escalates on failure, always uses the browser
--tabnew allocates a temporary target; a CDP target id reuses and keeps it
--takeoverEscalate captcha, login, or 2FA walls to human takeover
--profileHost profile to switch to for this fetch; defaults to the URL’s registrable domain under –takeover
--waitReadiness signal: auto
--headerRequest header, as Name:value
--cookieRequest cookie, in Set-Cookie syntax
--user-agentOverride the User-Agent header for this fetch
--evaluate-after-waitJavaScript evaluated in page context after readiness
--wantArtifact to capture; defaults to body on the HTTP path and the browser set when rendering. storage is sensitive and opt-in
--methodHTTP method
--dataRequest body; @ reads the rest as a file path
--formURL-encoded form field; sends application/x-www-form-urlencoded
--network-bodiesCapture network response bodies; xhr captures XHR/fetch only
--network-body-max-bytesPer-body byte cap for captured network sub-requests
--readiness-idle-msNetwork quiet window used by –wait auto
--readiness-stable-msDOM/text unchanged window used by –wait auto
--readiness-min-text-bytesLow visible-text threshold that only warns about –wait auto quality
--no-network-redactWrite raw Authorization/Cookie headers and token query parameters to network.json
--outDirectory for artifacts; defaults to afhttp-out under the temp directory
--cookie-jarOverride the profile cookie-jar path; must match the host profile. Honors AFHTTP_COOKIE_JAR
--no-cookie-jarReplay no cookies and merge no Set-Cookie back; wins over –cookie-jar
--observe-main-wait-msMaximum wait for the browser’s main-document event
--max-response-bytesMaximum main HTTP-path response body size; 0 disables the cap
--retryRetry attempts after the first, for retryable errors only
--backoff-msFixed delay between retries
--proxy-urlUpstream proxy for the HTTP fast path; ambient HTTP_PROXY is never honored
--ca-certPEM file with extra root CAs for the HTTP path
--tls-insecureDisable TLS certificate verification on the HTTP path
--timeout-msOverall fetch timeout for both the HTTP and browser paths
--capture-wsCapture WebSocket frame payloads; treat the artifact as sensitive
--capture-sseCapture SSE event payloads; treat the artifact as sensitive

afhttp health

Query a host’s /health endpoint.

afhttp health [--endpoint-url <URL>] [--token-secret <SOURCE>]
ArgumentMeaning
--endpoint-urlCDP endpoint of a running host; falls back to AFHTTP_ENDPOINT_URL, then to the local afhttp-host container
--token-secretToken for a protected host; falls back to AFHTTP_TOKEN_SECRET, then to the discovered host’s own token (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, container:NAME, literal:VALUE)

afhttp host

Run the browser host: launch a backend browser and serve /cdp for clients.

host — Serve no takeover surface; –display picks headless or headful

afhttp host --listen <tcp:HOST:PORT|unix:PATH> [--profile <NAME>] [--display <headless|headful>] [--takeover-provider off] [--browser <auto|chromium|chrome|fingerprint-chromium|edge|brave|lightpanda|camoufox>] [--browser-bin <PATH>] [--token-secret <SOURCE>] [--no-health] [--health-public <off|minimal>] [--engine-env <NAME=VALUE>...] [--browser-arg <FLAG>...] [--proxy-url <URL>] [--recent-requests-cap <N>]

host-takeover — Serve a KasmVNC real-display takeover, which is always headful

afhttp host --listen <tcp:HOST:PORT|unix:PATH> [--profile <NAME>] --takeover-provider kasmvnc [--takeover-quality-percent <PERCENT>] [--browser <auto|chromium|chrome|fingerprint-chromium|edge|brave|lightpanda|camoufox>] [--browser-bin <PATH>] [--token-secret <SOURCE>] [--no-health] [--health-public <off|minimal>] [--engine-env <NAME=VALUE>...] [--browser-arg <FLAG>...] [--proxy-url <URL>] [--recent-requests-cap <N>]

Output: protocol events; --output json (default json), --output-to split/stdout/stderr (default stdout); redirect with --stdout-file or --stderr-file.

Arguments across every shape above:

ArgumentMeaning
--listenListener address; a non-loopback TCP address also requires –token-secret
--profileInitial profile name, or - for an ephemeral profile
--displayBrowser display mode
--takeover-providerReal-display takeover provider served at /takeover/panel
--takeover-quality-percentTakeover image quality from 0 to 100; lower trades clarity for bandwidth
--browserBrowser backend
--browser-binOverride the browser binary path
--token-secretToken this host requires from callers (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, container:NAME, literal:VALUE)
--no-healthStop serving /health and /capabilities, which are on by default
--health-publicServe /health unauthenticated with a minimal payload
--engine-envEnvironment variable for the browser subprocess; all others are scrubbed
--browser-argRaw backend flag appended after the host’s defaults
--proxy-urlUpstream browser proxy; ambient HTTP_PROXY is never inherited
--recent-requests-capEnable /recent-requests with a bounded ring of N entries; 0 is off

afhttp panel

Mint a short-lived takeover URL for a running takeover-ready host.

afhttp panel [--endpoint-url <URL>] [--token-secret <SOURCE>]
ArgumentMeaning
--endpoint-urlCDP endpoint of a running host; falls back to AFHTTP_ENDPOINT_URL, then to the local afhttp-host container
--token-secretToken for a protected host; falls back to AFHTTP_TOKEN_SECRET, then to the discovered host’s own token (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, container:NAME, literal:VALUE)

afhttp profile cookies

Show the non-expired cookies in a profile’s jar, with values redacted.

afhttp profile cookies <NAME> [--backend <BACKEND>] [--profile-root <DIR>]
ArgumentMeaning
NAMEProfile name
--backendBrowser backend scope; required when one profile name exists under several
--profile-rootProfiles root directory; defaults to $XDG_DATA_HOME/afhttp/profiles

afhttp profile delete

Delete a profile and all of its on-disk state.

afhttp profile delete <NAME> [--backend <BACKEND>] --confirm <NAME> [--profile-root <DIR>]
ArgumentMeaning
NAMEProfile name to delete
--backendBrowser backend scope; required when one profile name exists under several
--confirmConfirmation guard; must equal the profile name
--profile-rootProfiles root directory; defaults to $XDG_DATA_HOME/afhttp/profiles

afhttp profile downloads

List files captured in a profile’s browser download directory.

afhttp profile downloads <NAME> [--backend <BACKEND>] [--profile-root <DIR>]
ArgumentMeaning
NAMEProfile name
--backendBrowser backend scope; required when one profile name exists under several
--profile-rootProfiles root directory; defaults to $XDG_DATA_HOME/afhttp/profiles

afhttp profile info

Show one profile’s size, last use, and lock state.

afhttp profile info <NAME> [--backend <BACKEND>] [--profile-root <DIR>]
ArgumentMeaning
NAMEProfile name
--backendBrowser backend scope; required when one profile name exists under several
--profile-rootProfiles root directory; defaults to $XDG_DATA_HOME/afhttp/profiles

afhttp profile list

List the on-disk profiles under the profiles root.

afhttp profile list [--profile-root <DIR>]
ArgumentMeaning
--profile-rootProfiles root directory; defaults to $XDG_DATA_HOME/afhttp/profiles

afhttp profile lock-status

Report whether a profile is currently locked by a running host.

afhttp profile lock-status <NAME> [--backend <BACKEND>] [--profile-root <DIR>]
ArgumentMeaning
NAMEProfile name
--backendBrowser backend scope; required when one profile name exists under several
--profile-rootProfiles root directory; defaults to $XDG_DATA_HOME/afhttp/profiles

afhttp profile prune

Delete profiles whose last use is older than a cutoff.

afhttp profile prune --older-than <DURATION> [--dry-run] [--profile-root <DIR>]
ArgumentMeaning
--older-thanAge cutoff such as 30d or 12h; profiles last used before it are removed
--dry-runReport what would be deleted without deleting anything
--profile-rootProfiles root directory; defaults to $XDG_DATA_HOME/afhttp/profiles

afhttp skill install

Install or refresh the Agent-First HTTP skill.

skill-install-every-agent — Target every agent that supports the scope

afhttp skill install [--agent all] [--scope <personal|workspace>] [--force]

skill-install-one-agent — Target one named agent; only this shape accepts –skills-dir

afhttp skill install --agent <codex|claude-code|opencode|hermes> [--scope <personal|workspace>] [--skills-dir <DIR>] [--force]

Arguments across every shape above:

ArgumentMeaning
--agentAgent to manage
--scopeSkill scope
--skills-dirDirectory that contains skill folders
--forceOverwrite or remove an Agent-First HTTP skill this tool did not manage

afhttp skill status

Show whether the Agent-First HTTP skill is installed, valid, and up to date.

skill-status-every-agent — Target every agent that supports the scope

afhttp skill status [--agent all] [--scope <personal|workspace>]

skill-status-one-agent — Target one named agent; only this shape accepts –skills-dir

afhttp skill status --agent <codex|claude-code|opencode|hermes> [--scope <personal|workspace>] [--skills-dir <DIR>]

Arguments across every shape above:

ArgumentMeaning
--agentAgent to manage
--scopeSkill scope
--skills-dirDirectory that contains skill folders

afhttp skill uninstall

Remove an afhttp-managed Agent-First HTTP skill.

skill-uninstall-every-agent — Target every agent that supports the scope

afhttp skill uninstall [--agent all] [--scope <personal|workspace>] [--force]

skill-uninstall-one-agent — Target one named agent; only this shape accepts –skills-dir

afhttp skill uninstall --agent <codex|claude-code|opencode|hermes> [--scope <personal|workspace>] [--skills-dir <DIR>] [--force]

Arguments across every shape above:

ArgumentMeaning
--agentAgent to manage
--scopeSkill scope
--skills-dirDirectory that contains skill folders
--forceOverwrite or remove an Agent-First HTTP skill this tool did not manage

afhttp tabs close

Close one CDP target by its target id.

afhttp tabs close --tab <TARGET_ID> [--endpoint-url <URL>] [--token-secret <SOURCE>]
ArgumentMeaning
--tabCDP target id to close
--endpoint-urlCDP endpoint of a running host; falls back to AFHTTP_ENDPOINT_URL, then to the local afhttp-host container
--token-secretToken for a protected host; falls back to AFHTTP_TOKEN_SECRET, then to the discovered host’s own token (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, container:NAME, literal:VALUE)

afhttp tabs list

List the CDP targets currently attached to a host.

afhttp tabs list [--endpoint-url <URL>] [--token-secret <SOURCE>]
ArgumentMeaning
--endpoint-urlCDP endpoint of a running host; falls back to AFHTTP_ENDPOINT_URL, then to the local afhttp-host container
--token-secretToken for a protected host; falls back to AFHTTP_TOKEN_SECRET, then to the discovered host’s own token (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, container:NAME, literal:VALUE)

afhttp ui takeover

Put the takeover panel in front of a person and block until that session ends.

ui-takeover — Mint a fresh panel credential from a running host, then deliver it

afhttp ui takeover [--endpoint-url <URL>] [--token-secret <SOURCE>] [--mode <window|link|session>]

ui-takeover-url — Deliver a panel URL that was already minted; needs no host of its own

afhttp ui takeover --takeover-url-secret <URL> [--mode <window|link|session>]

Output: protocol events; --output json (default json), --output-to split/stdout/stderr (default stdout); redirect with --stdout-file or --stderr-file.

Arguments across every shape above:

ArgumentMeaning
--endpoint-urlCDP endpoint of a running host; falls back to AFHTTP_ENDPOINT_URL, then to the local afhttp-host container
--token-secretToken for a protected host; falls back to AFHTTP_TOKEN_SECRET, then to the discovered host’s own token (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, container:NAME, literal:VALUE)
--takeover-url-secretPanel URL a previous panel or fetch --takeover already minted
--modeHow this reaches the person: window a browser window is open on this machine; link the page is reachable from this machine’s network at the link URL; session the session is registered only; open it with afui session open or reach it through afui session serve. Falls back to AFUI_DELIVERY, then window

afhttp upload

Upload a local file into a browser tab’s file input via DOM.setFileInputFiles.

afhttp upload [--endpoint-url <URL>] [--token-secret <SOURCE>] --tab <TARGET_ID> --selector <CSS> --file <PATH>
ArgumentMeaning
--endpoint-urlCDP endpoint of a running host; falls back to AFHTTP_ENDPOINT_URL, then to the local afhttp-host container
--token-secretToken for a protected host; falls back to AFHTTP_TOKEN_SECRET, then to the discovered host’s own token (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, container:NAME, literal:VALUE)
--tabCDP target id to operate in
--selectorCSS selector for the element
--fileLocal file to upload

Exit codes

CodeMeaning
0The command ran and succeeded.
1The command ran and failed. The event carries a domain error.code.
2The invocation was rejected before anything ran. error.code is one of the cli_* codes below.

The split is the useful one for a caller: exit 2 means the call was never made, so retrying it unchanged cannot help, while exit 1 means it was.

CLI errors

Every structural failure emits one strict JSON kind:"error" event on stderr, leaves stdout empty, and exits 2. The code names the failure — cli_unknown_argument for an unknown spelling, cli_unregistered_combination for registered arguments in a mixture that is not, and one each for cli_unknown_command, cli_missing_argument_value, cli_invalid_argument_value, cli_duplicate_argument, cli_unexpected_positional, and cli_invalid_utf8. message identifies a safe argument spelling or the failure category and hint gives the command to run next; neither ever quotes a raw value, including secrets. These are decided before any config, secret source, filesystem, network, or domain I/O.

Two exit-1 codes describe the tool itself rather than the call: cli_invocation_invalid means the program misread its own resolved invocation — an unknown action id, or an argument id the selected combination cannot produce — and output_setup_failed means an output sink (--stdout-file, --stderr-file, stream redirection) could not be established. Both are defects to report, not inputs to correct; retrying the same command cannot help.

Domain failures (exit 1) carry their own stable error.code instead, drawn from whatever this tool defines rather than from the cli_* set. Error events are routinely logged, so a message never quotes a value that came from an argument able to carry a credential — a header, a cookie, a token, a password, a proxy URL, an environment value, a form field. Such an error names the argument and the shape that was wrong, and stops there. A value that cannot be a secret — a path, a dot-path, a session name — is quoted, because an error that cannot say which one it means is not worth logging either.