Skip to content

Git Forge API Clients

License

Notifications You must be signed in to change notification settings

tslight/lazygit.go

Repository files navigation

CI Result Go Report Card Go Reference

GitHub & GitLab API Clients

Clone, pull or view the status of all your projects/repos in one fell swoop.

For GitLab you can limit this to only certain groups.

Installation

go install github.com/tslight/lazygit.go/cmd/gitlab@latest
go install github.com/tslight/lazygit.go/cmd/github@latest

Or just run go install ./... from within this repository.

Alternatively, download a suitable pre-compiled binary for your architecture and operating system from the Releases page and move it to somewhere in your $PATH.

There is also a flake.nix in this directory, if you know what that is & want to briefly access gitlab and github binaries, just run:

nix shell github:tslight/lazygit.go

GitHub CLI Usage

Usage: github

With no arguments will clone or pull all projects that can be accessed with
your API token to a specified directory.

The API token & directory belong in a JSON configuration file, which will live
in one of the following locations depending on your OS:

macOS:     $HOME/Library/Application Support/lazygit
Linux/BSD: $XDG_CONFIG_HOME/lazygit (usually $HOME/.config)
Windows:   %APPDATA%\lazygit (usually C:\Users\%USER%\AppData\Roaming)
Fallback:  $HOME/.config

If a JSON configuration file doesn't exist you will be prompted to enter an API
token and a directory. Those choices will be saved to a JSON file the
aforementioned directory.

  -s    only show status of local repos
  -v    print version info

GitLab CLI Usage

Usage: gitlab [GROUP...]

With no arguments will clone or pull all projects that can be accessed with
your API token to a specified directory.

The API token & directory belong in a JSON configuration file, which will live
in one of the following locations depending on your OS:

macOS:     $HOME/Library/Application Support/lazygit
Linux/BSD: $XDG_CONFIG_HOME/lazygit (usually $HOME/.config)
Windows:   %APPDATA%\lazygit (usually C:\Users\%USER%\AppData\Roaming)
Fallback:  $HOME/.config

If a JSON configuration file doesn't exist you will be prompted to enter an API
token and a directory. Those choices will be saved to a JSON file the
aforementioned directory.

Optional [GROUP...] arguments will only clone or pull the projects found in
those groups.

  -s    only show status of local repos
  -v    print version info