https://app.ancha.io/t/<workspace>, with an API key. You get a key in one of two ways.
On your computer: ancha login
ancha logout. Use ancha login --no-browser on a machine without a browser. See ancha login.
ancha whoami shows which workspace commands use and where that choice came from. ancha whoami --verify also asks the server whether it accepts the key. See ancha whoami.
For CI and scripts: keys from Settings
- Open Settings in the console.
- Under API keys, enter a name such as
GitHub Actionsand choose Create key. - Copy the key. It is shown only once; if you lose it, revoke it and create another.
ancha login is needed when these are set. See CI.
How the CLI finds the key
ANCHA_API_KEY, if set, for any hosted server.- Otherwise the key
ancha loginsaved for that server URL.
ancha login saves keys in ~/.config/ancha/credentials.json (or $XDG_CONFIG_HOME/ancha/credentials.json), readable only by you. ANCHA_CREDENTIALS_FILE moves it. Never commit this file.
Ancha gives your agent only its tools’ fake credentials, never the API key. ancha run withholds your shell’s variables from the agent, including an exported ANCHA_API_KEY, unless you name them in agent.pass_env or run with --inherit-env. See ancha run.
Revoke a key
Settings lists every key with its name, a short prefix, when it was created and when it was last used. Choose Revoke next to a key to stop it working.ancha logout only forgets the key on your computer; revoke it in Settings too if the computer is no longer yours.
A request with a missing, revoked or wrong key fails with AUTH_INVALID and exit 2:
Output
needs an API key instead.
Run ancha login again, or set a current ANCHA_API_KEY. A server that cannot be reached at all is a different error, SERVER_UNREACHABLE, with exit 3. See Errors.