Cursor is two products in one install: a VS Code fork, and an agent loop tuned on top of it. A prompt gets you the agent half in a weekend: a model with read, search, edit and shell tools in your repo, every change shown as a diff you accept or reject, on whichever model API you already pay for. The editor half does not come out of one prompt: next-edit autocomplete, a whole-repo index, the VS Code extension world and background cloud agents. If all you want is an agent in a terminal or an editor panel, free open-source ones already exist, so check those before building.
Before you buildIf you only want an agent panel, Cline, OpenCode and Kilo Code are free and open source. Try one for a week before building your own.
Build me a local coding agent with a web UI to replace Cursor for chat-driven edits. Requirements: - Node.js 22 + TypeScript: a Fastify server and a React UI built with Vite. `npm start -- /path/to/repo` serves http://127.0.0.1:4800 and treats that folder as the project. - Model: `@anthropic-ai/sdk` with a tool-use loop. ANTHROPIC_API_KEY and MODEL live in .env; an optional OPENAI_BASE_URL switches to any OpenAI-compatible endpoint. Stream replies to the UI over SSE. - Tools the model can call: list_files and read_file (honour .gitignore with the `ignore` package), grep (ripgrep if installed, otherwise a Node fallback), edit_file (exact string replace, fails when the match is not unique), write_file and run_command. - Review step: each change appears as a side-by-side diff (`@monaco-editor/react` diff editor) and waits for Accept or Reject. "Auto-accept edits" is a toggle that starts off. - Commands: run_command asks first unless the command is on an allowlist in ./config.json (git status, git diff, ls, npm test). 30 second timeout, output capped at 20 KB, always run inside the repo, never sudo. - Safety: reject any path that resolves outside the repo. Before the first accepted edit of a session, commit the working tree to a new branch `agent/<timestamp>`; an Undo button runs `git reset --hard` to the last checkpoint after a confirmation. - Storage: better-sqlite3 in ./data/sessions.db with messages, tool calls and token counts per session; a sidebar lists past sessions and shows a running token and cost estimate. - Read AGENTS.md and CLAUDE.md from the repo root into the system prompt when they exist. - No accounts, no telemetry, local-first: only calls to the model endpoint leave the machine, and the README lists exactly which files and command output are sent. - Out of scope: inline tab completion, code indexing or embeddings, a VS Code fork or extensions, cloud agents, multiple users. - README: setup, the .env keys, what the agent can touch, 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 Cursor.
Add Cursor-rules support to the coding agent in this folder. Requirements: - Read .cursor/rules/*.mdc in the target repo. Parse the frontmatter (description, globs, alwaysApply) with `gray-matter`. - Rules with alwaysApply: true go into every system prompt. Rules with globs are added only after the agent reads or edits a file that matches one of the globs (use `picomatch`). - Rules with only a description are listed by name so the model can ask for them through a new get_rule tool. - A Rules panel in the UI shows which rules were active in each turn. - Out of scope: user-level rules outside the repo. - Update the README with the rule format.
Add a repo map to the coding agent in this folder. Requirements: - Parse TypeScript, JavaScript and Python files with `web-tree-sitter` and store functions, classes and exports (name, file, line) in the SQLite database. - Re-index changed files on save with `chokidar`; a full index of a 2,000-file repo should finish in under a minute. - Add a find_symbol tool, and put a compact map of the 50 most-referenced files into the system prompt. - Show index status and the file count in the UI footer. - Update the README with the supported languages.
Add a test loop to the coding agent in this folder. Requirements: - A TEST_COMMAND in .env (for example `npm test -- --run`). After the agent's edits are accepted, run it and send a trimmed failure log back to the model. - Allow at most 3 automatic retries per request, then stop and show the last failure. - Show each run in the UI with its duration and pass or fail status. - Run the command with the same timeout and output cap as run_command. - Update the README.
Add inline completions to the editor view of the coding agent in this folder. Requirements: - Use the Monaco inline completions provider. Request a completion 400 ms after typing stops. - Send the 60 lines above and 20 lines below the cursor to an Ollama model set in OLLAMA_MODEL (for example qwen2.5-coder:7b) through its /api/generate endpoint with a 2 second timeout. - Accept with Tab, dismiss with Esc, and skip files over 1,000 lines. - Log latency per request. Add a README note that quality and speed will trail Cursor's Tab.
Developers pay to have the model, the editor and the review step in one place that already works: the agent finds files in a large repo, edits land as reviewable diffs, and new frontier models are available within days of release. Rebuilding that loop for one model is easy; keeping it good across models, languages and codebases is the part a subscription covers, and a solo build rarely keeps up with it.
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; daily heavy use of a frontier model can pass what a plan costs. The build is token usage on your agent plan.
Checked 2026-10-14 against Cursor's docs: 1, 2, 3, 4, 5, 6, 7
| Plan | Monthly | Annual, per month | What you get |
|---|---|---|---|
| Free | $0 | $0 | Limited agent and chat requests; no cloud agents, no third-party models. |
| Plus | $8 | — | Base usage from a weekly pool shared with Grok; Cursor agent with Grok models only. |
| Premium | $30 | — | 4x the Plus pool, cloud agents and automations, code hosting, AI code review, third-party models. |
| Super | $100 | — | 15x the Plus pool, priority model access at peak times. |
| Ultra | $200 | — | 50x the Plus pool, earliest access to new products and models. |
| Teams | $30 | — | 4x to 50x the Plus pool depending on seat tier, SSO, usage analytics, team privacy settings. |
| Cursor Pro (existing subscribers) | $20 | — | Two usage pools: Cursor models (Grok, Composer) and Other Models billed at API price. |
Free gives a starter allowance for Cursor's coding agents and limited chat; cloud agents are not included.
Kinda. The core is a weekend build with the prompt on this page, but real gaps remain: Autocomplete that predicts your next edit as you type, A whole-repo index that finds the relevant files without you naming them.
About $8 a month on the Plus plan, $96 a year (checked 2026-10-14).
Autocomplete that predicts your next edit as you type; A whole-repo index that finds the relevant files without you naming them; The full VS Code extension, debugger and remote-development setup; Cloud agents that keep working in the background and open pull requests, plus AI code review; An agent loop that a team re-tunes for every new model release. If any of those matter to you, keep paying.
Yes: Cline (open source), OpenCode (open source), Kilo Code (open source).