Skip to main content

gix

Manage multiple git sub-repos without constantly cd-ing into their folder first.

Installation

Requires Python 3.12+.

pip install --upgrade gix-cli
gix --install-completion

Check your installed version:

gix --version

Getting started

Run this once in the parent directory that holds your sub-repos:

gix init

This creates a gix.toml file in the current folder, which is where all your registered aliases will be stored.

If you already have git repos sitting in subfolders and want to register them all at once:

gix init --fetch

To wipe an existing gix.toml and start over:

gix init --overwrite

Managing aliases

Add the repo in your current working directory as an alias:

cd path/to/some-repo
gix alias add backend

List all registered aliases:

gix alias list

Rename an alias:

gix alias rename backend api

Remove an alias (this only removes it from gix.toml, the repo itself is untouched):

gix alias delete api

Running git commands

Once a repo is registered under an alias, run any git command against it from anywhere inside the parent tree:

gix backend status
gix backend pull
gix backend log -5

gix looks up the alias, finds the matching repo path, and runs git <your arguments> there

How it works

result = subprocess.run(["git", *git_args], cwd=engine.read()["repos"].get(alias))

Notes

  • gix doesn't do anything to your actual git repos. Tt only manages the alias-to-path mapping.
  • If gix.toml gets deleted or corrupted, just run gix init again.

A few words on autocompletion

gix exposes its own commands as well as aliases where appropriate via

gix --install-completion

Make sure your terminal is compatible with autocompletion that goes beyond file system references.

Where it get's more complicated is with exposing native git autocompletion through gix, to stay branch-aware for example.

The native git-completion.bash is over 4000 lines long and doesn't expose the completion for external use.
After long debates the decision was made to emulate a native terminal running git in the working directory, simulating a [TAB] press and exposing the result through gix.
This comes with performance and latency problems but at least in bashed based environments it's practical and feasible.
The absolute pain of 1970s development decisions when it comes to terminals is thankfully handled by pexpect and the windows equivalent winpty.

  1. Verify git autocompletion works on your machine:
    • Windows: PowerShell with posh-git installed.
    • Linux/macOS: Bash with bash-completion and Git completion enabled.
    • This step is unique to your system, we expect you to already have this setup.
  2. Try it out
  • gix backend checko<TAB> should be replaced to gix backend checkout
  • This process might be very slow on Windows because PowerShell starup time and dialogue can sometimes take over 1 second.

Currently looking for alternatives to this / caching while still staying aware to git branches

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gix_cli-3.0.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gix_cli-3.0.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file gix_cli-3.0.0.tar.gz.

File metadata

  • Download URL: gix_cli-3.0.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for gix_cli-3.0.0.tar.gz
Algorithm Hash digest
SHA256 5743f4ae31ff24e0d2b2c237d183adcb237c475b1ef5c1700ca9478cc9444057
MD5 576cd31471e4ac16c7435c3e98ec9fed
BLAKE2b-256 7b4dc93dbba98016158788d5db6ef31d01149ff9d0c393bbe818077a6e29d166

See more details on using hashes here.

Provenance

The following attestation bundles were made for gix_cli-3.0.0.tar.gz:

Publisher: release.yml on DevTool-Superset/gix

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gix_cli-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: gix_cli-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for gix_cli-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35a2358355a3fcb7ee82ab822bda0b117a0636850b54e78e6c9d472c71e6399f
MD5 485b69cedd1e64d4d7e8f2a59c62b616
BLAKE2b-256 cb5c82745849ad0950081920dc62b4aeb1a49c44ea23d7e19fb5b9978253ee96

See more details on using hashes here.

Provenance

The following attestation bundles were made for gix_cli-3.0.0-py3-none-any.whl:

Publisher: release.yml on DevTool-Superset/gix

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

3.0.0 This release

2 files

2.0.0

2 files

1.1.0

2 files

1.0.0

2 files

0.1.2

2 files

0.1.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page