2020-04-25 20:04:05 +08:00
|
|
|
# <img alt='' src='https://gitea.com/repo-avatars/550-80a3a8c2ab0e2c2d69f296b7f8582485' height="40"/> *T E A*
|
2018-09-03 14:43:00 +08:00
|
|
|
|
2020-04-25 20:04:05 +08:00
|
|
|
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Release](https://raster.shields.io/badge/dynamic/json.svg?label=release&url=https://gitea.com/api/v1/repos/gitea/tea/releases&query=$[0].tag_name)](https://gitea.com/gitea/tea/releases) [![Build Status](https://drone.gitea.com/api/badges/gitea/tea/status.svg)](https://drone.gitea.com/gitea/tea) [![Join the chat at https://img.shields.io/discord/322538954119184384.svg](https://img.shields.io/discord/322538954119184384.svg)](https://discord.gg/Gitea) [![Go Report Card](https://goreportcard.com/badge/code.gitea.io/tea)](https://goreportcard.com/report/code.gitea.io/tea) [![GoDoc](https://godoc.org/code.gitea.io/tea?status.svg)](https://godoc.org/code.gitea.io/tea)
|
2020-01-03 08:58:45 +08:00
|
|
|
|
2020-12-21 21:37:20 +08:00
|
|
|
### The official CLI for Gitea
|
2020-04-25 20:04:05 +08:00
|
|
|
|
2020-12-21 21:37:20 +08:00
|
|
|
![demo gif](./demo.gif)
|
2020-04-25 20:04:05 +08:00
|
|
|
|
2018-09-03 14:43:00 +08:00
|
|
|
```
|
2020-12-21 21:37:20 +08:00
|
|
|
tea - command line tool to interact with Gitea
|
2021-12-03 02:33:56 +08:00
|
|
|
version 0.8.0-preview
|
2020-12-21 21:37:20 +08:00
|
|
|
|
|
|
|
USAGE
|
|
|
|
tea command [subcommand] [command options] [arguments...]
|
|
|
|
|
|
|
|
DESCRIPTION
|
2021-12-03 02:33:56 +08:00
|
|
|
tea is a productivity helper for Gitea. It can be used to manage most entities on
|
|
|
|
one or multiple Gitea instances & provides local helpers like 'tea pr checkout'.
|
|
|
|
|
|
|
|
tea tries to make use of context provided by the repository in $PWD if available.
|
|
|
|
tea works best in a upstream/fork workflow, when the local main branch tracks the
|
|
|
|
upstream repo. tea assumes that local git state is published on the remote before
|
|
|
|
doing operations with tea. Configuration is persisted in $XDG_CONFIG_HOME/tea.
|
2020-12-21 21:37:20 +08:00
|
|
|
|
|
|
|
COMMANDS
|
|
|
|
help, h Shows a list of commands or help for one command
|
|
|
|
ENTITIES:
|
|
|
|
issues, issue, i List, create and update issues
|
|
|
|
pulls, pull, pr Manage and checkout pull requests
|
|
|
|
labels, label Manage issue labels
|
|
|
|
milestones, milestone, ms List and create milestones
|
|
|
|
releases, release, r Manage releases
|
|
|
|
times, time, t Operate on tracked times of a repository's issues & pulls
|
|
|
|
organizations, organization, org List, create, delete organizations
|
|
|
|
repos, repo Show repository details
|
2021-12-03 02:33:56 +08:00
|
|
|
comment, c Add a comment to an issue / pr
|
2020-12-21 21:37:20 +08:00
|
|
|
HELPERS:
|
|
|
|
open, o Open something of the repository in web browser
|
|
|
|
notifications, notification, n Show notifications
|
2021-12-03 02:33:56 +08:00
|
|
|
clone, C Clone a repository locally
|
2020-12-21 21:37:20 +08:00
|
|
|
SETUP:
|
|
|
|
logins, login Log in to a Gitea server
|
|
|
|
logout Log out from a Gitea server
|
|
|
|
shellcompletion, autocomplete Install shell completion for tea
|
2021-12-03 02:33:56 +08:00
|
|
|
whoami Show current logged in user
|
2020-12-21 21:37:20 +08:00
|
|
|
|
|
|
|
OPTIONS
|
|
|
|
--help, -h show help (default: false)
|
|
|
|
--version, -v print the version (default: false)
|
|
|
|
|
|
|
|
EXAMPLES
|
|
|
|
tea login add # add a login once to get started
|
|
|
|
|
|
|
|
tea pulls # list open pulls for the repo in $PWD
|
|
|
|
tea pulls --repo $HOME/foo # list open pulls for the repo in $HOME/foo
|
|
|
|
tea pulls --remote upstream # list open pulls for the repo pointed at by
|
|
|
|
# your local "upstream" git remote
|
|
|
|
# list open pulls for any gitea repo at the given login instance
|
|
|
|
tea pulls --repo gitea/tea --login gitea.com
|
|
|
|
|
|
|
|
tea milestone issues 0.7.0 # view open issues for milestone '0.7.0'
|
|
|
|
tea issue 189 # view contents of issue 189
|
|
|
|
tea open 189 # open web ui for issue 189
|
|
|
|
tea open milestones # open web ui for milestones
|
|
|
|
|
|
|
|
# send gitea desktop notifications every 5 minutes (bash + libnotify)
|
2021-09-29 03:29:48 +08:00
|
|
|
while :; do tea notifications --mine -o simple | xargs -i notify-send {}; sleep 300; done
|
2020-12-21 21:37:20 +08:00
|
|
|
|
|
|
|
ABOUT
|
|
|
|
Written & maintained by The Gitea Authors.
|
|
|
|
If you find a bug or want to contribute, we'll welcome you at https://gitea.com/gitea/tea.
|
|
|
|
More info about Gitea itself on https://gitea.io.
|
2019-10-29 03:40:09 +08:00
|
|
|
```
|
|
|
|
|
2020-12-21 21:37:20 +08:00
|
|
|
- [Compare features with other git forge CLIs](./FEATURE-COMPARISON.md)
|
|
|
|
- tea uses [code.gitea.io/sdk](https://code.gitea.io/sdk) and interacts with the Gitea API.
|
2020-07-06 02:36:21 +08:00
|
|
|
|
2020-12-21 21:37:20 +08:00
|
|
|
## Installation
|
2020-12-17 00:01:59 +08:00
|
|
|
|
2020-12-21 21:37:20 +08:00
|
|
|
There are different ways to get `tea`:
|
2020-12-17 00:01:59 +08:00
|
|
|
|
2020-12-21 21:37:20 +08:00
|
|
|
1. Install via your system package manager:
|
|
|
|
- macOS via `brew` (gitea-maintained):
|
|
|
|
```sh
|
|
|
|
brew tap gitea/tap https://gitea.com/gitea/homebrew-gitea
|
|
|
|
brew install tea
|
|
|
|
```
|
2021-12-03 04:01:10 +08:00
|
|
|
- arch linux ([gitea-tea-git](https://aur.archlinux.org/packages/gitea-tea-git), thirdparty)
|
2020-12-21 21:37:20 +08:00
|
|
|
- alpine linux ([tea](https://pkgs.alpinelinux.org/packages?name=tea&branch=edge), thirdparty)
|
2019-04-26 19:51:03 +08:00
|
|
|
|
2020-12-21 21:37:20 +08:00
|
|
|
2. Use the prebuilt binaries from [dl.gitea.io](https://dl.gitea.io/tea/)
|
2019-04-26 19:51:03 +08:00
|
|
|
|
2021-12-03 04:01:10 +08:00
|
|
|
3. Install from source: [see *Compilation*](#compilation)
|
2018-09-03 14:43:00 +08:00
|
|
|
|
2020-12-21 21:37:20 +08:00
|
|
|
4. Docker (thirdparty): [tgerczei/tea](https://hub.docker.com/r/tgerczei/tea)
|
2019-04-13 01:44:53 +08:00
|
|
|
|
2019-04-25 22:16:57 +08:00
|
|
|
## Compilation
|
|
|
|
|
2021-12-03 04:01:10 +08:00
|
|
|
Make sure you have a current go version installed (1.13 or newer).
|
|
|
|
|
|
|
|
- To compile the source yourself with the recommended flags & tags:
|
|
|
|
```sh
|
|
|
|
git clone https://gitea.com/gitea/tea.git # or: tea clone gitea.com/gitea/tea ;)
|
|
|
|
cd tea
|
|
|
|
make
|
|
|
|
```
|
|
|
|
Note that GNU Make (gmake on OpenBSD) is required.
|
|
|
|
|
|
|
|
- For a quick installation without `git` & `make`:
|
|
|
|
```sh
|
|
|
|
go get code.gitea.io/tea
|
|
|
|
go install code.gitea.io/tea
|
|
|
|
```
|
2019-04-25 22:16:57 +08:00
|
|
|
|
2018-09-03 14:43:00 +08:00
|
|
|
## Contributing
|
|
|
|
|
|
|
|
Fork -> Patch -> Push -> Pull Request
|
|
|
|
|
2019-12-26 11:26:48 +08:00
|
|
|
- `make test` run testsuite
|
2020-12-06 09:24:06 +08:00
|
|
|
- `make vet` run checks (check the order of imports; preventing failure on CI pipeline beforehand)
|
2019-12-26 11:26:48 +08:00
|
|
|
- `make vendor` when adding new dependencies
|
|
|
|
- ... (for other development tasks, check the `Makefile`)
|
|
|
|
|
2020-10-25 07:48:20 +08:00
|
|
|
**Please** read the [CONTRIBUTING](CONTRIBUTING.md) documentation, it will tell you about internal structures and concepts.
|
2018-09-03 14:43:00 +08:00
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
This project is under the MIT License. See the [LICENSE](LICENSE) file for the
|
|
|
|
full license text.
|