afhttp CLI reference

Web access built for AI agents — plain HTTP with automatic browser escalation, isolated profiles, structured page artifacts on disk, raw CDP, and human takeover when a login or captcha blocks the way.

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 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 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 <apple|podman|docker>] [--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 <apple|podman|docker>] [--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>...]

Shared defaults

If omitted, --name = afhttp-host, --port = 9222, --takeover-provider = kasmvnc.

Arguments across every shape above:

ArgumentMeaning
--runtimeContainer runtime; when omitted, AFHTTP_CONTAINER_RUNTIME, then AF_CONTAINER_RUNTIME, then auto-detection (apple, podman, docker)
--nameContainer name: a letter or digit, then letters, digits, _, . or -
--portHost CDP port from 1 to 65535, 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 <apple|podman|docker>] [--name <NAME>]

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

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

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

Output: raw bytes on success; rejects --output and --output-to; redirect with --stdout-file or --stderr-file. Failures are still strict JSON on stderr.

Shared defaults

If omitted, --name = afhttp-host.

Arguments across every shape above:

ArgumentMeaning
--runtimeContainer runtime; when omitted, AFHTTP_CONTAINER_RUNTIME, then AF_CONTAINER_RUNTIME, then auto-detection (apple, podman, docker)
--nameContainer name: a letter or digit, then letters, digits, _, . or -
--followKeep following the log output
--rawStream raw runtime logs instead of returning a JSON summary

afhttp container status

Report host status, its endpoint and client command, and tabs awaiting takeover. Each parked tab reports tab_id, page_url, and parked_for_s.

afhttp container status [--runtime <apple|podman|docker>] [--name <NAME>] [--reveal-token-secret]

If omitted, --name = afhttp-host.

ArgumentMeaning
--runtimeContainer runtime; when omitted, AFHTTP_CONTAINER_RUNTIME, then AF_CONTAINER_RUNTIME, then auto-detection (apple, podman, docker)
--nameContainer name: a letter or digit, then letters, digits, _, . or -
--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 <apple|podman|docker>] [--name <NAME>] [--purge]

If omitted, --name = afhttp-host.

ArgumentMeaning
--runtimeContainer runtime; when omitted, AFHTTP_CONTAINER_RUNTIME, then AF_CONTAINER_RUNTIME, then auto-detection (apple, podman, docker)
--nameContainer name: a letter or digit, then letters, digits, _, . or -
--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]

Shared defaults

If omitted, --backoff-ms = 250, --browser = auto, --max-response-bytes = 1073741824, --method = GET, --network-bodies = off, --network-body-max-bytes = 10485760, --observe-main-wait-ms = 500, --readiness-idle-ms = 800, --readiness-min-text-bytes = 32, --readiness-stable-ms = 500, --render = auto, --retry = 0, --timeout-ms = 30000, --wait = auto.

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 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
--tabUse new to allocate a target or pass a tab ID to reuse it. When omitted, takeover reuses a single parked tab with the same URL if available.
--takeoverRetain challenges, HTTP errors, or unverified content for human review; check live browser/display health before opening takeover
--profileHost profile to switch to for this fetch; defaults to the URL’s registrable domain under –takeover
--waitReadiness signal (auto is strict full-page): 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 for auto and selector-stable
--readiness-stable-msDOM/text stable window for auto and selector-stable
--readiness-min-text-bytesLow visible-text threshold that only warns about –wait auto quality
--no-network-redactWrite raw Authorization/Cookie and token/secret headers to network.json
--outDirectory for artifacts; defaults to afhttp-out under the temp directory
--cookie-jarThe host profile’s own cookie jar, named explicitly; any other path is refused, and so is one when the host cannot confirm its profile’s jar. 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 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>] [--tab-idle-timeout-s <SECONDS>]

If omitted, --takeover-provider = off.

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>] [--tab-idle-timeout-s <SECONDS>]

If omitted, --takeover-quality-percent = 100.

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

Shared defaults

If omitted, --browser = auto, --health-public = off, --profile = -, --recent-requests-cap = 0, --tab-idle-timeout-s = 900.

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
--tab-idle-timeout-sClose page tabs idle this long: any left behind by a closed connection, or all of them once no client is connected and no takeover is pending; 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 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 the Agent-First HTTP skill

skill-install-standard — Install into the standard skill folders

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

If omitted, --scope = personal.

skill-install-directory — Install into one skills directory

afhttp skill install --skills-dir <PATH> [--force]

Arguments across every shape above:

ArgumentMeaning
--scopeStandard folders under the home directory (personal) or the current directory (workspace)
--skills-dirOne skills directory to use instead of the standard folders
--forceOverwrite or remove a skill at the target path that afhttp did not install

afhttp skill status

Report whether the Agent-First HTTP skill is installed, valid, and current

skill-status-standard — Report on the standard skill folders

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

If omitted, --scope = personal.

skill-status-directory — Report on one skills directory

afhttp skill status --skills-dir <PATH>

Arguments across every shape above:

ArgumentMeaning
--scopeStandard folders under the home directory (personal) or the current directory (workspace)
--skills-dirOne skills directory to use instead of the standard folders

afhttp skill uninstall

Remove the Agent-First HTTP skill that afhttp installed

skill-uninstall-standard — Remove from the standard skill folders

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

If omitted, --scope = personal.

skill-uninstall-directory — Remove from one skills directory

afhttp skill uninstall --skills-dir <PATH> [--force]

Arguments across every shape above:

ArgumentMeaning
--scopeStandard folders under the home directory (personal) or the current directory (workspace)
--skills-dirOne skills directory to use instead of the standard folders
--forceOverwrite or remove a skill at the target path that afhttp did not install

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 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 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 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 the panel reaches the person: window opens a browser window on this machine; session registers the session only, for afui host open or for afui host serve --session-origin-host to reach from elsewhere; link frames the panel on an opaque origin with no browser storage, where the KasmVNC client cannot run, so use session for remote access. Defaults to session when AFUI_LAUNCH_FILE supplies a registry, or window otherwise

afhttp upload

Set a file input from a path visible to both driver and browser; no file bytes are transferred.

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 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
--fileFile accessible at the same absolute path in driver and browser filesystems; the default container has no shared host paths

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.
4Output could not be written (output_write_failed); a closed reader is success.

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.

cli_invocation_invalid (exit 1) describes the tool itself rather than the call: the program misread its own resolved invocation — an unknown action id, or an argument id the selected combination cannot produce. It is a defect to report, not an input to correct; retrying the same command cannot help. output_setup_failed (exit 1) means an output sink (--stdout-file, --stderr-file, stream redirection) could not be established; the message names the flag and path, which is usually a missing directory or a permission to fix.

A tool may also exit 2 with a code of its own for a usage error its argument grammar cannot express — two arguments that are each valid but cannot be combined, or a value whose meaning depends on the target. Such a call is likewise refused before anything is changed.

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.