Cursor CLI Compatibility Note for CodeGateway

(Unofficial)

This guide is independently community-maintained. It is not affiliated with, endorsed by, or sponsored by the vendor of the third-party tool it covers. All third-party trademarks are the property of their respective owners.

Cursor CLI only authenticates with a Cursor account; official CLI docs expose no custom endpoint setting.

Bottom line: Cursor CLI cannot connect to CodeGateway. The official CLI authenticates only with a Cursor account (browser login or API key) and exposes no custom upstream setting.

Why

  • Cursor CLI's auth methods: browser login (recommended) or API key from the Cursor Dashboard (CURSOR_API_KEY / --api-key).

  • There is no base-URL / provider / custom-endpoint option in the official parameter and configuration references.

  • Common confusion: the Cursor editor (IDE) supports custom models with API Key + Base URL — that is an editor feature; the CLI has no equivalent.

Alternatives

If you want a terminal coding agent with CodeGateway models:

If you still want Cursor's model capabilities (outside the CLI), you can set a custom model with your own API key inside the Cursor editor — that is outside this doc hub's scope.

Possible future changes

If Cursor opens custom model endpoints for the CLI, this page will be updated immediately.

FAQ

Q: What is the Cursor CLI command? The installed binary is agent (e.g. agent "add a function"). Install: curl https://cursor.com/install -fsS | bash.

Q: I set a custom Base URL in the Cursor editor — does the CLI inherit it? No. The CLI and editor have separate configuration.

Q: Cursor official models only? Yes. The CLI model list covers account-available models (agent models); it cannot point at third-party endpoints.

References

Turn this doc into a real API call

Lacking an official key or facing overseas card payment issues? Create an sk-cg- key after signing up, point your base URL at CodeGateway, and keep your existing SDK or CLI unchanged. Pay per token; binding a card adds free credit.

Sign up free
Author:CodeGateway Team