Skip to content
The 31 guidesFREN中文
Guides
Part 2 · guide 3 of 6 Level: Easy Reading time: 12 min Platforms: Linux and Mac

Installing the agent (very early)

Claude Code, Codex or OpenCode, in five minutes. The trick: install it now, so it configures the rest of the machine for you.

In this guide
  1. 01Claude Code, OpenCode or Codex: which one?
  2. 02One key, every model: unified APIs
  3. 03Node.js: no longer required, still useful
  4. 04Install and launch
  5. 05Your first real move: have it configure the machine
  6. 06Lay the foundations of memory right away
  7. 07Frequently asked questions

In short

Install the coding agent right after Linux, so it can set up the rest of the machine with you. Three agents are followed at parity, all installed by a script with no Node: Claude Code (curl -fsSL https://claude.ai/install.sh | bash, a Claude Pro or Max subscription or a Console account), Codex (curl -fsSL https://chatgpt.com/codex/install.sh | sh, a ChatGPT subscription or an API key) and OpenCode, the open-source agent that accepts any provider or a local model (curl -fsSL https://opencode.ai/install | bash). Grok Build from xAI and Antigravity CLI from Google round out the picture for subscribers of those two vendors. Then launch the agent, describe the goal to it in plain language, and review every action before approving it.

Do this first: Essential system settings

Here’s the least intuitive secret of this whole journey: you install the code agent before everything else.

Most tutorials have you configure the machine for three hours, network, firewall, services, then install the AI at the end, like a reward. We do the opposite. You set up the agent now, while the system is still bare, and it’s the agent that will help you hook up Tailscale, Cloudflare, Ollama and the whole shebang. You go from “I’m typing commands I don’t understand” to “I describe what I want, I review, I approve.”

Claude Code, OpenCode or Codex: which one?

These are excellent command-line code agents. They read your project, write files, run commands, and loop until it works. This guide follows three of them at parity, with a tab for each whenever a step differs, and the difference between them fits in one line:

  • Claude Code: Anthropic’s agent. You plug into the Claude models (top of the Quelle IA Code ranking, in French, as of the September 28, 2026 edition). Ultra-simple setup, top reliability on long tasks. Included in the Claude Pro and Max subscriptions, or paid per use through the API.
  • Codex: OpenAI’s agent, backed by the GPT models (GPT-6 Astra leads the Agents ranking, in French, in the same edition). Included in ChatGPT subscriptions, from Plus to Pro, or paid per use with an API key. It can also run on a local model (codex --oss).
  • OpenCode: the open-source agent. Same spirit, but you choose your engine: Claude, GPT, Grok, or a local model via Ollama. It takes API keys and several subscriptions (ChatGPT, SuperGrok, GitHub Copilot). Perfect if you want 100% local or to juggle providers.

The two other frontier vendors also have their own terminal agent, included in their subscriptions. If you already pay for one of them, these are first-rank options:

  • Grok Build (xAI, grok command): ticked on every xAI plan, from the free one to SuperGrok Heavy, with limits that rise with the subscription. Install: curl -fsSL https://x.ai/cli/install.sh | bash, then grok login --device-auth on a machine with no browser.
  • Antigravity CLI (Google, agy command): it replaces Gemini CLI, which since June 18, 2026 no longer serves free accounts or Google AI Pro and Ultra (Gemini CLI is still reachable with a paid API key and with a Gemini Code Assist license). Written in Go, it orchestrates several subagents in the background. Install: curl -fsSL https://antigravity.google/cli/install.sh | bash.

Prices, limits for each tier and usage rules for all four subscriptions: Frontier models on a subscription.

And if you want to explore more widely, the landscape is rich, and they all work on the same principle (read, write, run, loop):

  • Aider: a much-loved open-source agent, built around git (every change = a clean commit), compatible with just about any model, local ones included.
  • Pi: the minimalist alternative to OpenCode. Same open-source world, opposite philosophy: a bare-bones core you extend yourself. See the callout right below.
  • Cline: an agent that lives inside VS Code rather than in the terminal, if you’d rather stay in your editor. (Its cousin Roo Code shut down in May 2026.)
  • Cursor, Devin Desktop (formerly Windsurf): full code editors, built around AI, for anyone who wants an all-in-one experience.
  • Orca: not one more agent, but an environment to run them in in parallel (an “ADE”, Agent Development Environment). See the callout right below.

One key, every model: unified APIs

When an open agent like OpenCode asks you “which provider?”, you could create an account with each vendor (Anthropic, OpenAI, Google…), juggle five keys, five bills, five quotas. Or plug in a unified API: a single service sitting in front of dozens of models, exposing one key, one bill, one format. You switch models without switching accounts, and you pay for everything in one place.

  • OpenRouter: the best known. A single key gives access to hundreds of models (Claude, GPT, Gemini, Grok, Llama, Qwen, DeepSeek…), with automatic routing to the cheapest or fastest provider, fallback if one goes down, and a dashboard that tracks spend down to the token. Pay-as-you-go, a thin markup over wholesale price. Ideal for comparing ten models on the same task without ten sign-ups.
  • OpenCode Zen: the OpenCode team’s own gateway: a set of models curated and benchmarked for agentic coding (85 options as of October 1, 2026, from frontier to small-and-fast, including a few free ones). Fewer choices than OpenRouter, but each one is vetted to behave well inside an agent (not just in a chat). Pay-as-you-go (wholesale price + processing fees), with configurable auto-reload and monthly cap. To connect: /connect in OpenCode → “OpenCode Zen” → paste the key.
  • OpenCode Go: the same idea, but on a flat plan: $10/month ($40 for Go Plus) for low-cost open coding models. The plan has caps, counted in dollars of usage: each model gets a monthly allowance ($15 to $60 on Go), with at most 20% of it in any 5-hour window and 50% in a week (checked on October 1, 2026 on the OpenCode Go page). The smart pick if you code every day and prefer a fixed amount to a variable bill.

Node.js: no longer required, still useful

Good news: none of Claude Code, Codex or OpenCode needs Node.js. All three install through a script that drops in a standalone program. You can skip this section and go straight to the install.

Node is still a tool that many projects ask for: a JavaScript site, an npm package, Pi installed through npm. When that day comes, install it with nvm (version manager) rather than the system package, to avoid permission headaches and switch versions painlessly.

# Install nvm (Node version manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.8/install.sh | bash
# Reload your shell (or close/reopen the terminal)
source ~/.bashrc
# Install the latest Node LTS
nvm install --lts
node -v   # v24.x as of October 1, 2026 (Node 26 is due to become LTS on October 28)

Install and launch

The CLI installs with the official installer, no Node needed:

# Downloads and installs Claude Code into ~/.local/bin
curl -fsSL https://claude.ai/install.sh | bash
# Open a new terminal, then check
claude --version

Launch it from any folder:

claude

On first launch, it opens your browser to log you in. You need a Pro, Max, Team or Enterprise subscription, or a Console account (pay-as-you-go API): the free claude.ai plan doesn’t include Claude Code. Once authenticated, you’re inside the agent. Type a request in plain language and watch it work.

Updates happen on their own in the background. To force the latest version, claude update; if something’s off, claude doctor runs a diagnosis. Installing through npm still exists, but it’s no longer the recommended route.

Your first real move: have it configure the machine

This is where the magic happens. Rather than chaining system commands yourself, you ask. Here’s a first concrete mission, to copy almost verbatim once into the agent:

0 of 3 steps done Your ticks stay in this browser.

  1. Describe the goal, not the commands

    In the agent, write something like:

    “We’re on a brand-new Ubuntu 26.04. I want you to help me finish the basic config: automatic security updates, a ufw firewall that lets only SSH through, and zram for swap. Explain each step before running it, and don’t run anything with sudo without showing me the command first.”

  2. Review the plan before approving

    The agent will propose a plan and commands. Read them. That’s the heart of the craft: you no longer type, you review. If a command looks fishy, ask “why that one?” before accepting.

  3. Let it execute, keep your hand on the wheel

    You approve step by step. On an error, the agent reads the message, understands, and fixes it. You’ve just configured your machine by chatting.

Lay the foundations of memory right away

Before you leave, create the file the agent will read at every session: a CLAUDE.md (Claude Code) or AGENTS.md (Codex, OpenCode) at the root of your project. Two lines are enough to start, we dig into the topic in Memory files.

cd ~/mon-projet
cat > CLAUDE.md <<'EOF'
# Machine context
- Mini-PC Ubuntu 26.04, use: personal dev workshop.
- Always show sudo commands before running them.
- No secret in plain text in the code.
EOF

Frequently asked questions

Can you use Claude Code with Claude's free plan?

No. Claude Code requires a Pro, Max, Team or Enterprise subscription, or a Console account paid per use through the API: the free claude.ai plan does not give access to it. On first launch, the claude command opens your browser so you can sign in.

Do you need to install Node.js for Claude Code, Codex or OpenCode?

No, all three install through a script that sets up a standalone program. Node.js is still useful for many projects, such as a JavaScript site or an npm package. When the day comes, install it with nvm rather than the system package, to avoid permission issues and switch versions painlessly.

What is a unified API such as OpenRouter?

It is a service sitting in front of dozens of models that exposes a single key, a single bill and a single format. OpenRouter thus gives access to hundreds of models (Claude, GPT, Gemini, Grok, Llama, Qwen, DeepSeek...) with routing to the cheapest or fastest provider and a fallback if one goes down. It is handy for comparing several models on the same task without signing up everywhere.

Can you install several coding agents on the same machine?

Yes, they coexist without trouble. Many people drive big projects with Claude Code or Codex and keep OpenCode with a local model for offline or sensitive work. The habits you learn with one (scoping, memory, reviewing, security) carry over to the others.

Does Gemini CLI still work with a Google subscription?

No. Since 18 June 2026, Gemini CLI no longer serves free accounts or Google AI Pro and Ultra subscriptions; it remains available with a paid API key and a Gemini Code Assist license. Google replaces it with Antigravity CLI, whose command is agy.

Terms in this guide: AgentFirewallHookTailscaleOllamaClaude CodeAPICodexAPI keyOpenCodeOpen source (vs open-weight)Grok BuildAntigravity CLICLIGitCommitUnified APIToken

Spotted a mistake?

A command stopped working, a price changed?

Tools change every month. Tell me what is wrong in this chapter and I will fix it and update its date.

Only the page, your message and the optional contact are kept. Nothing else.

Guide 11 of 31 · part 2 no guides read yet Open the list of guides