A terminal REPL for the Cursor agent, built on the Cursor TypeScript SDK
(@cursor/february).
Send prompts, watch streamed thinking + tool calls + diffs in your terminal, resume past sessions, swap themes - all without leaving the shell.
cursor-sdk.mp4
- Node.js ≥ 22
- A Cursor API key - set
CURSOR_API_KEYin your environment or in.env.localat the repo root.
bun install
cp .env.example .env.local # paste your CURSOR_API_KEY
bun run devOr with npm/pnpm:
npm install
echo "CURSOR_API_KEY=sk-..." > .env.local
npm run devbun run install:local writes a small shell wrapper to dist/cursor-cli
and symlinks it into ~/.local/bin/cursor-cli. After that, cursor-cli
works from any directory:
bun run install:local
# add to PATH if it isn't already:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
cd ~/some/project
cursor-cli # opens the REPL with cwd preservedThe wrapper execs bun run src/cli.ts "$@" against this checkout,
so the SDK's session store writes per the user's cwd while module
resolution still uses this project's node_modules.
Custom destination:
bun run install:local --link=/usr/local/binbun build --compile would produce one self-contained executable, but
@cursor/february statically imports the userland sqlite3 package
- a native (
.node) binding loaded vianode-pre-gyp/bindings. That fails three ways under--compile:
- Bun can't embed
.nodefiles into a compiled binary. - The compiled binary's sealed virtual filesystem (
/$bunfs/) can't reach hostnode_modules/for runtime requires, even with--external. bindingswalks the runtime filesystem looking for the caller'spackage.json- those paths don't exist inside the binary.
If @cursor/february switched its local-runtime store to node:sqlite
(stable in Node ≥ 22.5) or bun:sqlite (Bun builtin), this CLI
could compile to a single ~70 MB self-contained executable just like
ls-prove does. Until then, the wrapper is the cleanest portable
distribution.
| Command | Description |
|---|---|
/help |
Show keyboard shortcuts and command list |
/clear |
Reset the current session (rotates agent) |
/sessions |
Browse, resume, archive, or delete sessions |
/model |
Switch the active model |
/theme |
Pick a theme (dark, light, daltonized, ANSI) |
/exit |
Quit |
Readline-style line editing (Ctrl+A/E/B/F/W/U/K, Alt+B/F/Backspace), Shift+Enter for newline, ↑/↓ for history, Esc to dismiss overlays, Ctrl+C twice to exit.
src/
├── cli.ts entrypoint
├── repl/ Ink components + REPL state
├── sdk/ @cursor/february adapter (typed surface)
└── session/ persisted agent-id store
bun run dev- start the REPLbun run install:local- install thecursor-cliwrapper into~/.local/binbun run lint- Biome + tsc + knipbun run lint:fix- auto-fix what's safe
A weekend exploration of the @cursor/february private alpha - roughly 30 hours from bun init to the first usable REPL. Built to stress the SDK from an integrator's seat and put concrete feedback in front of the Cursor team.
MIT - see LICENSE.