Skip to content
Forge

The coding agent
for your terminal.

Forge reads, searches, runs commands, and edits files. Risky actions wait for your approval.

Forge is an open-source AI coding agent that runs in your terminal. It searches your codebase with ripgrep, executes shell commands, and edits files — every risky action pauses for your approval. Free, local-first, and model-agnostic via OpenRouter.

1 stars on GitHub~50k weekly downloadsUpdated Oct 2026

Open source (MIT). Requires Node.js 20+ and an OpenRouter API key.

Built for real codebases

Forge starts in the folder you launch it from and works on the code that is actually there.

Works where you launch it

Run `forge` inside a project and it works relative to that directory. There is no editor plugin and no separate workspace.

Searches with ripgrep

Finds definitions and usages with fast regex search that skips `node_modules`, build output and lockfiles, so results stay relevant.

Reads, runs and edits

Reads files, runs shell commands, creates files and makes targeted find-and-replace edits.

Delegates investigations

Hands self-contained research to a read-only sub-agent with its own context, then gets back a single summary.

Picks up where you left off

Conversations are saved in your project. Run `forge --resume` to continue the latest session, or pass a session ID.

Shows what it is doing

Streams responses and tool activity as they happen, with token usage and estimated cost for the session.

It asks before it acts.

Shell commands, file writes and edits each pause for a y or n. Reading files, searching and sub-agent investigations run without interruption.

Writes need approval

You see the exact command or edit before it runs.

Delegation stays read-only

The sub-agent can read and search, but it cannot change your files.

Stored on your machine

Sessions and your API key are saved locally. Anything Forge reads is sent to the model through OpenRouter as part of the conversation.

Forge is not a sandbox. Shell commands run with your operating-system permissions, so read each one before you confirm it.

⚠
⚠ Allow: run_bash({"command":"pnpm test"})? (y/n)

Press y or n

Forge vs. Other AI Coding Agents

How Forge compares to popular alternatives on the dimensions that matter for terminal-first workflows.

FeatureForgeCursorAiderCopilotWindsurf
Environment
Runs in terminal
No IDE required
Works in any project directory
Licensing & Cost
Open source (MIT)
Bring your own API key
No subscription required
Free for commercial use
Safety & Control
Approval before every write
Approval before shell commands
Read-only sub-agent delegation
Local session storage
Capabilities
Code search (ripgrep)
File read/write/edit
Shell command execution
Session resume / persistence
Token usage & cost tracking
Model agnostic (OpenRouter)

Data accurate as of October 2026. Features may change — verify on each project's documentation.
View Forge source on GitHub

Install Forge

You need Node.js 20 or newer, an OpenRouter API key and ripgrep. Setup takes four steps.

1.

Install Forge

Install the Forge package globally with your preferred package manager.

2.

Install ripgrep

Install ripgrep for your operating system, then confirm `rg --version` works in a new terminal.

Then confirm rg --version works in a new terminal.

3.

Set your API key

Get a key from OpenRouter. Forge saves it in ~/.forge/config.json. Keep it private and out of version control. OpenRouter.

4.

Start Forge in your project

Try a task such as "Find and fix the bug in the login flow."

Once it is running

/helpShow available commands
/sessionsList saved sessions
/newStart a new session
/clearClear the current display and usage counters
/exitExit Forge
forge --resumeResume a session
forge --resume SESSION_IDResume a session

Questions