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.
| 1 | bun install -g @gitcafe/cli |
| 2 | cafe 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
| 1 | cafe auth login |
| 2 | cafe auth http setup |
| 3 | cafe 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.
| 1 | cafe issue list --repo acme/project |
Script with the CLI
--jsonprints structured output; progress and errors go to stderr.--no-inputfails instead of prompting;--yesconfirms destructive actions.cafe api <path>sends an authenticated request to any REST API endpoint.cafe completion zsh(orbash,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.