A terminal based control plane for developers working across multiple repositories. Launch multiple AI coding agents, multiple tmux sessions and track changes across all your repos in one place.
Project description
GitDirector
A terminal based control plane for developers working across multiple repositories. Launch multiple AI coding agents, multiple tmux sessions and track changes across all your repos in one place.
Why GitDirector?
If you work across more than a handful of repositories, the overhead adds up fast. Jumping between terminals to check states, pull changes, and babysit agents is friction you don't need.
GitDirector gives you a single cockpit for all of it. See every repo's status, drop into any of them. Run AI agents in parallel, each isolated in its own tmux session, while you monitor everything from the dashboard. Less tab-switching, more shipping.
Installation
pip install gitdirector
Requires Python 3.10+.
Support
If you find GitDirector useful, please star this repository on GitHub, we need more stars to qualify for inclusion in Homebrew. Your support helps a lot, thank you!
Usage
| Command | Description |
|---|---|
gitdirector console |
Open the interactive TUI dashboard |
gitdirector link PATH [--discover] |
Link a repository or discover all under a path |
gitdirector unlink PATH|NAME [--discover] |
Unlink a repository by path, name, or all under a path |
gitdirector list |
List all tracked repositories with live status |
gitdirector status |
Show repositories with staged/unstaged files |
gitdirector pull [--yes] |
Pull latest changes for all tracked repositories |
gitdirector cd NAME |
Open or switch to a tmux session for a repository |
gitdirector autoclean |
Remove broken repository links from tracking |
gitdirector info PATH|NAME [--full] |
Show file statistics for a repository |
gitdirector gd-tmux PATH|NAME "command" [--description TEXT] |
Create a gd tmux session and run a command in it |
gitdirector gd-capture SESSION [--lines N] [--full] |
Print the scrollback of a live gd tmux session |
gitdirector gd-send SESSION [TEXT] [--enter|--key C-c] |
Send text or Ctrl-C to a live gd tmux session |
gitdirector completion SHELL |
Print shell completion setup for bash, zsh, or fish |
gitdirector help |
Show help |
link
gitdirector link /path/to/repo
gitdirector link /path/to/folder --discover # recursively find and link all repos
console
gitdirector console
Opens a full interactive TUI dashboard.
Features:
- Live table with sync state, branch, changes, last commit, and active tmux sessions
- Tabs for
[1] Repositories,[2] Sessions, and[3] Panels j/kor arrow keys to navigate/to filter the active tabsto sort the active tableito show repository info (file count, lines, tokens, max depth, top file types)gon the Repositories tab to open Git operations: status, timeline, branches, remotes, pull, and pushrto refresh all statuses- Press
enteron any repository to open an action menu:- New tmux session — create and attach a session for the repository
- Review Diff — open a two-pane viewer for uncommitted changes (left: file list with GitHub-style status pills and +/- counts; right: per-file unified diff with GitHub-dark syntax highlighting, line numbers, and green/red backgrounds for added/removed lines). Navigate files with
j/k,n/p,g/G, or]/[. Switch the focused panel withtab.rrefreshes,esccloses. - Attach existing session — switch to any already-running tmux session
- Launch AI agent — open OpenCode, Claude Code, GitHub Copilot, Codex, or Pi in a new tmux session
- Remove session — kill a running tmux session
- Repository groups appear directly in the Repositories tab when linked repositories share the same parent directory. Group rows can be expanded/collapsed with
space; pressenteron a group to start, attach, remove, or launch AI-agent sessions rooted at that parent directory. - Sessions tab (press
2) lists every activegd/*tmux session with its status, purpose, repository, description, and full session name. The description column is free-form text stored on the session (default"-"), with a width that scales to your terminal and wraps long text. Highlight a row and pressdto edit its description. - Panels tab (press
3) manages reusable tmux panel layouts. Pressnto create a panel, orenteron a panel to open, reconfigure, rename, or delete it.
unlink
gitdirector unlink /path/to/repo # unlink by full path
gitdirector unlink my-repo # unlink by repository name
gitdirector unlink /path/to/folder --discover # unlink all repos under a path
If multiple tracked repositories share the same name, gitdirector will refuse and list the conflicting paths so you can use the full path instead.
info
gitdirector info /path/to/repo # by path
gitdirector info my-repo # by name
gitdirector info my-repo --full # show all file extensions
Shows file statistics for a repository:
- Total file count, line count, token count, and max directory depth
- Top 10 file types by count with line and token breakdowns (use
--fullto show all) - Files without extensions grouped as
(no ext) - Remaining types grouped as
others - Binary files show
-for lines and tokens - All operations respect
.gitignoreat every level
Also available in the TUI console by pressing i on a selected repository.
list
Displays a live table of all tracked repositories with:
- Sync state:
up to date,ahead,behind,diverged, orunknown - Current branch
- Staged/unstaged changes
- Last commit (relative time)
- Tracked file size
- Path
Checks run concurrently (default: 10 workers, configurable from 1 to 32).
status
Shows repositories with uncommitted changes (staged and/or unstaged files). Prints a summary of total, clean, and changed repo counts.
pull
gitdirector pull # prompts before pulling
gitdirector pull --yes # skip confirmation
gitdirector pull -y # short form
Pulls all tracked repositories concurrently using fast-forward only on each repository's current branch (git pull --ff-only origin <current-branch>). Reports success or failure per repository.
By default, pull asks for confirmation after listing the repositories it will update. Use --yes / -y for non-interactive runs.
cd
gitdirector cd my-repo
Opens a tmux session rooted at the repository directory, or switches to it if a session for that repo already exists.
- Inside tmux — switches the current client to the target session.
- Outside tmux — replaces the current process with
tmux attach-session, handing the terminal over to tmux.
Requires tmux to be installed on your system.
macOS:
brew install tmux
Debian/Ubuntu:sudo apt install tmux
Arch:sudo pacman -S tmux
gd-tmux
gitdirector gd-tmux my-repo "npm test"
gitdirector gd-tmux /path/to/my-repo "make build"
gitdirector gd-tmux my-repo 'echo "hello world"'
gitdirector gd-tmux my-repo "opencode" --description "OpenCode: refactor auth middleware"
Creates a new gd tmux session rooted at the given repository, runs the supplied command inside it, and returns immediately without attaching. The session is a real gd/{repo}/shell/{N} session, visible in the Sessions tab of gitdirector console, and it self-destructs when the command exits. N is allocated as one higher than the highest currently running matching shell session number.
PATH|NAME— accept either an absolute path to a tracked repository or its basename, with the same disambiguation rules asgitdirector unlink."command"— the shell command to run inside the new session. Pass it quoted so the shell hands the whole string to gitdirector; quotes and arguments are preserved verbatim.--description/-d— optional. Free-text description stored on the session and shown in the Sessions tab. Accepts both--description "text"and--description=textforms. When omitted, the column displays"-".
The full session name (e.g. gd/myrepo/shell/1) is printed to stdout right after the background session is created, so scripts and agents can capture it for later use with gd-capture:
SESSION=$(gitdirector gd-tmux /path/to/repo opencode --description "OpenCode: refactor auth")
gitdirector gd-capture "$SESSION" --lines 100
Use this from any shell to start a background command without entering the TUI first. The new session shows up in the Sessions tab immediately. Inside the TUI, highlight any session row and press d to edit its description.
autoclean
gitdirector autoclean
Scans the tracked repositories in ~/.gitdirector/config.yaml for paths that no longer exist on disk and removes them from the config. Lists any broken links for review and asks for confirmation before deleting them.
gd-capture
gitdirector gd-capture gd/myrepo/shell/1 # last 200 lines
gitdirector gd-capture gd/myrepo/shell/1 --lines 50 # last 50 lines
gitdirector gd-capture gd/myrepo/shell/1 --full # entire scrollback
Prints the current scrollback of a live gd/* tmux session to stdout (plain text, pipeable into grep/less/etc.). The argument is the full session name as shown in the TUI Sessions tab. It must match the gd/<repo>/<purpose>/<N> shape; sessions created by gd-tmux use gd/<repo>/shell/<N>.
Only running sessions can be captured. gd-tmux sessions self-destruct when their command exits (success or failure), so for any finished session you have to have redirected the command's own output to a file:
gitdirector gd-tmux myrepo "make test 2>&1 | tee /tmp/run.log"
The session is gone the moment the command exits; the scrollback lives on only as the bytes the process actually wrote.
gd-send
gitdirector gd-send gd/myrepo/opencode/1 "continue and run the tests"
gitdirector gd-send gd/myrepo/shell/1 "npm test" --enter
gitdirector gd-send gd/myrepo/shell/1 --key C-c
Sends input to a live gd/* tmux session. The session argument must be the full session name shown in the TUI Sessions tab, for example gd/myrepo/shell/1.
TEXTis pasted into the active pane. It does not press Enter unless--enteris provided.--enterpresses Enter after pastingTEXT, useful for running shell commands.--key C-csends Ctrl-C to the active pane, useful for stopping a running foreground process without killing the tmux session.
Accepted --key values: C-c.
For AI coding agents
If you are an AI coding agent (Claude Code, OpenCode, GitHub Copilot, Codex, Pi, or any other tool that drives a shell on the user's behalf), the rules for integrating with the user's GitDirector workflow — including gd-tmux background sessions, gd-capture, and the mandatory --description flag — live in LLMS.md. Read that file end-to-end before running any commands.
Configuration
Config is stored at ~/.gitdirector/config.yaml.
repositories:
- /path/to/repo1
- /path/to/repo2
max_workers: 10 # optional, valid range 1-32, default 10
theme: rose-pine # optional, default rose-pine
github_username: your-github-username # optional
github_PAT: github_pat_or_classic_pat # optional
GitHub PAT fallback
GitDirector first runs git commands using your normal local git credentials. If a git command fails with an authentication error and both github_username and github_PAT are configured, GitDirector retries the command with a temporary Git credential helper for https://github.com remotes.
- This only applies to HTTPS GitHub remotes.
- SSH remotes still use your normal SSH key/agent setup.
- The PAT is stored in plaintext in
~/.gitdirector/config.yaml; use an appropriately scoped token and protect that file. - The PAT is not passed on the command line or shown in TUI command output.
Available Themes
textual-dark, textual-light, nord, gruvbox, catppuccin-mocha, textual-ansi, dracula, tokyo-night, monokai, flexoki, catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, solarized-light, solarized-dark, rose-pine, rose-pine-moon, rose-pine-dawn, atom-one-dark, atom-one-light
Requirements
- Python 3.10+
- Git
- tmux ≥ 3.2a (for
gitdirector cd,gitdirector consolesessions,gitdirector gd-tmux,gitdirector gd-capture, andgitdirector gd-send)
Shell completion
Generate shell completions for bash, zsh, or fish. Completion includes subcommands, options, and linked repository names for repo-target commands.
eval "$(gitdirector completion bash)"
eval "$(gitdirector completion zsh)"
gitdirector completion fish | source
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gitdirector-1.7.0.tar.gz.
File metadata
- Download URL: gitdirector-1.7.0.tar.gz
- Upload date:
- Size: 118.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
423c4fadad4ea961d2ecc4bf253050556110fd2f278a936a75ce72f7e7afc365
|
|
| MD5 |
78de1de8983f47619cde1c9e4c275e08
|
|
| BLAKE2b-256 |
9c7fd98e7b3c7a73529cdbc8d5d95e0c4f3f9e49113bfeb56ba3e6ab511823f4
|
Provenance
The following attestation bundles were made for gitdirector-1.7.0.tar.gz:
Publisher:
release.yml on anitoanto/gitdirector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gitdirector-1.7.0.tar.gz -
Subject digest:
423c4fadad4ea961d2ecc4bf253050556110fd2f278a936a75ce72f7e7afc365 - Sigstore transparency entry: 1997898018
- Sigstore integration time:
-
Permalink:
anitoanto/gitdirector@abe810fd1142dc2dc8e4404033ce37cae7f019ec -
Branch / Tag:
refs/tags/release-v1.7.0 - Owner: https://github.com/anitoanto
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@abe810fd1142dc2dc8e4404033ce37cae7f019ec -
Trigger Event:
push
-
Statement type:
File details
Details for the file gitdirector-1.7.0-py3-none-any.whl.
File metadata
- Download URL: gitdirector-1.7.0-py3-none-any.whl
- Upload date:
- Size: 144.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a27ea6e9a6753175cae4d3dc70f7e8ea5157bd1bef2a2698f23e0c0b335d86a
|
|
| MD5 |
c68bac93d95e2352639def5c84e51ffe
|
|
| BLAKE2b-256 |
4ff76f7e928be57978644eae03932f90550b081ea6fe912d4fb35b4803b0ecd4
|
Provenance
The following attestation bundles were made for gitdirector-1.7.0-py3-none-any.whl:
Publisher:
release.yml on anitoanto/gitdirector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gitdirector-1.7.0-py3-none-any.whl -
Subject digest:
2a27ea6e9a6753175cae4d3dc70f7e8ea5157bd1bef2a2698f23e0c0b335d86a - Sigstore transparency entry: 1997898148
- Sigstore integration time:
-
Permalink:
anitoanto/gitdirector@abe810fd1142dc2dc8e4404033ce37cae7f019ec -
Branch / Tag:
refs/tags/release-v1.7.0 - Owner: https://github.com/anitoanto
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@abe810fd1142dc2dc8e4404033ce37cae7f019ec -
Trigger Event:
push
-
Statement type: