1.9 KiB
sidebar_position, slug
| sidebar_position | slug |
|---|---|
| 1 | / |
Gitea CLI
gt is the official command line client for Gitea. It works with repositories, issues, pull requests, releases, Actions workflows and runs, packages, and the other resources of a Gitea instance, from a terminal or from a script.
:::info Development version
These pages describe builds from the main branch of gitea/cli, published as nightly
binaries and images.
:::
Requirements
- Gitea 28 or later. gt does not support older instances.
- Git on the
PATH, for the commands that clone, check out or push, such asgt repo cloneandgt pr checkout.
Getting started
-
Log in to your Gitea instance:
gt auth login -
Run commands from a clone of a repository on that instance. gt finds the repository and the instance from the Git remotes:
gt issue list --label bug gt pr checkout 13 gt pr checks --watchOutside a clone, select the repository with
--repo(-R), asOWNER/REPOor as a URL:gt issue view 42 --repo gitea.com/gitea/cli
gt doctor checks the setup that commands in the current directory use: the settings
files, the instance, the account and its credential, the repository, and Git. Each
problem it reports comes with the command that fixes it.
Commands
Commands are a noun followed by a verb, such as gt issue list or gt pr create.
Every command has a --help page, which is also part of the
command reference. Besides the commands, gt has three help topics:
gt help environment: global flags, environment variables, and how gt selects the instance and the repositorygt help formatting: JSON output with--jsonand--jqgt help exit-codes: the exit codes
For scripts and CI, read Using gt in CI and Output and scripting.