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.
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.
npm install --global @nehanahmed/forgeOpen source (MIT). Requires Node.js 20+ and an OpenRouter API key.
Loading demo…
Forge starts in the folder you launch it from and works on the code that is actually there.
Run `forge` inside a project and it works relative to that directory. There is no editor plugin and no separate workspace.
Finds definitions and usages with fast regex search that skips `node_modules`, build output and lockfiles, so results stay relevant.
Reads files, runs shell commands, creates files and makes targeted find-and-replace edits.
Hands self-contained research to a read-only sub-agent with its own context, then gets back a single summary.
Conversations are saved in your project. Run `forge --resume` to continue the latest session, or pass a session ID.
Streams responses and tool activity as they happen, with token usage and estimated cost for the session.
Shell commands, file writes and edits each pause for a y or n. Reading files, searching and sub-agent investigations run without interruption.
You see the exact command or edit before it runs.
The sub-agent can read and search, but it cannot change your files.
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.
Press y or n
How Forge compares to popular alternatives on the dimensions that matter for terminal-first workflows.
| Feature | Forge | Cursor | Aider | Copilot | Windsurf |
|---|---|---|---|---|---|
| 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
You need Node.js 20 or newer, an OpenRouter API key and ripgrep. Setup takes four steps.
Install the Forge package globally with your preferred package manager.
npm install --global @nehanahmed/forgeInstall ripgrep for your operating system, then confirm `rg --version` works in a new terminal.
winget install --id BurntSushi.ripgrep.MSVC -eThen confirm rg --version works in a new terminal.
Get a key from OpenRouter. Forge saves it in ~/.forge/config.json. Keep it private and out of version control. OpenRouter.
forge config set-key YOUR_OPENROUTER_API_KEYTry a task such as "Find and fix the bug in the login flow."
cd path/to/your-project/helpShow available commands/sessionsList saved sessions/newStart a new session/clearClear the current display and usage counters/exitExit Forgeforge --resumeResume a sessionforge --resume SESSION_IDResume a session