Go to file
Norwin 5b77345b03 Add tea repo fork (#410)
Adds a new subcommand to fork repos.

To specify the repo to fork, use the `--repo` flag. This feels a bit weird, other tea commands would put this as the first argument.
I decided to follow the flag style, as this is what all other subcommands of `tea repo` do. We might want to reconsider and make the primary subject of such commands an argument, instead of an required flag.. see #430

Co-authored-by: Norwin <git@nroo.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-on: https://gitea.com/gitea/tea/pulls/410
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
2021-10-14 15:27:39 +08:00
cmd Add tea repo fork (#410) 2021-10-14 15:27:39 +08:00
contrib Add command to install shell completion (#309) 2020-12-17 00:01:59 +08:00
modules fix lint regression (#425) 2021-10-05 01:43:06 +08:00
vendor Show issue reactions (#421) 2021-10-01 16:13:32 +08:00
.changelog.yml Changelog v0.6.0 (#289) 2020-12-14 20:33:54 +08:00
.dockerignore Makefile: add STATIC=true for static PIE builds (#349) 2021-09-24 00:01:07 +08:00
.drone.yml fix CI release upload: switch to woodpecker/plugin-s3 (#428) 2021-10-10 20:48:51 +08:00
.gitignore Add interactive mode for tea milestone create (#310) 2020-12-18 02:50:07 +08:00
.revive.toml Add Makefile / .drone.yml, use go module with vendor (#20) 2019-04-25 20:06:53 +03:00
build.go Update gitea-vet v0.2.0 (#164) 2020-07-21 16:17:52 +00:00
CHANGELOG.md Changelog v0.8.0 (#404) 2021-09-23 03:53:33 +08:00
CONTRIBUTING.md Update Docu to new Structure (#247) 2020-10-25 07:48:20 +08:00
DCO init project 2018-09-03 14:43:00 +08:00
demo.gif Proper help text & new README structure (#311) 2020-12-21 21:37:20 +08:00
Dockerfile Makefile: add STATIC=true for static PIE builds (#349) 2021-09-24 00:01:07 +08:00
FEATURE-COMPARISON.md Add feature comparison chart between forge CLIs (#294) 2020-12-15 12:59:49 +08:00
go.mod Show issue reactions (#421) 2021-10-01 16:13:32 +08:00
go.sum Show issue reactions (#421) 2021-10-01 16:13:32 +08:00
LICENSE init project 2018-09-03 14:43:00 +08:00
main.go Add tea whoami command (#426) 2021-10-05 01:41:59 +08:00
Makefile Makefile: add STATIC=true for static PIE builds (#349) 2021-09-24 00:01:07 +08:00
README.md Fix notification example (#416) 2021-09-29 03:29:48 +08:00

T E A

License: MIT Release Build Status Join the chat at https://img.shields.io/discord/322538954119184384.svg Go Report Card GoDoc

The official CLI for Gitea

demo gif

   tea - command line tool to interact with Gitea
   version 0.7.0-preview

 USAGE
   tea command [subcommand] [command options] [arguments...]

 DESCRIPTION
   tea is a productivity helper for Gitea.  It can be used to manage most entities on one
   or multiple Gitea instances and provides local helpers like 'tea pull checkout'.
   tea makes use of context provided by the repository in $PWD if available, but is still
   usable independently of $PWD. Configuration is persisted in $XDG_CONFIG_HOME/tea.

 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
   HELPERS:
     open, o                         Open something of the repository in web browser
     notifications, notification, n  Show notifications
   SETUP:
     logins, login                  Log in to a Gitea server
     logout                         Log out from a Gitea server
     shellcompletion, autocomplete  Install shell completion for tea

 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)
   while :; do tea notifications --mine -o simple | xargs -i notify-send {}; sleep 300; done

 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.

Installation

There are different ways to get tea:

  1. Install via your system package manager:

    • macOS via brew (gitea-maintained):
      brew tap gitea/tap https://gitea.com/gitea/homebrew-gitea
      brew install tea
      
    • arch linux (gitea-tea, thirdparty)
    • alpine linux (tea, thirdparty)
  2. Use the prebuilt binaries from dl.gitea.io

  3. Install from source (go 1.13 or newer is required):

    go get code.gitea.io/tea
    go install code.gitea.io/tea
    
  4. Docker (thirdparty): tgerczei/tea

Compilation

Make sure you have installed a current go version. To compile the sources yourself run the following:

git clone https://gitea.com/gitea/tea.git
cd tea
make STATIC=true

Contributing

Fork -> Patch -> Push -> Pull Request

  • make test run testsuite
  • make vet run checks (check the order of imports; preventing failure on CI pipeline beforehand)
  • make vendor when adding new dependencies
  • ... (for other development tasks, check the Makefile)

Please read the CONTRIBUTING documentation, it will tell you about internal structures and concepts.

License

This project is under the MIT License. See the LICENSE file for the full license text.