Authentication
One GthonrAgents 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:
gthonragents loginUse device authorization over SSH or in a container:
gthonragents login --headlessPipe a secret without placing it in shell history:
echo "$GTHONRAGENTS_API_KEY" | gthonragents login --with-tokenYou can also expose GTHONRAGENTS_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 gthonragents 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 gthonragents login poll --session <login-session-id> --json --wait -
Verify the account.
Terminal window gthonragents status
Credential precedence
Section titled “Credential precedence”At runtime, GthonrAgents checks credentials in this order:
GTHONRAGENTS_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”gthonragents logout