Getting started

Install the CLI

cafe is GitCafe's command-line tool. It signs you in, sets up Git credentials, and manages repositories, pull requests, stacks, issues and more from the terminal. Every command is listed in the CLI reference.

Install

cafe needs Bun 1.2 or newer; it does not run under Node.js.

sh
1bun install -g @gitcafe/cli
2cafe version

To try it without installing, run bunx @gitcafe/cli --help. When a newer release is out, cafe prints a one-line notice; upgrade with bun install -g @gitcafe/cli@latest.

Sign in

sh
1cafe auth login
2cafe auth http setup
3cafe auth status

cafe auth login shows a code and opens your browser to approve the sign-in. The login lasts 90 days. cafe auth http setup lets Git use it for HTTPS remotes.

On a server without a browser, set CAFE_TOKEN to a personal access token instead. It takes precedence over a stored login.

Pick the repository

Inside a clone, commands use that repository. Elsewhere, pass --repo owner/name or set CAFE_REPO.

sh
1cafe issue list --repo acme/project

Script with the CLI

  • --json prints structured output; progress and errors go to stderr.
  • --no-input fails instead of prompting; --yes confirms destructive actions.
  • cafe api <path> sends an authenticated request to any REST API endpoint.
  • cafe completion zsh (or bash, fish, powershell) prints a shell completion script.

Use another GitCafe server

The CLI talks to https://git.cafe/api by default. For another server, set CAFE_HOST to its API address or pass --host with every command. Logins are stored per server.

Read as MarkdownGitCafe documentation
Documentation