Skip to main content

Command Palette

Search for a command to run...

Origin

Commands

Every origin command with its options, except pull requests, which have their own page: Pull request commands. To see the same information in your terminal, run origin --help for the command list or origin <group> --help for one group. To install the CLI, see Install the CLI.

The Origin CLI (origin) is separate from the Cursor Agent CLI (agent) documented under CLI.

Global options

These work with any command:

OptionDescription
--auth-tokenCursor auth token, used directly as a bearer token (also CURSOR_AUTH_TOKEN)
--endpointAPI server endpoint (default: https://origin.cursor.com)
--versionShow the installed version
--helpShow help for the current command

Command groups

CommandDescriptionUsage
authSign in, sign out, and configure git authenticationorigin auth login
repoCreate, list, view, clone, and delete repositoriesorigin repo create my-project
prCreate, review, and merge pull requestsorigin pr create
rulesetView Origin rulesets (merge-time and push-time). Alias: rsorigin ruleset list
ssh-keyManage SSH keys registered with your Origin accountorigin ssh-key list
api <endpoint>Make an authenticated request to the Origin REST API at api.cursor.com/v1/originorigin api /repos/{owner}/{repo}
completionPrint a bash or zsh tab-completion scriptorigin completion >> ~/.zshrc
updateUpdate origin to the current release on your channelorigin update
configManage configuration, including the release channelorigin config get-channel

Targeting a repository

Most commands infer the repository from the origin git remote in your current checkout. Override it with -R, --repo in org/name format:

origin pr list -R acme/checkout

Authentication

Manage your session and the git credential helper.

SubcommandDescriptionUsage
loginSign in through the browser and configure gitorigin auth login
setup-gitReconfigure the git credential helper for the Origin hostorigin auth setup-git
statusShow the current authentication method and accountorigin auth status
logoutClear stored credentialsorigin auth logout
CommandOptionDescription
login--api-key <key>Sign in with an API key instead of the browser flow. When CURSOR_API_KEY is set, origin auth login uses it without the flag
login--localConfigure the credential helper in this repository's git config instead of globally
setup-git--host <host>Origin git host to configure (default: derived from --endpoint / CURSOR_ORIGIN_ENDPOINT)
setup-git--globalApply to the global git config (default: true)
setup-git--localApply to this repository's git config instead of the global one

origin auth login also installs the git credential helper, so git push and git pull against Origin remotes work without further setup.

Repositories

SubcommandDescriptionUsage
create <repo>Create a repositoryorigin repo create acme/checkout
create-mirrored <github-repo>Create a Cursor mirror of a GitHub repositoryorigin repo create-mirrored acme/checkout
listList the repositories your account can accessorigin repo list
view [repo]Display a repositoryorigin repo view acme/checkout
clone <repo> [directory]Clone over HTTPS using your saved loginorigin repo clone acme/checkout
delete <repo>Delete a repositoryorigin repo delete acme/checkout

Pass org/name to target a repository. origin repo create <name> without a slash creates the repository in your account's namespace.

CommandOptionDescription
create--default-branch <branch>Default branch for the new repository (server default: main)
create-mirrored--namespace <namespace>Namespace to create the mirror under (default: your account's namespace)
create-mirrored--github-enterprise-id <uuid>GitHub Enterprise Server app UUID. Omit it when mirroring from github.com
list--namespace <namespace>List one namespace instead of every namespace you can access
view--json <fields>Output JSON with the fields you list, for example org,name,defaultBranch
delete-y, --yesSkip the confirmation prompt. Required in a non-interactive shell

Rulesets

View the merge-time and push-time rulesets configured for a repository:

SubcommandDescriptionUsage
listList rulesets configured for a repositoryorigin ruleset list
view <ruleset-id>View a ruleset by ID, as printed by origin ruleset listorigin ruleset view <id>

SSH keys

Manage the SSH public keys on your Origin account:

SubcommandDescriptionUsage
add [key-file]Add an SSH public key to your account. -t names the keyorigin ssh-key add ~/.ssh/id_ed25519.pub
listList the SSH public keys on your account (--json for JSON)origin ssh-key list
delete <id>Delete a key by ID, as printed by origin ssh-key listorigin ssh-key delete <id>

API requests

origin api makes an authenticated request to the Origin REST API at api.cursor.com/v1/origin for anything without a first-class command. It supports request flags similar to gh api: -X, --method, -H, --header, -F, --field, -f, --raw-field, --input, and -q, --jq. {owner}, {repo}, and {branch} placeholders expand from -R, --repo, the ORIGIN_REPO environment variable, or the origin git remote. See the Origin API docs for endpoints, authentication, and examples.

Updates

Update to the current release on your channel:

origin update

The CLI updates from the stable channel by default. Switch with origin config set-channel <latest|stable> and check with origin config get-channel.

Shell completion

Append the completion script to your shell config:

origin completion >> ~/.zshrc

Branch-valued flags such as --head and --base then complete local branch names.

Environment variables

VariableDescription
CURSOR_API_KEYAPI key for origin auth login. When set, login skips the browser flow
CURSOR_AUTH_TOKENBearer token, the same value as --auth-token
CURSOR_ORIGIN_ENDPOINTDefault API server endpoint, the same value as --endpoint
ORIGIN_REPODefault repository in org/name format for origin api when there is no origin remote
NO_COLORTurn off colored output

Getting help

Every command takes --help:

origin --helporigin repo --helporigin repo create --help

Next steps