Skip to content

henderson-01/giteyes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

giteyes

A terminal dashboard for exploring git commit activity. View commit heatmaps, recent commits, contributor rankings, and file churn hotspots all rendered live in your terminal.

giteyes works in two modes:

  • Local mode: Point it at a repo already on your disk. No API keys, no network access; it reads the .git directory directly.
  • GitHub API mode: Point it at owner/repo or a GitHub URL. It pulls the same dashboard straight from the GitHub REST API without cloning the repository.

Quickstart (Near Zero Installation)

If you have uv installed, you can run giteyes against any GitHub repo immediately, with absolutely no installation required. uv will download the tool into a throwaway environment, run it, and leave your system clean afterward:

uvx --from git+https://github.com/henderson-01/giteyes giteyes https://github.com/henderson-01/random-quotes

You can swap henderson-01/random-quotes for any owner/repo, a full URL, or a local file path.

Tip

If you plan to use this often, set up a shell alias so you don't have to type the full git URL every time: alias giteyes='uvx --from git+https://github.com/henderson-01/giteyes giteyes' Also if you CD into your cloned local project path and run giteyes . with the above alias this will display the project in the TUI


Running via a Local Clone

If you have already cloned the giteyes repository and want to run it without fully installing it, you can execute these commands from inside the giteyes directory:

1. Pull a repo's stats via GitHub API (without cloning the target project):

uvx --from . giteyes https://github.com/henderson-01/Ollama-uninstall-guides
  • Screenshot via GitHub API with the cloned giteyes

Screenshot

2. Run against another local project on your machine:

uvx --from . giteyes ../random-quotes

(This assumes your target project, random-quotes, is located in the same parent folder as giteyes.)

  • Screenshot via Local Clone πŸ‘† UVX command random-quotes

Screenshot

Installation (Local & Development)

To install giteyes locally for standard usage or development, we use uv to manage the environment and dependencies:

git clone https://github.com/henderson-01/giteyes.git
cd giteyes
uv sync

This automatically creates a .venv, locks your dependencies, and installs the project in editable mode.

Usage

Because uv isolates the installation, how you run the command depends on where you are in your terminal.

1. Running from inside the giteyes directory

If you are currently inside your cloned giteyes folder, prefix your commands with uv run:

uv run giteyes                                                # Dashboard for the current directory
uv run giteyes /path/to/other-repo                            # Dashboard for a specific local repo
uv run giteyes henderson-01/random-quotes                     # Dashboard for an uncloned GitHub repo
uv run giteyes https://github.com/henderson-01/random-quotes  # Full URLs work too
uv run giteyes --weeks 26                                     # Show 26 weeks of heatmap history (default is 13)

2. Running from ANY directory on your machine

If you want to analyze a project without shifting your terminal back to the giteyes source folder, you can use uvx pointing to your local installation directory:

# CD into any project you want to explore
cd /path/to/your-target-project

# Run giteyes using the local source path
uvx --from /path/to/cloned/giteyes giteyes .

πŸ’‘ Pro-Tip: Setup a Local Shell Alias

To make running giteyes globally seamless, add this alias to your shell profile (e.g., ~/.bashrc or ~/.zshrc):

alias giteyes="uvx --from /path/to/cloned/giteyes giteyes"

Once reloaded, you can simply cd into any git repository on your machine and type:

giteyes .

Dashboard Controls:

  • r β€” Refresh data
  • q β€” Quit

Note: A local path is always checked first. Only targets that don't exist locally are parsed as GitHub references.


UV/UVX Clean Up

Run this to clean up the uv/uvx cache from time to time:

uv cache clean

Terminal View Project Structure

Should look something like this:

giteyes
β”œβ”€β”€ CODE_OF_CONDUCT.md
β”œβ”€β”€ CONTRIBUTING.md
β”œβ”€β”€ giteyes
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ app.py
β”‚   β”œβ”€β”€ app.tcss
β”‚   β”œβ”€β”€ cli.py
β”‚   β”œβ”€β”€ git_data.py
β”‚   β”œβ”€β”€ models.py
β”‚   β”œβ”€β”€ sources
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ github_api.py
β”‚   β”‚   └── local.py
β”‚   └── widgets
β”‚       β”œβ”€β”€ __init__.py
β”‚       β”œβ”€β”€ commits.py
β”‚       β”œβ”€β”€ contributors.py
β”‚       β”œβ”€β”€ heatmap.py
β”‚       └── hotspots.py
β”œβ”€β”€ images
β”‚   β”œβ”€β”€ Screenshot-API.png
β”‚   └── Screenshot-Local.png
β”œβ”€β”€ LICENSE
β”œβ”€β”€ pyproject.toml
β”œβ”€β”€ README.md
β”œβ”€β”€ tests
β”‚   β”œβ”€β”€ conftest.py
β”‚   β”œβ”€β”€ test_app.py
β”‚   β”œβ”€β”€ test_cli.py
β”‚   β”œβ”€β”€ test_git_data.py
β”‚   β”œβ”€β”€ test_github_api.py
β”‚   β”œβ”€β”€ test_heatmap_hover.py
β”‚   └── test_widget_resize.py
└── uv.lock


GitHub API Limits & Authentication

GitHub's unauthenticated REST API allows 60 requests per hour. Because each dashboard load makes roughly 15 requests, you will hit this limit quickly.

To raise your limit to 5,000 requests per hour, provide a personal access token (no special scopes are needed for public repos):

# Pass it as an argument example
uv run giteyes henderson-01/random-quotes --token ghp_yourtokenhere

# Or export it as an environment variable
export GITHUB_TOKEN=ghp_yourtokenhere
uv run giteyes henderson-01/random-quotes

API Limitation: In GitHub API mode, churn hotspots are computed only from the ~20 most recent commits to save your rate limit. In Local mode, hotspots scan the last 200 commits directly from disk. Clone the repo and use Local mode if you need the deepest file churn history.

Development

Running the test suite is handled smoothly through uv.

First, ensure you have the development dependencies installed:

uv sync --extra dev

Then, run the tests:

uv run pytest

Tests build a real throwaway git repo with scripted, dated commits (see tests/conftest.py), exercising the actual code paths without touching your broader filesystem. The Textual UI is tested headlessly via App.run_test(), making it CI-friendly. GitHub API mode is tested against a mocked session to avoid network calls and rate limits.

Architecture

  • giteyes/git_data.py Pure functions turning a git.Repo into plain data structures. Completely decoupled from the UI for easy testing.
  • giteyes/sources/ Contains the DataSource interface and its two implementations: LocalGitSource and GitHubApiSource. The UI only interacts with the interface, making the sources perfectly interchangeable.
  • giteyes/widgets/ Small Textual widgets, each responsible for rendering one specific piece of data (e.g., the heatmap or the commit table).
  • giteyes/app.py The main Textual App that composes the widgets and wires them to the provided DataSource.
  • giteyes/cli.py The Typer entrypoint. It decides whether to use Local or API mode based on the target string, then launches the app.

License

MIT β€” see LICENSE

About

A terminal dashboard for exploring git commit activity. View commit heatmaps, contributor rankings, and file churn hotspots directly in your terminal using UV/UVX.

Topics

Resources

License

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages