Authentication
One AnyCap login covers every capability. CLI and MCP calls share the same credential runtime.
Choose a login method
Section titled “Choose a login method”Use the default flow on a local desktop:
anycap loginUse device authorization over SSH or in a container:
anycap login --headlessPipe a secret without placing it in shell history:
echo "$ANYCAP_API_KEY" | anycap login --with-tokenYou can also expose ANYCAP_API_KEY directly to the process.
Non-blocking login for agents
Section titled “Non-blocking login for agents”Tool-call runtimes should not block while a human uses the browser.
-
Start a login session.
Terminal window anycap login --headless --no-wait --json -
Show the returned
verification_urianduser_codeto the human. -
After the human confirms completion, run the returned poll command or:
Terminal window anycap login poll --session <login-session-id> --json --wait -
Verify the account.
Terminal window anycap status
Credential precedence
Section titled “Credential precedence”At runtime, AnyCap checks credentials in this order:
ANYCAP_API_KEY- the operating-system keyring
- the owner-only credential file used on headless systems
Credentials are never returned by authentication commands. On macOS and Windows, persistent credentials use the platform credential manager. Headless Linux automatically falls back to an encrypted local file.
Log out
Section titled “Log out”anycap logout