Metadata-Version: 2.4
Name: git-tunnel
Version: 0.1.0
Summary: Visualize git history as per-machine tunnels in your terminal
License: MIT
License-File: LICENSE
Keywords: developer-tools,git,multi-machine,terminal,visualization
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Version Control :: Git
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# git-tunnel

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

If you work across multiple machines — a MacBook, a Workstation, a Server — git
log treats them all the same. `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

```bash
pip install git-tunnel
```

Or with `uv`:
```bash
uv tool install git-tunnel
```

---

## Setup (once per machine)

Run the interactive setup:
```bash
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:
```bash
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:
```bash
# 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
