Skip to main content

git-proj

Discover, track, and sync Git repos across GitHub, GitLab, and Gitea from one CLI.

Why

If you juggle between different projects and work across multiple Git foundries — GitHub, a company GitLab, a self-hosted Gitea — you may lose track of what lives where and what you've been working on recently.

git-proj gives you one place to discover repos via APIs, pick which ones to track, and keep them synced locally.

Install

Requires Python 3.11+ and uv.

uv tool install git-proj

Or from source:

git clone https://github.com/sjev/git-projects.git
cd git-projects
uv sync --frozen

The CLI command is gpr.

Quick start

# Create config with default foundries
gpr config init

# Edit ~/.local/share/git-projects/config.yaml to add your API tokens

# Fetch all repos from configured foundries
gpr fetch

# Browse what's available (tracked projects are highlighted with their path)
gpr list
gpr list myproject    # filter by name

# Track a repo by name (resolved from index) or URL
gpr track my-repo
gpr track git@github.com:user/repo.git

# Clone missing repos, pull & push existing ones
gpr sync

# Stop tracking
gpr untrack my-repo

Commands

Command Description
config init Create default config file
config show Show config path and contents
fetch [foundry] Fetch repos from foundry APIs, save to local index
list [query] Browse indexed repos (tracked projects highlighted with path)
track <name|url> [--path] Add a project to tracking
untrack <name> Remove a project from tracking
sync [--workers N] Clone missing repos, pull & push existing tracked repos
info Show version, paths, and repo counts

Configuration

Config lives at $XDG_DATA_HOME/git-projects/ (typically ~/.local/share/git-projects/):

config.yaml      # foundries, clone_root, credentials — never share this
projects.json    # tracked projects (portable, no secrets)
index.json       # cached repo metadata from last fetch

Example config.yaml:

clone_root: ~/projects
clone_url_format: ssh    # or "https"
foundries:
  - name: github
    type: github
    token: ghp_...
  - name: my-gitea
    type: gitea
    url: https://gitea.example.com
    token: ""

Multi-machine setup

projects.json is portable (relative paths, no secrets). Copy it between machines:

scp ~/.local/share/git-projects/projects.json other-machine:~/.local/share/git-projects/
gpr sync

Development

uv sync --group dev
uv run invoke lint      # ruff check + ruff format --check + mypy
uv run invoke test      # pytest with coverage
uv run invoke format    # ruff format

Versioning

Bump the version with bump-my-version:

uv run invoke bump           # patch: 0.1.0 → 0.1.1
uv run invoke bump --part minor  # minor: 0.1.0 → 0.2.0
uv run invoke bump --part major  # major: 0.1.0 → 1.0.0

Each bump updates pyproject.toml, creates a git commit, and tags the release.

License

MIT

Metadata

Release files for git-proj 0.6.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for git-proj 0.6.4
File Size Uploaded
git_proj-0.6.4.tar.gz 11.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for git-proj 0.6.4
File Interpreter ABI Platform
git_proj-0.6.4-py3-none-any.whl Python 3 none any Details

Total release size: 29.5 kB

Release files / git_proj-0.6.4.tar.gz

Download URL git_proj-0.6.4.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
27c11f2a382151a65e3963fbf3be648b72abcba9f651fa7e05618ca3913e58bc
BLAKE2b-256 checksum
How to use checksums
fed6def46eea25ddde4e5ab060214e5b0498e4beebbf23246aa19a26ee62a6ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.8

Release files / git_proj-0.6.4-py3-none-any.whl

Download URL git_proj-0.6.4-py3-none-any.whl
Size 17.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
361a4730182f70a9c20937c676c6382c5a754909f019afe8199ea8374e2ab0e2
BLAKE2b-256 checksum
How to use checksums
32b3898c0e1dd3c220245182d67d45c4967eb24ac8b050631d2784960288cb6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.8

Release history Release notifications | RSS feed

This release

0.6.4 This release

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page