livegit (lg) links your laptop to a GPU server: run any command on it with live output, and mount the full file tree so your editor opens it like a local folder. And let your coding agent do the same.
You have a server. You want to code on your laptop, run on the GPU, and see what happens — without SSH sessions, without rsync, without living in a remote shell.
Type lg before any command. It runs on the server in a real terminal. You see output as it arrives — training loss, test results, GPU stats — with colors, progress bars, and Ctrl-C. $? is the remote exit code.
lg mount makes the server's entire repo appear as a normal local folder — instantly, even for huge repos. Open it in VS Code. Files download when you open them. Changes you save sync back to the server in milliseconds.
lg run -d detaches the job from your session. It keeps running when your laptop sleeps, when you close the terminal, when the connection drops. Pick up the logs later with lg logs -f.
Agents like Claude Code can't SSH in, can't respond to Duo prompts, can't live in a remote shell. livegit solves this: mount the remote tree so the agent has real local files to read and edit, and let it call lg to run things on the server and see the output. lg init drops an AGENTS.md into your project — a complete operating manual that teaches the agent exactly how to drive livegit from the first prompt.
The agent uses its normal file tools on myrepo/. It's a real local folder. Saves sync to the server automatically.
The agent calls lg python train.py and reads the live output — loss, accuracy, errors — as the job runs on the server.
For multi-hour runs, the agent uses lg run -d. The job outlives the context window. It reconnects with lg logs -f.
Fix the bug, retrain, read the new results. The full loop runs without a human in the middle — because the server feels local.
Any command prefixed with lg runs on the server in the directory that matches your local cwd. The output streams to your terminal the moment it's written. When it finishes, $? is the remote exit code.
It's a real PTY, so tqdm progress bars render, pytest colors work, htop shows the remote CPU. Ctrl-C interrupts the remote process. No magic, no buffering — just SSH behavior without the SSH ceremony.
lg toggle makes every command go remote until lg locallg pytest && lg deploy.sh works as expected$ lg nvidia-smi A100 80GB 42°C 3.1/80 GB [idle] $ lg pytest -q ............ 12 passed in 0.4s $ echo $? 0 # toggle: every command goes remote $ lg toggle remote ↗ all commands → server $ python train.py # runs on GPU $ make test # also remote $ lg local # back to local
$ lg mount ✓ 3 196 files synced → myrepo/ # grep, find, diff — your native tools $ grep -r "learning_rate" myrepo/ configs/sweep.yaml: learning_rate: 3e-4 train.py: lr = config.learning_rate # edit locally, run on server — in order $ vim myrepo/configs/sweep.yaml $ lg python train.py $ lg unmount # or leave it mounted
lg mount makes the remote repo appear as a local folder. The full directory tree — every file, every folder, real sizes — is there the instant the mount starts, like OneDrive placeholder files. You don't wait for a sync to finish.
Open a file: its content downloads. Save a file: it's on the server within milliseconds. When you run lg python train.py after editing, livegit waits for any pending writes to land first — so you never race yourself.
When you close a terminal connected to a server, everything running in that SSH session dies — nohup, setsid, even tmux — because systemd tears down the session's cgroup. livegit routes around this.
lg run -d launches the job under systemd --user in a separate cgroup the SSH session can't touch. Your laptop can sleep. The connection can drop. The job keeps running. Come back hours later with lg logs -f and pick up where you left off.
lg logs -f stops following, never the jobdone(0) / done(1)lg jobs kill / lg jobs rm# fire and forget $ lg run -d -- python train.py --epochs 300 job a3f7b2 started # close your laptop. come back in 7 hours. $ lg jobs ID STATE AGE COMMAND a3f7b2 running 7h12m python train.py $ lg logs -f a3f7b2 Epoch 287/300 loss=0.18 ██████████████░ 4m Epoch 288/300 loss=0.17 ██████████████░ 3m ^C (stopped following — job still runs) $ lg jobs a3f7b2 done(0) 7h58m python train.py
A single static binary — install on your laptop. lg init deploys the matching agent to your server automatically over SSH. No compiler needed on either side.
$ curl -fsSL https://raw.githubusercontent.com/\
iamtaehyunpark/livegit/main/install.sh | sh
$ brew tap iamtaehyunpark/livegit $ brew install lg
$ git clone github.com/iamtaehyunpark/livegit $ make install # → ~/.local/bin/lg
# 1. Set up (once, per project) $ mkdir ~/myproject && cd ~/myproject $ lg init ? role ghost (this laptop) ? host gpu-1.lab.example.edu ? repo path /home/you/myrepo ✓ wrote .lg/config.yaml ✓ deployed agent to gpu-1 # 2. Run something on the server $ lg nvidia-smi # 3. Mount the remote tree and open in your editor $ lg mount ✓ mount ready → ~/myproject/myrepo/ $ code ~/myproject/myrepo/
lg mount and lg shell require macFUSE on macOS or libfuse on Linux.
Plain lg <cmd> works without it.
livegit is project-local like git — lg init writes a .lg/ folder and all commands discover it by walking up from your cwd, exactly like .git/.
| Command | What it does |
|---|---|
| Running commands | |
lg <command> | Run on the server — live PTY, streaming output, exact exit code |
lg run -- <command> | Explicit form — use when a command name collides with a subcommand |
lg run -d -- <command> | Launch a detached job that outlives your session; prints a job ID |
lg toggle / lg local | Make every shell command go to the server / turn that off |
| File mount | |
lg mount | Mount the remote tree headlessly — returns immediately, no shell needed |
lg shell | Mount the remote tree and open an interactive shell with auto-remote commands |
lg unmount | Stop a headless mount; also clears stale mounts (idempotent) |
| Detached jobs | |
lg jobs | List detached jobs: ID, state, age, command |
lg logs <id> | Show output so far; -f to follow live (Ctrl-C detaches, job keeps running) |
lg jobs kill <id> | Stop a running job |
lg jobs rm <id> | Forget a finished job and delete its logs |
| Connection | |
lg connect | Authenticate once — handles Duo / 2FA; cached for hours |
lg connect --check | Is the connection live? Safe to call at any time |
lg refresh | Re-authenticate now — restarts the cached window |
lg disconnect | Close the cached connection |
| Setup & config | |
lg init | Set up a project — writes .lg/config.yaml, deploys the agent to the server |
lg status | Connection state, toggle, tree-sync freshness, cache, pending writes |
lg scan | Find every livegit project on this machine and show connection state |
lg config get|set|show|edit | Inspect or change a setting (validated before saving) |