Setting up the agents
Nextdocs does not host the agents: each one is a command line tool that runs on your own computer, under your own account with its provider, and the app starts it in a folder you pick. So every agent is installed and signed into once, by you. This page is what that takes, per agent and per system.
In the desktop app the same page lives at Set up the agents — from the Claude Code page, from the agents board, or Settings → Agents → Claude Code. There it also shows what is already installed on the computer you are at, and can run the install commands for you.
Which to pick
Any of them, and more than one: the agent is chosen per conversation. Claude Code is the only one with a plan to approve before it edits anything, per-command permission rules and a cost per turn — the others report less and are steered more coarsely. If you have a subscription to one of these already, start there; if you have none, Qwen’s free tier needs no card.
Claude Code
Anthropic’s agent, and the one everything else here is measured against: the only one with a plan to approve, per-command permission rules and a cost per turn.
curl -fsSL https://claude.ai/install.sh | bashOther ways:
Homebrew —
brew install --cask claude-codenpm —
npm install -g @anthropic-ai/claude-code
Opens a browser; a Claude subscription or an API account both work.
claude loginIn the desktop app: Settings → Secrets → Model keys, as Anthropic (ANTHROPIC_API_KEY). A key is pay-as-you-go where a sign-in is a subscription, and it is the only way in for a provider that sells no subscription. With both, the key wins and the runs are billed to it.
Run claude --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
curl -fsSL https://claude.ai/install.sh | bashOther ways:
npm —
npm install -g @anthropic-ai/claude-code
Opens a browser; a Claude subscription or an API account both work.
claude loginIn the desktop app: Settings → Secrets → Model keys, as Anthropic (ANTHROPIC_API_KEY). A key is pay-as-you-go where a sign-in is a subscription, and it is the only way in for a provider that sells no subscription. With both, the key wins and the runs are billed to it.
Run claude --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
irm https://claude.ai/install.ps1 | iexOther ways:
winget —
winget install Anthropic.ClaudeCodenpm —
npm install -g @anthropic-ai/claude-code
Opens a browser; a Claude subscription or an API account both work.
claude loginIn the desktop app: Settings → Secrets → Model keys, as Anthropic (ANTHROPIC_API_KEY). A key is pay-as-you-go where a sign-in is a subscription, and it is the only way in for a provider that sells no subscription. With both, the key wins and the runs are billed to it.
Run claude --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
Codex
OpenAI’s agent, on a ChatGPT plan or an API key. It has no plan mode and no per-command rules — its sandbox is the whole of its permissions.
curl -fsSL https://chatgpt.com/codex/install.sh | shOther ways:
Homebrew —
brew install --cask codexnpm —
npm install -g @openai/codex
Opens a browser for a ChatGPT account.
codex loginIn the desktop app: Settings → Secrets → Model keys, as OpenAI (OPENAI_API_KEY). A key is pay-as-you-go where a sign-in is a subscription, and it is the only way in for a provider that sells no subscription. With both, the key wins and the runs are billed to it.
Run codex --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
curl -fsSL https://chatgpt.com/codex/install.sh | shOther ways:
npm —
npm install -g @openai/codex
Opens a browser for a ChatGPT account.
codex loginIn the desktop app: Settings → Secrets → Model keys, as OpenAI (OPENAI_API_KEY). A key is pay-as-you-go where a sign-in is a subscription, and it is the only way in for a provider that sells no subscription. With both, the key wins and the runs are billed to it.
Run codex --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"Other ways:
npm —
npm install -g @openai/codex
Opens a browser for a ChatGPT account.
codex loginIn the desktop app: Settings → Secrets → Model keys, as OpenAI (OPENAI_API_KEY). A key is pay-as-you-go where a sign-in is a subscription, and it is the only way in for a provider that sells no subscription. With both, the key wins and the runs are billed to it.
Run codex --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
Gemini CLI
Google’s agent on a Google AI Studio key.
npm install -g @google/gemini-cliOther ways:
Homebrew —
brew install gemini-cli
In the desktop app: Settings → Secrets → Model keys, as Google AI Studio (GEMINI_API_KEY). A key is pay-as-you-go where a sign-in is a subscription, and it is the only way in for a provider that sells no subscription. With both, the key wins and the runs are billed to it.
Run gemini --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
npm install -g @google/gemini-cliNeeds Node.js: curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash && nvm install 22
In the desktop app: Settings → Secrets → Model keys, as Google AI Studio (GEMINI_API_KEY). A key is pay-as-you-go where a sign-in is a subscription, and it is the only way in for a provider that sells no subscription. With both, the key wins and the runs are billed to it.
Run gemini --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
npm install -g @google/gemini-cliNeeds Node.js: winget install OpenJS.NodeJS.LTS
In the desktop app: Settings → Secrets → Model keys, as Google AI Studio (GEMINI_API_KEY). A key is pay-as-you-go where a sign-in is a subscription, and it is the only way in for a provider that sells no subscription. With both, the key wins and the runs are billed to it.
Run gemini --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
Antigravity
Google’s own CLI, under the Google sign-in you already have — what is left of Gemini by subscription. The same sign-in also serves Claude and GPT-OSS models.
Download the app: https://antigravity.google
Sign in inside the Antigravity app; the CLI then finds the session under ~/.gemini/antigravity-cli.
agyRun agy --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
Download the app: https://antigravity.google
Sign in inside the Antigravity app; the CLI then finds the session under ~/.gemini/antigravity-cli.
agyRun agy --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
Download the app: https://antigravity.google
Sign in inside the Antigravity app; the CLI then finds the session under ~/.gemini/antigravity-cli.
agyRun agy --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
Qwen
The Qwen Code CLI on a Qwen account of your own — the free tier needs no key and no card.
npm install -g @qwen-code/qwen-code@latestOther ways:
Homebrew —
brew install qwen-code
Then /auth inside it, and pick the Qwen account. The sign-in lands in ~/.qwen/oauth_creds.json, which is the file this page checks for.
qwenRun qwen --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
npm install -g @qwen-code/qwen-code@latestNeeds Node.js 22 or newer: curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash && nvm install 22
Then /auth inside it, and pick the Qwen account. The sign-in lands in ~/.qwen/oauth_creds.json, which is the file this page checks for.
qwenRun qwen --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
npm install -g @qwen-code/qwen-code@latestNeeds Node.js 22 or newer: winget install OpenJS.NodeJS.LTS
Then /auth inside it, and pick the Qwen account. The sign-in lands in ~/.qwen/oauth_creds.json, which is the file this page checks for.
qwenRun qwen --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
Grok
xAI’s own agent, on an xAI sign-in or an API key. It prints what Claude Code prints and takes Claude Code’s permission rules, so along with Claude Code it is one of the two here with a plan to approve, per-command rules and a cost per turn.
curl -fsSL https://x.ai/cli/install.sh | bashOther ways:
npm —
npm install -g @xai-official/grok
Opens a browser for your xAI account; the session lands in ~/.grok/auth.json.
grok loginIn the desktop app: Settings → Secrets → Model keys, as xAI (XAI_API_KEY). A key is pay-as-you-go where a sign-in is a subscription, and it is the only way in for a provider that sells no subscription. With both, the key wins and the runs are billed to it.
Run grok --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
curl -fsSL https://x.ai/cli/install.sh | bashOther ways:
npm —
npm install -g @xai-official/grok
Opens a browser for your xAI account; the session lands in ~/.grok/auth.json.
grok loginIn the desktop app: Settings → Secrets → Model keys, as xAI (XAI_API_KEY). A key is pay-as-you-go where a sign-in is a subscription, and it is the only way in for a provider that sells no subscription. With both, the key wins and the runs are billed to it.
Run grok --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
irm https://x.ai/cli/install.ps1 | iexOther ways:
npm —
npm install -g @xai-official/grok
Opens a browser for your xAI account; the session lands in ~/.grok/auth.json.
grok loginIn the desktop app: Settings → Secrets → Model keys, as xAI (XAI_API_KEY). A key is pay-as-you-go where a sign-in is a subscription, and it is the only way in for a provider that sells no subscription. With both, the key wins and the runs are billed to it.
Run grok --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
A model of your own
Anything that serves an OpenAI-compatible API — Ollama, vLLM or LM Studio on this machine, or a provider like DeepSeek or OpenRouter. One server is set at a time, and it is the same one the Qwen card can fall back to.
brew install ollamaIn the desktop app: Settings → Agents → Model server — address http://localhost:11434/v1, model qwen3-coder:30b, key from nothing — a local server wants no key. One server is set at a time, so the agents on this page that use one take turns.
Run codex --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
curl -fsSL https://ollama.com/install.sh | shIn the desktop app: Settings → Agents → Model server — address http://localhost:11434/v1, model qwen3-coder:30b, key from nothing — a local server wants no key. One server is set at a time, so the agents on this page that use one take turns.
Run codex --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
winget install Ollama.OllamaIn the desktop app: Settings → Agents → Model server — address http://localhost:11434/v1, model qwen3-coder:30b, key from nothing — a local server wants no key. One server is set at a time, so the agents on this page that use one take turns.
Run codex --version. In the desktop app, Check again on the setup page turns the agent’s mark green once it can start it.
If the app cannot find something you installed
An app opened from the Dock or the Start menu does not inherit the PATH your terminal has — it gets the one the system gives to applications, which usually has none of these tools. Nextdocs reads your login shell’s PATH to get around that, so anything your terminal can run it can run too. A tool installed somewhere your shell does not know about is the case that stays invisible: add it to your PATH and check again.