Reference

CLI reference

Every cafe command, grouped by area. Run cafe <command> --help for all of a command's options. To install the CLI and sign in, see install the CLI.

Global options

OptionEffect
--repo <owner/name>Repository to act on (default: the current clone)
--host <url>GitCafe API address (default https://git.cafe/api)
--jsonPrint structured JSON on stdout
--format pretty|markdown|jsonChoose the output format
--yesConfirm destructive actions without asking
--no-inputFail instead of prompting
--no-browserNever open a browser
--no-update-checkDo not check for a newer release
Environment variableEffect
CAFE_HOSTSame as --host
CAFE_REPOSame as --repo
CAFE_TOKENA token to use instead of the stored login
CAFE_NO_UPDATE_CHECKSame as --no-update-check

Authentication

CommandDoes
cafe auth loginSign in through the browser (device sign-in)
cafe auth statusShow who you are signed in as
cafe auth logoutRemove the stored login (--all for every server)
cafe auth http setupLet Git use your login for HTTPS remotes
cafe auth http statusCheck the Git credential setup
cafe auth ssh setupFind and register your SSH key, optionally set up signing
cafe auth ssh list|add|removeManage SSH authentication keys
cafe auth setupConfigure HTTPS and SSH in one step, without prompts
cafe auth token list|create|view|rotate|revokeManage personal access tokens
cafe signing ssh list|add|removeManage SSH signing keys
cafe signing gpg list|add|removeManage GPG keys

Managing tokens and keys needs the optional credential-management permission when you sign in.

Repositories

CommandDoes
cafe repo listList repositories you can access
cafe repo create <name>Create a repository (--private, --org, --clone)
cafe repo view [owner/name]Show a repository
cafe repo clone <owner/name> [dir]Clone a repository
cafe repo editChange description, topics, visibility, default branch
cafe repo fork [owner/name]Fork a repository
cafe repo syncUpdate a fork's default branch from its parent
cafe repo compare-upstreamShow how far a fork is ahead or behind
cafe repo forksList a repository's forks
cafe repo transfer <owner/name> <new-owner>Transfer a repository
cafe repo delete <owner/name>Delete a repository
cafe repo star|unstar|stargazers|starredManage and list stars
cafe repo archive <branch|tag|commit> <ref>Write a tar.gz snapshot to stdout
cafe repo collaborator list|add|removeManage collaborators
cafe repo ruleset list|view|create|edit|deleteManage rulesets (--org, --team for inherited ones)
cafe repo ruleset effective <branch>Show the rules that apply to a branch
cafe repo branch-role list|assign|revokeManage per-branch roles

Code

CommandDoes
cafe repo code tree [path]List files
cafe repo code blob <path>Print a file (--raw for the bytes)
cafe repo code commitsList commits
cafe repo code commit <sha>Show a commit and its diff
cafe repo code compare <base>..<head>Compare two revisions (--patch)
cafe repo code refsList branches and tags
cafe repo code search <pattern>Search code
cafe repo code status <sha>Show a commit's combined check status

Branches and tags

CommandDoes
cafe branch listList branches (--deleted for deleted ones)
cafe branch delete <name>Delete a branch
cafe branch restore <name>Restore a deleted branch
cafe tag listList tags
cafe tag view <name>Show a tag
cafe tag delete <name>Delete a tag
cafe repo ref-deletion list|view|inspectCheck the result of branch and tag deletions

Pull requests

CommandDoes
cafe pr listList pull requests (--state)
cafe pr createOpen a pull request from the current branch
cafe pr view <number>Show a pull request
cafe pr checkout <number>Check out a pull request's branch
cafe pr edit <number>Change the title, description or target (--base)
cafe pr diff <number>List changed files (--patch, --path)
cafe pr commits <number>List the commits
cafe pr status [number]Show reviews, checks and mergeability
cafe pr ready <number>Check merge readiness against rulesets
cafe pr merge <number>Merge (--strategy merge|squash|rebase|fast-forward)
cafe pr close <number>Close without merging
cafe pr review <number>Submit a review (--approve, --request-changes, --comment)
cafe pr reviews <number>List reviews
cafe pr review-view|review-dismissShow or dismiss a review
cafe pr reviewer list|add|removeManage requested reviewers
cafe pr comments <number>List comments
cafe pr comment <number>Comment, or comment on a line with --path and --line
cafe pr comment-edit|comment-deleteEdit or delete a comment
cafe pr resolve|unresolveResolve or reopen a review thread
cafe pr milestone <number> [milestone]Set or clear the milestone
cafe pr lock|unlock <number>Lock or unlock the conversation
cafe pr links|link|unlinkManage linked issues

Stacks

See stacked pull requests.

CommandDoes
cafe stack submitPush local commits as a stack of pull requests (--name, --base, --dry-run)
cafe stack link <pulls…>Link existing pull requests into a stack, bottom first
cafe stack listList stacks
cafe stack status [pull]Show the stack containing a pull request
cafe stack merge [pull]Land the stack up to a pull request (--stack for all)
cafe stack restackRebase the stack onto its updated base
cafe stack close [pull]Close the stack and its open pull requests

Issues and milestones

CommandDoes
cafe issue listList issues (--state, --label, --assignee)
cafe issue createCreate an issue
cafe issue view <number>Show an issue
cafe issue edit <number>Change title, body, state, priority or due date
cafe issue close <number>Close an issue as completed
cafe issue comments|commentList or add comments
cafe issue comment-edit|comment-deleteEdit or delete a comment
cafe issue assign|unassignManage assignees
cafe issue label list|create|edit|deleteManage the repository's labels
cafe issue label add|removeLabel or unlabel an issue
cafe issue milestone <number> [milestone]Set or clear the milestone
cafe issue pin|unpinPin an issue
cafe issue lock|unlockLock or unlock the conversation
cafe issue links|link|unlinkManage linked pull requests
cafe milestone list|view|create|edit|close|reopen|deleteManage milestones

CI

CommandDoes
cafe ci listList runs (--pr, --branch, --commit)
cafe ci view <run>Show a run
cafe ci statusShow runs for a pull request, branch or the latest
cafe ci watch <run>Wait until a run finishes
cafe ci jobs <run>List a run's jobs
cafe ci logs <run> --job <job>Print or save a job log (--full, --tail, --output)
cafe ci binding list|view|create|edit|deleteConnect pipelines to a repository
cafe integration list|view|create|edit|delete <org>Manage Buildkite integrations

Webhooks

The target is an organization slug or owner/repo. See webhooks.

CommandDoes
cafe webhook list|view <target>List or show webhooks
cafe webhook create|edit|delete <target>Manage webhooks
cafe webhook rotate-secret <target> <id>Replace the signing secret
cafe webhook ping <target> <id>Send a signed test ping
cafe webhook capabilities|readinessCheck supported events and readiness
cafe webhook deliveries|dead-letter|attemptsInspect delivery history
cafe webhook redeliver <target> <id> <delivery>Send a failed event again

Organizations and teams

CommandDoes
cafe org list|view|create|edit|deleteManage organizations
cafe org member list|set|remove <org>Manage members
cafe org invitation list|create|delete <org>Manage invitations
cafe org invitation accept <org>Accept an invitation
cafe team list|create|view|edit|reparent|delete <org>Manage teams
cafe team member list|set|remove <org> <team>Manage team members
cafe team repos <org> <team>List a team's repositories
cafe team repo create <org> <team> <name>Create a repository for a team

Profile

CommandDoes
cafe profile view [handle]Show a public profile
cafe profile editEdit your profile
cafe profile pinsList your pinned repositories
cafe profile pin <repos…>Replace your pinned repositories

Other commands

CommandDoes
cafe api <path>Send an authenticated API request
cafe config get|set|unset|listRead and write settings such as stack.vcs
cafe skills list|show|installInstall cafe skills for coding agents
cafe completion <shell>Print a shell completion script
cafe versionShow the version (--check for the latest)
Read as MarkdownGitCafe documentation
Documentation