ancha login connects the CLI to your hosted workspace at app.ancha.io. You approve the computer in your browser, and the CLI saves an API key for it. After that, ancha run keeps running your agent on your computer, while the tools and their data run in your workspace. The first line of every run says so.
Example
Output
Output
--no-browser and open the printed link anywhere you are signed in.
What it saves
Approving creates an API key named after your computer. You can see and revoke it under Settings in the console. The CLI saves it with the workspace URL in~/.config/ancha/credentials.json, readable only by you. XDG_CONFIG_HOME or ANCHA_CREDENTIALS_FILE move the file. ANCHA_API_KEY in the environment takes precedence over the file.
After signing in
ancha whoamishows the workspace commands use;ancha whoami --verifyalso checks that the server accepts the key.ancha run,ancha doctorandancha world upstart withrunning on hosted https://app.ancha.io/t/<workspace> (from ancha login; --local to run here).--localon any command uses a server on this computer instead, for one command.ancha logoutforgets the login.- A key the server rejects fails the command with
AUTH_INVALIDand exit2. Runancha loginagain.
Errors
For CI, skip
login and set ANCHA_SERVER_URL and ANCHA_API_KEY. See Login and API keys and CI.