Review code by Cursor CLI without API Key

Hi everyone,

I have an idea to use Cursor CLI on a local CI machine to automatically review pull requests against the entire codebase, allowing for deeper and more contextual code reviews.

Right now, my company account only has the standard plan (500 requests/month) and does not provide an API key, so I’m unable to authenticate through the API in CI. Because of that, I tried logging into my Cursor account directly on the CI machine and running the CLI from there.

However, when the workflow is triggered from GitHub Actions, the CLI asks me to log in again, which breaks the automation.

Has anyone here implemented something similar—using Cursor CLI for automated PR reviews in CI without an API key? If so, how did you handle authentication so that the workflow can run non-interactively?

Any suggestions or experiences would be greatly appreciated.

Hey Quang!

Speaking for Cursor, I can’t really advise on any hacks to get this working — the CLI requires an API key for non-interactive use.

That said, your team admins can provision an API key or enable personal API keys from the dashboard. It might just be a case of them not realizing it’s turned off!

If your company hasn’t explicitly approved Cursor for non-interactive/CI use, I’d be cautious about setting this up on your own using a workaround. You don’t want to end up on the wrong side of your security team by running credentials through pipelines they haven’t signed off on.

Thank you for your reply
I have asked them about it and hope they will approve my request