Windsurf is a VS Code fork with a coding agent on top, plus a Tab model that predicts your next edit. A prompt gets the agent half in a few hours: a model with file, search, edit and shell tools inside your repo, rules and memories read from plain files, and every change shown as a diff you accept or reject. The editor half is not something one prompt gives you: trained next-edit completion, near-instant retrieval of the right files, the extension world and cloud agents that open pull requests. If an agent in a terminal is all you need, open-source ones already exist, so try them before building.
Before you buildWindsurf's Free plan keeps unlimited Tab completions and inline edits with a light agent quota. If you code a few hours a week, that may be enough before you pay $20 or build anything.
Build me a terminal coding agent to replace Windsurf's Cascade for chat-driven edits. Requirements: - Node.js 22 + TypeScript, installed with `npm link` as an `agent` command. It runs inside the current Git repo and treats that folder as the project root. - Model: `@anthropic-ai/sdk` with a tool-use loop. ANTHROPIC_API_KEY and MODEL live in ~/.agent/.env; an optional OPENAI_BASE_URL switches to any OpenAI-compatible endpoint. Stream replies to the terminal. - Tools: list_files and read_file (honour .gitignore with the `ignore` package), grep (ripgrep when installed, a Node fallback otherwise), edit_file (exact string replace, fails when the match isn't unique), write_file and run_command. - Review: each edit prints a coloured unified diff (`diff` package) and waits for y, n or a (accept all for this session). run_command asks first unless it is on the allowlist in ./.agent/config.json; 30 second timeout, output capped at 20 KB, never sudo. - Rules and memories: read AGENTS.md and every file in ./.agent/rules/*.md into the system prompt. `/remember <text>` appends a dated line to ./.agent/memories.md for this repo only; `/forget` opens that file in $EDITOR. - Workflows: a Markdown file ./.agent/workflows/<name>.md runs as `/<name>` with $ARGS substituted, so a repeated job such as release notes becomes one command. - Safety: refuse any path outside the repo. Before the first accepted edit, create a branch `agent/<timestamp>`; `/undo` resets to the last checkpoint after a confirmation. - Storage: better-sqlite3 in ~/.agent/sessions.db with messages, tool calls and token counts. `agent --resume` reopens the last session and prints a running cost estimate. - No accounts, no telemetry, local-first: only calls to the model endpoint leave the machine, and the README lists what is sent. - Out of scope: tab completion, repo embeddings, an editor or GUI, cloud agents, parallel agents. README: the .env keys, the rules and workflow folders, and a warning that run_command can still damage a repo, so work on a branch.
Opens your agent with the prompt filled in, you press enter. Or copy it and paste it into an empty folder.
The first prompt builds the core. Run these one at a time in the same folder to grow it into your own Windsurf.
Add a Windsurf importer to the agent in this folder. Requirements: - `agent import-windsurf` reads the repo's .devin/rules/*.md, .windsurf/rules/*.md and a root .windsurfrules file, and ~/.codeium/windsurf/memories/global_rules.md. - Copy repo rules into ./.agent/rules/ and the global file into ~/.agent/rules/global.md, stripping any front matter that only matters to Windsurf, and keep file names. - Never overwrite an existing file: print a diff and ask first. - Print what was copied and what was skipped. - Update the README.
Add a plan mode to the agent in this folder. Requirements: - `agent --plan` lets the model read and search but not edit; it ends by writing a numbered plan to ./.agent/PLAN.md. - After you approve the plan, the same session switches to edit mode with the plan in context and ticks each step off in PLAN.md as it finishes. - Refuse write_file, edit_file and run_command (except read-only git commands) while in plan mode. - Update the README.
Add automatic test runs to the agent in this folder. Requirements: - A `testCommand` in ./.agent/config.json (for example `npm test`) runs after each accepted edit batch, with a 120 second timeout. - On failure, send the last 4 KB of output back to the model and let it retry, at most 3 times per request, then stop and show the failure. - Print a one-line pass or fail summary after every run and log it in the session database. - Update the README.
For $20 a month a developer gets an agent that already knows how to work in a repo, models from several vendors under one quota, and no keys to juggle. A quota that refreshes daily is a cap rather than a surprise token bill, at least until you choose to buy extra usage.
Estimate · No subscription, but every agent step is billed in tokens by your model provider. A few light sessions a month cost a few dollars, while daily heavy use of a frontier model can pass the $20 plan. The build is token usage on your agent plan.
| Plan | Monthly | Annual, per month | What you get |
|---|---|---|---|
| Free | $0 | $0 | Light quota for agent work, limited model availability, unlimited inline edits and Tab completions. |
| Pro | $20 | — | Bigger daily and weekly quotas with frontier models from OpenAI, Claude, Gemini and others plus open-source models, free use of the SWE-2 model, Devin Cloud agents, extra usage at API prices. |
| Max | $200 | — | Everything in Pro with significantly higher quotas. |
| Teams | $40 | — | Up to 200 users, shared work, central billing, an admin dashboard with analytics, priority support. |
| Enterprise | custom | — | SAML or OIDC single sign-on, central admin controls, dedicated account management, a dedicated deployment option. |
Free gives one member a light agent quota, a limited model list, and unlimited inline edits and Tab completions.
Kinda. The core is a weekend build with the prompt on this page, but real gaps remain: Tab and Supercomplete, which predict your next edit while you type, Fast Context, the step that finds the right files and lines in milliseconds.
About $20 a month on the Pro plan per seat, $240 a year (checked 2026-10-19).
Tab and Supercomplete, which predict your next edit while you type; Fast Context, the step that finds the right files and lines in milliseconds; A full IDE with extensions, debugging and a board view for managing several agents; Cloud agents that keep working after you close the laptop, and code review before you push; Free use of the SWE-2 model and one quota that covers models from several vendors. If any of those matter to you, keep paying.
Yes: Cline (open source), Continue (open source), Kilo Code (open source).