A Python-native LazyGit-like TUI using Textual and dulwich
Project description
pygitzen
A Python-native Terminal-Based Git Client - Navigate and manage your Git repositories with a beautiful TUI interface inspired by LazyGit.
What is pygitzen?
pygitzen is a terminal-based user interface (TUI) for Git repositories. Think of it as a Python-native alternative to LazyGit. It provides a visual, intuitive way to navigate your Git repositories directly in the terminal, without needing external Git CLI tools.
Features
- Terminal-Based UI: Beautiful TUI interface built with Textual and Rich
- Pure Python: Uses dulwich library - no external
gitCLI required for core operations - Real-Time Updates: Live view of your Git repository status
- Multi-Panel Interface: Status, Staged Changes, Changes, Branches, Commits, Patch, Stash, and Command Log
- Branch-Aware: Shows commits specific to the selected branch
- Push Status: Visual indicators for commits pushed/unpushed to remote
- File Status Detection: Automatically detects modified, staged, untracked, and deleted files
- Gitignore Support: Respects
.gitignorerules automatically - Dark Theme: Easy-on-the-eyes color scheme with focus highlighting
- Keyboard Navigation: Efficient vim-style navigation (j/k, h/l)
- Auto-Refresh: Patch panel updates automatically when navigating commits
Installation
pip install pygitzen
Requirements
- Python 3.9 or higher
- A Git repository
Note for source installations: If you're installing from source (when no pre-built wheel is available for your platform), pip will automatically install Cython during the build process. No manual steps required!
Quick Start
-
Navigate to any Git repository:
cd /path/to/your/git/repo
-
Launch pygitzen:
pygitzen
That's it! pygitzen will automatically detect the Git repository and display your repository status.
Where to Use pygitzen
pygitzen is perfect for:
- Local Development: Quickly see what files you've changed, what's staged, and review commits
- Remote Servers: Works great over SSH - no GUI needed
- Code Reviews: Browse commit history and view diffs in the terminal
- Branch Management: See branch-specific commits and push status
- File Tracking: Monitor staged and unstaged changes side-by-side (VSCode-style)
Interface Overview
pygitzen displays your Git repository in a multi-panel interface:
Left Column
- Status Panel: Current branch name and repository information
- Staged Changes: Files with staged changes (green indicators - M, A, D)
- Changes: Files with unstaged modifications (yellow indicators - M, U)
- Branches: List of all local branches - select to switch branches
- Commits: Commit history for the selected branch
- Stash: Placeholder for stashed changes (coming soon)
Right Column
- Patch Panel: Shows commit diff when a commit is selected
- Command Log: Tips and helpful messages
Keyboard Shortcuts
Navigation
- j / ↓: Move down
- k / ↑: Move up
- h / ←: Move left
- l / →: Move right
- Enter: Select item
- Tab: Cycle through panels
Actions
- r: Refresh repository data
- q: Quit application
- @: Toggle Command Log panel
Focus Navigation
- Click on a panel to focus it
- Focused panels have green borders
File Status Indicators
pygitzen uses Git-standard status letters:
| Letter | Meaning | Color | Description |
|---|---|---|---|
| M | Modified | Green (staged) / Yellow (unstaged) | File changed since last commit |
| A | Added | Green | File added to staging area |
| U | Untracked | Cyan | New file not yet added to Git |
| D | Deleted | Red | File deleted but change not yet committed |
| R | Renamed | Blue | File was renamed or moved |
| C | Copied | Blue | File was copied from another tracked file |
| ✓ | Pushed | Green | Commit exists on remote |
| ↑ | Unpushed | Yellow | Commit is local only |
Examples
Viewing Commit History
- Launch pygitzen in a Git repository
- Navigate to Commits panel (use Tab or click)
- Use j/k or arrow keys to navigate commits
- Patch panel automatically shows the diff for selected commit
Switching Branches
- Navigate to Branches panel
- Use j/k or arrow keys to select a branch
- Press Enter or click to switch
- Commits panel updates to show branch-specific commits
Monitoring File Changes
- Staged Changes panel shows files ready to commit (green indicators)
- Changes panel shows files with unstaged modifications (yellow indicators)
- Files with both staged and unstaged changes appear in both panels (VSCode-style)
Key Features Explained
Branch-Specific Commits
When you select a branch, pygitzen shows only commits unique to that branch. This means:
- On
main: Shows all commits from main - On
feature-branch: Shows only commits that don't exist in main (unique to the branch)
This makes it easy to see what's new in your feature branch without scrolling through shared history.
Push Status
Each commit displays its push status:
- ✓ (green): Commit has been pushed to remote
- ↑ (yellow): Commit exists only locally
This helps you track which commits need to be pushed.
Auto-Updating Patch Panel
The Patch panel automatically updates when you navigate commits:
- Use arrow keys or j/k to navigate
- Patch panel shows diff immediately (no need to press Enter)
- Visual highlighting shows which commit is selected
Technical Details
Dependencies
- Textual: Modern TUI framework for Python
- Rich: Rich text and beautiful formatting
- dulwich: Pure-Python Git implementation
How It Works
pygitzen reads directly from the .git directory using dulwich:
- No external
gitCLI calls required - Direct access to Git objects, refs, and index
- Fast and efficient for most operations
Support
- Issues: GitHub Issues
- Repository: GitHub
License
This project is licensed under the MIT License.
Made with ❤️ for developers who love terminal UIs
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 Distributions
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 pygitzen-0.2.3.tar.gz.
File metadata
- Download URL: pygitzen-0.2.3.tar.gz
- Upload date:
- Size: 382.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07b5842fbe51335fa2242ee2591dbf2bbb2701b22e4644f491609b87f3ab8234
|
|
| MD5 |
170d552f232d5112dbcb3f07202c31f6
|
|
| BLAKE2b-256 |
61284a6d3588e1d08268c0d3bb47612a4e89eeeb14046f4b15630698255c7c63
|
File details
Details for the file pygitzen-0.2.3-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: pygitzen-0.2.3-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 235.7 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5ee5c5f02a5c31a9399a29636529616056deadbe60c1c2e991c973a3204b8e7
|
|
| MD5 |
c2d11ff844930775c1d55cfd7f9dc961
|
|
| BLAKE2b-256 |
acf328363915f5ab88d0e684300d817b232143db1ccd3e78d3b26239c740ba2f
|
File details
Details for the file pygitzen-0.2.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.
File metadata
- Download URL: pygitzen-0.2.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e647bec7211839a3367223138603032c9946f20b288e81a78fdb29ac61a42d77
|
|
| MD5 |
a192c4df6d09f1afae2459cadebf4dd7
|
|
| BLAKE2b-256 |
c3064a2b4dbbbb21da012313e4b6027606916c66715c86cdd2cd5f22bd0eb263
|
File details
Details for the file pygitzen-0.2.3-cp312-cp312-macosx_10_13_universal2.whl.
File metadata
- Download URL: pygitzen-0.2.3-cp312-cp312-macosx_10_13_universal2.whl
- Upload date:
- Size: 446.5 kB
- Tags: CPython 3.12, macOS 10.13+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f34002332c36ba8c3c7a564869fc3e01ae0d066c3104ea43495a8a2317b87ab
|
|
| MD5 |
872a7a8006f7f6a06f081a923f731d81
|
|
| BLAKE2b-256 |
fcdcdf46a46bfa0cb2bcda7f51aa83d8fc9581ce83b19f391bdc1dafe0dd2de3
|
File details
Details for the file pygitzen-0.2.3-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: pygitzen-0.2.3-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 234.8 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83795720469dd2ee7402a511bd6c757859dfdb48742cdbd5f9eee4a6974fa7d6
|
|
| MD5 |
597ea40b65168b659e56b7ce1cbcc0b5
|
|
| BLAKE2b-256 |
2d2f416e7e216b14b97f25d9d78983e9c06ae70b1fac485f2c9e813b9d4422ba
|
File details
Details for the file pygitzen-0.2.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.
File metadata
- Download URL: pygitzen-0.2.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
037d49962db161fd07a1349cc073dee4e682f2617eb20136ba5f37fae6b5a2b4
|
|
| MD5 |
acaca18d3022fcb2635c3784ce0bc237
|
|
| BLAKE2b-256 |
2ebe69d91d750b5d79a2935aa1a22aae947fd250c52929ce5335fb46f8948905
|
File details
Details for the file pygitzen-0.2.3-cp311-cp311-macosx_10_9_universal2.whl.
File metadata
- Download URL: pygitzen-0.2.3-cp311-cp311-macosx_10_9_universal2.whl
- Upload date:
- Size: 448.0 kB
- Tags: CPython 3.11, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
295a8ec127c0b8e18f725c231583f6cad235d4be949c6c3f4de991b2a5e442aa
|
|
| MD5 |
c5221424017d37df70c332f57af27ff1
|
|
| BLAKE2b-256 |
1cc90c9e692a027471846fd4d00d2fd8274e12457067f0f812768f93a7036efb
|