DEV Community

TerminalBlog
TerminalBlog

Posted on • Originally published at terminalblog.com

How to Set Up AI Coding Agents — Beginner's Guide

Originally published at terminalblog.com

This is the beginner's gateway to AI coding agents. Every setup, installation, and getting-started article links here. If you've never used a coding agent, start here.

Sister pillars: Best coding agents guide · Security checklist · Pricing guide

What is a coding agent?

A coding agent is an AI tool that writes, edits, reviews, and sometimes runs code for you — directly in your terminal or IDE. Unlike a chatbot, it has access to your filesystem, git, and sometimes your browser. It can refactor entire codebases, run tests, create PRs, and automate repetitive tasks.

Key difference from autocomplete: An autocomplete suggests the next line. A coding agent can plan a multi-file refactor, execute it, run tests, and fix what breaks.

Quick start: pick your path

Your situation Start here Time to first success
I want the easiest setup Cursor 5 minutes
I want free + powerful terminal Hermes or OpenCode 10 minutes
I want the deepest reasoning Claude Code 10 minutes
I want GitHub integration Copilot CLI 5 minutes
I want cloud parallelism Codex 10 minutes
I want local-first, no API costs Run with Ollama 20 minutes

Agent-by-agent setup guides

Claude Code

Claude Code is Anthropic's terminal-based coding agent. It offers the deepest reasoning but requires a subscription or API key.

Prerequisites:

  • Node.js 18+ installed
  • Terminal (Mac, Linux, or Windows with WSL/Git Bash)
  • Anthropic API key or Claude subscription

Installation:

npm install -g @anthropic-ai/claude-code
Enter fullscreen mode Exit fullscreen mode

First run:

claude
# Follow the auth flow — paste your API key
# Navigate to your project directory
cd your-project
claude
Enter fullscreen mode Exit fullscreen mode

Recommended next steps:

Windows users: See Claude Code on Windows — click-through permissions and Windows hooks and shell redirection for known issues and fixes.

Cursor

Cursor is an IDE-based coding agent (fork of VS Code). It's the easiest entry point if you're coming from a traditional editor.

Prerequisites:

Setup:

  1. Download and install Cursor
  2. Open your project folder
  3. Enable the AI features in Settings → AI
  4. Use Cmd/Ctrl+K for inline edits, Cmd/Ctrl+L for chat

Recommended next steps:

Hermes Agent

Hermes is the most feature-rich open-source coding agent — cron jobs, multi-provider routing across 15+ LLMs, browser automation, and memory. Free and self-hosted.

Prerequisites:

  • Python 3.10+ or Node.js
  • Terminal (works on Windows, Mac, Linux)
  • API key for at least one LLM provider (or use OpenRouter for access to many)

Installation:

# Clone and install
git clone https://github.com/NousResearch/hermes-agent.git
cd hermes-agent
pip install -e .
# Or use the installer
curl -fsSL https://hermes.nousresearch.com/install.sh | bash
Enter fullscreen mode Exit fullscreen mode

First run:

hermes
# Follow the setup wizard
# Configure your API provider
# Start coding
Enter fullscreen mode Exit fullscreen mode

Recommended next steps:

OpenCode

OpenCode is a skill-driven, provider-neutral open-source coding agent. BYO keys, no vendor lock-in.

Prerequisites:

  • Go 1.21+ installed
  • Terminal
  • API key for your preferred provider

Installation:

# Install via Go
go install github.com/opencode-ai/opencode@latest
# Or download from GitHub releases
Enter fullscreen mode Exit fullscreen mode

Recommended next steps:

OpenAI Codex

Codex is OpenAI's cloud-parallel coding agent. It runs in cloud sandboxes and can execute multiple tasks simultaneously.

Prerequisites:

  • ChatGPT Plus subscription ($20/month)
  • Terminal

Setup:

npm install -g @openai/codex
codex --auth
# Follow the auth flow
Enter fullscreen mode Exit fullscreen mode

Recommended next steps:

GitHub Copilot CLI

Copilot CLI is GitHub's terminal agent, deeply integrated with GitHub repos, PRs, and Actions.

Prerequisites:

  • GitHub account with Copilot access ($10-39/month)
  • Terminal

Setup:

# Install
npm install -g @githubnext/copilot-cli
# Authenticate
copilot auth
Enter fullscreen mode Exit fullscreen mode

Recommended next steps:

Other agents worth trying

Running with Ollama (local models)

If you want zero API costs, you can run coding agents with local models via Ollama.

Prerequisites:

  • Ollama installed (ollama.com)
  • 8GB+ RAM (16GB+ recommended for good models)
  • Compatible coding agent (OpenCode, Hermes, Oh My Pi, Kilo)

Full guide: How to Run Coding Agents with Ollama: The Complete Local Setup Guide

Key considerations:

  • Quality depends heavily on model size — 7B models are functional, 70B models are competitive
  • Speed depends on your hardware — GPU acceleration helps significantly
  • Context windows are smaller than cloud APIs
  • Good for learning, experimentation, and privacy-sensitive code

Running in the browser

Some developers prefer not to install anything locally. The browser-remote trend is growing.

Full guide: Run Claude Code and Codex in Your Browser — The Browser-Remote Trend Explained

Making any agent 10× better

The harness matters less than the instructions you feed it. Two files can transform any agent:

AGENTS.md — the universal instruction sheet

An AGENTS.md file in your repo root tells the agent how your project works — coding style, test commands, architecture decisions, things to avoid.

UI.md — the design rulebook

Context engineering

Security before production

Before you wire an agent into a real project with real secrets:

  1. Run the security checklistCoding Agent Security Checklist 2026
  2. Check your sandbox — make sure it's actually isolated
  3. Audit your .env files — the agent can probably read them
  4. Set up permission gates — never auto-approve destructive operations

Common setup mistakes to avoid

Before you start, here are the pitfalls that trip up most beginners:

  1. Skipping AGENTS.md. The single biggest upgrade you can make. Create an AGENTS.md file in your repo root before you run any agent for the first time. Why it matters.

  2. Not setting token limits. Without limits, a single bad loop can burn $50+ in API costs. Always set --max-tokens or equivalent. See the pricing problem nobody talks about.

  3. Running in production repos without sandbox verification. Test any agent in a throwaway project first. Verify the sandbox actually works. Many don't.

  4. Ignoring your operating system. Windows users face unique issues. Codex sandbox is dead on Windows. Claude Code has permission bugs. Check the Windows-specific articles before blaming the agent.

  5. Not committing before the agent runs. Always git stash or commit before giving an agent access. Background tasks can corrupt git state.

  6. Expecting too much too soon. Agents are fastest when they understand your codebase. The first session is always slower than the tenth. Give it time to build context.

What to read next

Cross-pillar navigation

Last updated: July 27, 2026. When a new agent launches or setup instructions change, we update this guide.

Top comments (0)