poly apikey command.
The prompt
Copy everything in this block.Prompt
What the assistant will do
- Check for uv and ask how you’d like to install it if it’s missing.
- Install the CLI with
uv tool install --python 3.14 polyai-adk. - Run
poly apikey --region studioand show you the sign-in URL. - Wait while you approve the sign-in in your browser with GitHub.
- Show you the masked summary once it completes.
- Verify the key with
poly project list --region studio.
poly setup/poly login instead.
What gets written where
- The API key, to
~/.poly/credentials.json(mode600) under thestudioregion — everypolycommand reads this. POLY_API_KEY, to your shell profile (~/.zshrc,~/.bash_profile,~/.bashrc, or your fish config) — for the PolyAI SDKs and other tools that read it directly.- On Windows,
POLY_API_KEYgoes into your user environment variables instead of a profile file.
Requirements
- Python — handled by uv, which downloads 3.14 if you don’t already have it.
- uv itself —
brew install uv,winget install astral-sh.uv, orpipx install uv. - A GitHub account.
- An AI coding assistant that can run shell commands — Claude Code, Cursor, Codex, and Copilot CLI all qualify. This prompt has been tested with Claude Code.
If something goes wrong
polynot found after install — runuv tool update-shelland open a new terminal.poly apikeynot recognised — runuv tool upgrade polyai-adk.POLY_API_KEYalready set to a different value — the command stops with exit code2; the assistant will ask you before rerunning with--force.
poly login flow.
Telemetry
poly apikey sends anonymous usage events so we can see where setup fails; the key and sign-in token are never included. Set DO_NOT_TRACK=1 or POLY_NO_TELEMETRY=1 to opt out.
