66b4decdd1
This PR adds a [devbox](https://www.jetpack.io/devbox/) config to the repo. This may be beneficial to anyone interested in nix but doesn't want to deal with the language, or anyone interested in an easy way to start development for `tea`. With `devbox` installed, `devbox shell` should drop you into a shell with `go 1.20.x`, `gopls` (language server), and `make` for build targets available. I didn't want to duplicate all of our Makefile, but I did add a single script `devbox run build` because it also has the packages above available, so at the very least a user with `devbox` should be able to build the project. We don't have CGO, so nothing extra should be required that I can think of, and our linters are invoked via `go run` so they should also work since the `go` package would be available. ----- As a quick note, I am more familiar with nix itself than I am with devbox, but I think this could potentially help anyone wanting to quickly contribute. If you want to get really meta and are a nix user, you could even run `nix run nixpkgs#devbox shell` to drop into the shell. Another alternative would be to write an actual flake with a devShell, however I think `devbox` is a nice in-between. Anyone comfortable with nix can probably whip up a dev environment fairly easily without `devbox`. Co-authored-by: techknowlogick <techknowlogick@noreply.gitea.com> Reviewed-on: https://gitea.com/gitea/tea/pulls/572 Co-authored-by: jolheiser <john.olheiser@gmail.com> Co-committed-by: jolheiser <john.olheiser@gmail.com> |
||
---|---|---|
.devcontainer | ||
.gitea | ||
cmd | ||
contrib | ||
docs | ||
modules | ||
.changelog.yml | ||
.dockerignore | ||
.gitignore | ||
.goreleaser.checksum.sh | ||
.goreleaser.yaml | ||
.revive.toml | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
DCO | ||
Dockerfile | ||
FEATURE-COMPARISON.md | ||
LICENSE | ||
Makefile | ||
README.md | ||
build.go | ||
demo.gif | ||
devbox.json | ||
devbox.lock | ||
go.mod | ||
go.sum | ||
main.go | ||
renovate.json5 |
README.md
T E A
The official CLI for Gitea
tea - command line tool to interact with Gitea
version 0.8.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 & 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.
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
comment, c Add a comment to an issue / pr
HELPERS:
open, o Open something of the repository in web browser
notifications, notification, n Show notifications
clone, C Clone a repository locally
SETUP:
logins, login Log in to a Gitea server
logout Log out from a Gitea server
shellcompletion, autocomplete Install shell completion for tea
whoami Show current logged in user
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://about.gitea.com.
- Compare features with other git forge CLIs
- tea uses code.gitea.io/sdk and interacts with the Gitea API.
Installation
There are different ways to get tea
:
-
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-git, thirdparty)
- alpine linux (tea, thirdparty)
- macOS via
-
Use the prebuilt binaries from dl.gitea.io
-
Install from source: see Compilation
-
Docker (thirdparty): tgerczei/tea
-
asdf (thirdparty): mvaldes14/asdf-tea
Compilation
Make sure you have a current go version installed (1.13 or newer).
-
To compile the source yourself with the recommended flags & tags:
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. If you want to install the compiled program you have to execute the following command:
make install
This installs the binary into the "bin" folder inside of your GOPATH folder (
go env GOPATH
). It is possible that this folder isn't in your PATH Environment Variable. -
For a quick installation without
git
&make
, set $version and exec:go install code.gitea.io/tea@${version}
Contributing
Fork -> Patch -> Push -> Pull Request
make test
run testsuitemake vet
run checks (check the order of imports; preventing failure on CI pipeline beforehand)- ... (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.