Use agents in Cursor without installing another plugin
Popular threads say terminal + BASE_URL is enough; clovapi switch persists config better than hand-written env.
A post that keeps circulating on DEV and Reddit-style communities makes a simple claim: the shortcut to agents in Cursor is not an extension—it is the terminal plus environment variables. Claude Code honors ANTHROPIC_BASE_URL; Codex has its own config; export once in Cursor’s integrated terminal and traffic hits your localhost proxy.
Follow-up comments complain: “env dies when I close the tab,” “every repo needs another export,” “Codex does not read Anthropic vars.”
What the community gets right
- IDE plugins are optional; the network path is the integration surface.
- A local reverse proxy can transcode transparently—Cursor stays unaware.
- Running
claudeinside the IDE terminal feels the same as outside.
Where env-vars break down
Typical failures:
- New terminal tab without export—proxy “suddenly broken.”
- Team docs say “set BASE_URL to xxx”—new hires still fail (port/path drift).
- Claude Code and Codex together—different variable names, growing shell scripts.
clovapi: turn the BASE_URL trick into config files
switch writes what each CLI already respects:
- Claude Code →
~/.claude/settings.json, etc.; - Codex →
~/.codex/config.toml; - OpenCode → global
opencode.jsonc.
It starts the same Go proxy the CLI uses (default http://127.0.0.1:27483). In Cursor’s terminal:
clovapi switch --cli claude-code my-profile
claude
No per-session export ANTHROPIC_BASE_URL=... unless you want an override. New tabs, Cursor restarts—profile unchanged, wiring persists.
Versus three-line launcher scripts
Communities share wrappers like:
export ANTHROPIC_BASE_URL=http://127.0.0.1:8077
exec claude "$@"
Fine for one proxy and one CLI. clovapi fits when you need:
- Many profiles (official / DeepSeek / team gateway);
- Many CLIs (Claude + Codex + OpenCode);
- GUI switching in the desktop app.
Checklist for Cursor users
- Install clovapi CLI or desktop (home page download).
clovapi addto save upstreams,switchper CLI.- Open Cursor’s terminal, run
claude/codex/opencode. - Confirm proxy:
clovapi proxy statusor the desktop panel.