---
title: Claude Code, Codex or OpenCode? Install your first coding agent without setup chaos
description: Install Claude Code, Codex CLI and OpenCode through official routes, check authentication and versions, and complete a safe first task.
date: 2026-11-22
url: https://caminhosolo.com.br/en/2026/11/install-claude-code-codex-opencode/
tags: [claude-code, codex, opencode, installation, productivity, ai-coding]
---


> **In brief · TL;DR:** Claude Code, Codex and OpenCode are coding agents that can work with local files and tools. All three have terminal experiences, but authentication, model access and billing differ. Install **one at a time**, verify its version and begin with a read-only task in a practice directory.

## 01 — The discovery

You do not need a week-long comparison of the "best AI" to create your first web page. You need a clear project folder, a terminal and **an agent that can inspect the right files**.

Three common choices are:

- **[Claude Code](https://code.claude.com/docs/en/overview)**, Anthropic's coding agent, available through a CLI, desktop experience and editor integration, with eligible service access.
- **[Codex](https://github.com/openai/codex)**, OpenAI's coding agent for CLI, IDE and other interfaces, supporting appropriate ChatGPT sign-in or API-based configuration.
- **[OpenCode](https://opencode.ai/docs/)**, an open-source coding agent with terminal, desktop and web interfaces and multiple model providers. The software is open, while model access may still cost money.

These are not merely branded chat windows. With permission, agents can search files, edit code, run programs and inspect results. That is why **supervising one tool** is a better beginner goal than configuring all three at once.

### Which one first?

Claude Code is a natural choice if you prefer Anthropic's ecosystem. Codex may be convenient when you already have supported ChatGPT access. OpenCode appeals to users who want a configurable, open model-provider workflow — at the price of more setup decisions.

There is no universal winner. Choose the tool whose **login, pricing and review workflow** you can understand.

## 02 — The Solo verdict

**Start with one agent and one small task.** A practice HTML page or tiny repository is enough. First request an explanation of the project; only later authorise a single reversible edit.

Know the working directory before starting. Do not paste secrets into public prompts, run unknown installer scripts or give experimental agents unrestricted access to customer data.

## 03 — The workbench: installation and verification

**Environment:** macOS, Linux or Windows terminal. The `npm` options require [Node.js and npm](https://nodejs.org/en/download); check `node --version` and `npm --version`. Homebrew alternatives require [Homebrew](https://brew.sh/). Read the commands before executing them.

### A — Claude Code

On **macOS with Homebrew**, Anthropic's [instructions](https://support.claude.com/en/articles/14554922-claude-code-user-faq) include:

```bash
brew install --cask claude-code
claude --version
```

For **Linux or macOS without Homebrew**, the official native installer is available at `https://claude.ai/install.sh`; review the script and [setup guide](https://code.claude.com/docs/en/setup) before using the published `curl -fsSL https://claude.ai/install.sh | bash` command. Windows installation via PowerShell or WinGet is covered in Anthropic's [FAQ](https://support.claude.com/en/articles/14554922-claude-code-user-faq).

Run `claude` inside a practice directory and complete interactive sign-in. Claude Desktop also has a Code experience that does not require a separate terminal CLI installation.

### B — Codex CLI

The [official Codex repository](https://github.com/openai/codex#quickstart) documents:

```bash
npm install -g @openai/codex
codex --version
```

On macOS, there is also `brew install --cask codex`. The [README](https://github.com/openai/codex) describes native installers, including a Windows route. Start with `codex`, then sign in with a supported ChatGPT plan or configure API credentials through the official flow. **ChatGPT-plan access and API billing are different arrangements.**

### C — OpenCode

The official **OpenCode 2** documentation includes:

```bash
npm install -g @opencode/cli
opencode --version
```

A macOS alternative is `brew install anomalyco/tap/opencode-v2`. [OpenCode's documentation](https://opencode.ai/docs/) offers platform binaries for Linux and Windows and notes that Windows package managers are not supported for this installation route. Beware of outdated OpenCode 1 instructions.

Start `opencode`, connect a model provider and choose an accessible model. Installing the CLI is not the same as subscribing to a model service.

### A safe first task

Open a practice directory with no sensitive files and launch **only the agent you installed**. Ask:

> "Explain the current directory and the files you find. Do not install packages, edit files or use the network without telling me. If the directory is empty, describe how we can start a small project."

**Expected outcome:** the agent reports real context and respects the request, or asks you to finish provider authentication. There is no need to generate a complete application yet. Installation commands checked against primary documentation on 22 November 2026; verify future versions before running them.

**Next:** explore multi-agent orchestration with OmO Slim once OpenCode works.

