Skip to main content

Visualize git history as per-machine tunnels in your terminal

Project description

git-tunnel

Visualize your git history as per-machine tunnels in the terminal.

If you work across multiple machines like me — a MacBook, a Workstation, a Server — git log treats them all the same which can be very annoying at some points. git-tunnel splits each machine into its own colored column so you can see at a glance where every commit was made.

────────────────────────────────────────────────────────────────────────────────
  TIME              │ pre git-tunnel                       │ MacBook                              │ Workstation                          │ HASH
────────────────────────────────────────────────────────────────────────────────
  2 hours ago       │ · · · · · · · · · · · · · ·          │ WIP: invoice route                   │ · · · · · · · · · · · · · ·          │ 2c4930f
  3 hours ago       │ · · · · · · · · · · · · · ·          │ · · · · · · · · · · · · · ·          │ finished validation                  │ 6f46c9f
  1 day ago         │ added model                          │ · · · · · · · · · · · · · ·          │ · · · · · · · · · · · · · ·          │ fd7bcad
  1 day ago         │ initial setup                        │ · · · · · · · · · · · · · ·          │ · · · · · · · · · · · · · ·          │ f3bc95b
────────────────────────────────────────────────────────────────────────────────

  ■ pre git-tunnel   ■ MacBook   ■ Workstation

Commits made before git-tunnel was installed appear in a plain white pre git-tunnel column — no history rewriting, no warnings.


Install

The recommended way to install git-tunnel is with pipx or uv — both install it into an isolated environment and expose the git-tunnel command globally. This avoids the externally-managed-environment error you get with bare pip on Ubuntu 23.04+ and other modern Linux distros.

pipx (recommended for most users):

pipx install git-tunnel

uv (if you already use uv):

uv tool install git-tunnel

pip (virtualenv or older systems only):

pip install git-tunnel

On Ubuntu 23.04+, Debian 12+, and similar distros, using pip install system-wide will likely fail with an externally-managed-environment error. Use pipx or uv tool install instead.

Don't have pipx? Install it first:

# Ubuntu / Debian
sudo apt install pipx
pipx ensurepath

# macOS
brew install pipx
pipx ensurepath

Setup (once per machine)

Run the interactive setup:

git-tunnel install

This will:

  • Ask for a device name (e.g. MacBook, Workstation, Server)
  • Set git config --global user.device
  • Install the prepare-commit-msg hook globally
  • Point git config --global core.hooksPath at the hook

From this point on, every commit you make will automatically get a [device:YourDevice] tag appended to the message — silently, without you doing anything.


Usage

Inside any git repo:

git-tunnel

How it works

git-tunnel uses a global prepare-commit-msg hook that appends a [device:X] tag to every commit message, where X comes from git config --global user.device.

Your user.name is never touched — it stays clean for collaboration. The device tag lives in the commit message body and is stripped from the display in the tunnel view.


Multiple machines

Set a different device name on each machine:

# MacBook
git-tunnel install  # enter "MacBook" when prompted

# Workstation
git-tunnel install  # enter "Workstation" when prompted

# Server
git-tunnel install  # enter "Server" when prompted

Since the hook is global, it applies to every repo on that machine automatically.


Zero dependencies

git-tunnel uses only the Python standard library and git itself. No third-party packages required.


License

MIT

Project details


Download files

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

Source Distribution

git_tunnel-0.1.1.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

git_tunnel-0.1.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file git_tunnel-0.1.1.tar.gz.

File metadata

  • Download URL: git_tunnel-0.1.1.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for git_tunnel-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f24c9b7d6a879068c36b8c7139347677e57c71df4728d57da70306c0656fbff2
MD5 adad2a137ebfc2526be82552569be536
BLAKE2b-256 97e9aa5cad8459cc2a3f1fdf2e2ff4b6004dcd2e86694a85e69e8c5242842e75

See more details on using hashes here.

Provenance

The following attestation bundles were made for git_tunnel-0.1.1.tar.gz:

Publisher: publish.yml on YounesHB92/git-tunnel

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

File details

Details for the file git_tunnel-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: git_tunnel-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for git_tunnel-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 995fbb25eaae2b79cae88a05cc8212a7882562a3947881fa37632732060e29d1
MD5 717417878d9b4015f4160f3e65495217
BLAKE2b-256 b2ab30e9138a7602930dec17fd57295bf3f609509d55a43bb5290f22eefd9231

See more details on using hashes here.

Provenance

The following attestation bundles were made for git_tunnel-0.1.1-py3-none-any.whl:

Publisher: publish.yml on YounesHB92/git-tunnel

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

Supported by

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