AI Tool Authentication
Set up tokens before connecting to avoid login issues on mobile.
Why Tokens?
AI coding tools (Claude Code, Copilot, Codex, etc.) require authentication on the remote server.
Their browser-based /login flows don't work from mobile SSH — opening a browser
causes Android/iOS to kill the terminal app, dropping your SSH session.
The solution: generate a token on your computer once, add it to your TerminaLLM
connection profile as an environment variable, and never deal with /login again.
Setup by Tool
Claude Code
▶
Generate a long-lived OAuth token on any machine with a browser:
Alternative (requires API billing, not Pro/Max subscription):
ANTHROPIC_API_KEY — generate at
console.anthropic.com
/logout — it permanently revokes the token.
If you need to switch accounts, generate a new token with claude setup-token.
GitHub Copilot CLI
▶
Generate a fine-grained personal access token:
Also accepts: GH_TOKEN, GITHUB_TOKEN
Alternative: gh auth login on the server (device code flow, works in terminal)
OpenAI Codex CLI
▶
Requires OpenAI API billing. Keys don't expire until manually revoked.
Google Gemini CLI
▶
Free tier available with rate limits. Also accepts GOOGLE_API_KEY.
Amazon Q Developer
▶
Authenticate directly on the server (recommended):
For programmatic access, add to TerminaLLM env vars:
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY,
AWS_SESSION_TOKEN (if using STS)
Aider
▶
Aider doesn't have its own auth — it uses your LLM provider's API key:
If the key is set, Aider works. No /login needed.
Cursor CLI
▶
Keys expire after 90 days. Regenerate and update the env var when expired.