TUI and CLI for organizing git repositories across multiple providers (e.g. GitHub, GitLab).
go install -ldflags="-X main.version=installed-with-go-install" github.com/wmalik/ogit/cmd/ogit@latest
go build -ldflags="-X main.version=local-build" -o ogit cmd/ogit/main.go
Download a pre-built binary for your platform here
Add [ogit]
sections to ~/.gitconfig
.
Config for GitHub repositories (using ssh-agent)
[ogit]
storagePath = /absolute/path/on/disk
fetchUserRepos = false
sshAuth = ssh-agent
[ogit "github"]
orgs = tpope, charmbracelet
Config for GitHub and GitLab repositories (using ssh-agent)
[ogit]
storagePath = /absolute/path/on/disk
fetchUserRepos = false
sshAuth = ssh-agent
[ogit "github"]
orgs = tpope, charmbracelet
[ogit "gitlab"]
orgs = fdroid
Config for user's repositories only (using ssh-agent)
[ogit]
storagePath = /absolute/path/on/disk
fetchUserRepos = true
sshAuth = ssh-agent
Config for GitHub and GitLab repositories (using private SSH key)
[ogit]
storagePath = /absolute/path/on/disk
fetchUserRepos = false
sshAuth = /absolute/path/to/privatekey
[ogit "github"]
orgs = tpope
[ogit "gitlab"]
orgs = fdroid
The sshAuth
attribute in ~/.gitconfig
is used to perform the "git clone"
operation for both Github and GitLab repositories.
An SSH key pair must be available on the host machine and associated with the
GitHub and GitLab accounts. The SSH key pair can be fetched from either an
ssh-agent or from a file on disk. If the private key is protected with
a passphrase, the only way to use it is through ssh-agent.
Personal access tokens for GitHub/GitLab must be configured via the following environment variables:
GITHUB_TOKEN
(withrepo
scope)GITLAB_TOKEN
(withread_api
scope)
The tokens can be generated here and here.
ssh-add ~/.ssh/your_private_key
export GITHUB_TOKEN="yourpersonalaccesstoken_with_full_repo_access"
export GITLAB_TOKEN="yourtoken_with_read_api_scope"
ogit fetch && ogit
ogit clone --org tpope
ogit clone --org tpope --filter vim
cd /your_ogit_storage_path/github/charmbracelet/bubbletea
ogit pulls
ogit web
ogit org
ogit issues
ogit actions
ogit releases
ogit settings