Skip to main content

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 git CLI 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 .gitignore rules 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

  1. Navigate to any Git repository:

    cd /path/to/your/git/repo
    
  2. 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

  1. Status Panel: Current branch name and repository information
  2. Staged Changes: Files with staged changes (green indicators - M, A, D)
  3. Changes: Files with unstaged modifications (yellow indicators - M, U)
  4. Branches: List of all local branches - select to switch branches
  5. Commits: Commit history for the selected branch
  6. Stash: Placeholder for stashed changes (coming soon)

Right Column

  1. Patch Panel: Shows commit diff when a commit is selected
  2. 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

  1. Launch pygitzen in a Git repository
  2. Navigate to Commits panel (use Tab or click)
  3. Use j/k or arrow keys to navigate commits
  4. Patch panel automatically shows the diff for selected commit

Switching Branches

  1. Navigate to Branches panel
  2. Use j/k or arrow keys to select a branch
  3. Press Enter or click to switch
  4. 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 git CLI calls required
  • Direct access to Git objects, refs, and index
  • Fast and efficient for most operations

Support

License

This project is licensed under the MIT License.


Made with ❤️ for developers who love terminal UIs

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

pygitzen-0.2.2.tar.gz (377.7 kB view details)

Uploaded Source

Built Distributions

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

pygitzen-0.2.2-cp312-cp312-win_amd64.whl (231.1 kB view details)

Uploaded CPython 3.12Windows x86-64

pygitzen-0.2.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

pygitzen-0.2.2-cp312-cp312-macosx_10_13_universal2.whl (441.8 kB view details)

Uploaded CPython 3.12macOS 10.13+ universal2 (ARM64, x86-64)

pygitzen-0.2.2-cp311-cp311-win_amd64.whl (230.2 kB view details)

Uploaded CPython 3.11Windows x86-64

pygitzen-0.2.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pygitzen-0.2.2-cp311-cp311-macosx_10_9_universal2.whl (443.4 kB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file pygitzen-0.2.2.tar.gz.

File metadata

  • Download URL: pygitzen-0.2.2.tar.gz
  • Upload date:
  • Size: 377.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pygitzen-0.2.2.tar.gz
Algorithm Hash digest
SHA256 1f22fa84a60f7a788240253a396fae649719d3f348b4fe0cc963fa51131a6638
MD5 c807281dae0c6e1edf6727ea8276c6a6
BLAKE2b-256 24b91ac9142e436e5a9893b4a4b3e8bcb9adb11f0d89e57e04e3b974d661e96c

See more details on using hashes here.

File details

Details for the file pygitzen-0.2.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pygitzen-0.2.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 231.1 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

Hashes for pygitzen-0.2.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 959f6c064d762dd2dd51f0bf0361897e898c652e745ead8c9ef317662e21a97e
MD5 e0a083701a6b8c14373827ac3bab8ab3
BLAKE2b-256 068760f724f3b151ec03c92445a973f29ea37c2d6fdcf8ffae84f256a5f70de8

See more details on using hashes here.

File details

Details for the file pygitzen-0.2.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for pygitzen-0.2.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 5d6f31727167455c57f32fbe2603191ed1f3aa67a577eb9d9a9baadeaf9e4fd1
MD5 4eadb586d8492a9bbee20c75f8a2e9ff
BLAKE2b-256 f410cfef3f22dfd45563f5acbcb8330c9f2887e19bf65d22947e90aef227bfd6

See more details on using hashes here.

File details

Details for the file pygitzen-0.2.2-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for pygitzen-0.2.2-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 a38bf5f2a76cc193522a3dec27ec20f853d2be5da2684efbcd270145cf89b905
MD5 df47bca3cd134b30e741857e66daea56
BLAKE2b-256 a1137dfb92ccb4794bc481ad7dcb7749211cbb67f678dfa1b31fed56e1d6409c

See more details on using hashes here.

File details

Details for the file pygitzen-0.2.2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pygitzen-0.2.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 230.2 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

Hashes for pygitzen-0.2.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 11649a7b2c2eded27c1951a19ec520e67646b2b2847dcabde1fbb9161dbaa551
MD5 8e9536663f1b0679d93aac7e616c5df1
BLAKE2b-256 c7771a76561c3b689a08c6a15d1075bafede86f1072fc2e9e62837700c735daf

See more details on using hashes here.

File details

Details for the file pygitzen-0.2.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for pygitzen-0.2.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 73220110f74ab80f2ca40f59d3483be9debb60aaeebad25e03f4a29b2b4c1b21
MD5 e379aea8b725d14138eb5c119787841d
BLAKE2b-256 4409b14ba4b36a7560f6eca0e01647e732a71e669657c6d1f2b8440ef31e0dd7

See more details on using hashes here.

File details

Details for the file pygitzen-0.2.2-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for pygitzen-0.2.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 45f4f68919dd6f999ba2cd56c50e428a5b0f3089035173e790a3987c66ca21ea
MD5 e0cf68d985a6a5a583618bce36cd9ca1
BLAKE2b-256 291d88df210c3ef70760cd024b9c63f83313e5cdc116adedeb40f7143db76aca

See more details on using hashes here.

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