Skip to content

feat(providers): add Cursor CLI provider#682

Open
chinhtran-dev wants to merge 9 commits intonextlevelbuilder:devfrom
chinhtran-dev:feat/cursor-cli-provider
Open

feat(providers): add Cursor CLI provider#682
chinhtran-dev wants to merge 9 commits intonextlevelbuilder:devfrom
chinhtran-dev:feat/cursor-cli-provider

Conversation

@chinhtran-dev
Copy link
Copy Markdown

@chinhtran-dev chinhtran-dev commented Apr 4, 2026

Closes #351

Summary

Adds a Cursor CLI LLM provider that follows the same integration pattern as ClaudeCLIProvider: subprocess-based streaming, host-machine Cursor login (browser agent login flow), auth/health checks, MCP bridge support, and gateway/HTTP/UI wiring.

Implementation notes

  • New cursor_cli provider type end-to-end (config, store, HTTP verify, consumer handlers).
  • Auth/status via Cursor CLI (agent status / equivalent) with subscription visibility where the CLI exposes it.
  • Streaming chat + session helpers aligned with existing CLI providers; JSON stream parsing where applicable.
  • Web UI: provider setup, detail/forms, i18n (en/vi/zh).
  • Docs updated in docs/02-providers.md.
  • Unit tests for auth/session/parsing pieces under internal/providers/.

Checklist

Implement CursorCLIProvider mirroring ClaudeCLIProvider design:
- Shell out to Cursor agent binary with CURSOR_API_KEY auth injection
- Support chat, MCP bridge, and session management
- Add CursorCLIConfig struct and provider registration
- Fix missing API key guards in config and DB layers
- Align code style and error handling with ClaudeCLIProvider
- Update provider documentation
…nd tests

Add Cursor CLI provider implementation, session/auth/chat/MCP plumbing, gateway registration, provider store and verification, channel config, and unit tests including session tests.

Made-with: Cursor
Provider constants, dashboard section, form dialogs, setup wizard step, and en/vi/zh strings.

Made-with: Cursor
Resolve conflicts: Telegram MentionMode + Cursor/Novita provider wiring,
provider_models split (cursorCLIModels in catalog), OAuth validation and
Ollama normalization on create, UI i18n and overview helpers, MCP token via
pkgGatewayToken for Cursor CLI registration.

Made-with: Cursor
@nhuanvd
Copy link
Copy Markdown

nhuanvd commented Apr 9, 2026

Should update Dockerfile to add new argument and install cursor agent when build docker image.
Refer Claude implement:

Chinh Tran and others added 4 commits April 9, 2026 15:12
- Introduced a new docker-compose file for the Cursor Agent CLI, allowing for credential synchronization from the host.
- Updated Dockerfile to include a build argument for enabling the Cursor Agent installation and added necessary dependencies.
- Configured the application to mount the host's Cursor credentials directory as read-only.

Made-with: Cursor
Use GOCLAW_CURSOR_CLI_PATH in the Cursor overlay and document the Cursor compose overlay in the base compose hints so Docker setup matches the Cursor provider configuration.

Made-with: Cursor
- Updated docker-compose configuration to reflect changes in credential syncing to the app's XDG path.
- Improved the Dockerfile to support multiple runtime stages and added necessary dependencies for the Cursor Agent.
- Enhanced the entrypoint script to handle Cursor CLI authentication and session file synchronization more robustly.
- Removed deprecated `about` command handling in the Cursor CLI authentication logic.
- Updated localization files to clarify the use of local Cursor CLI sessions.

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add Cursor CLI as a provider (similar to Claude CLI) for Cursor subscription

2 participants