A simple Terminal User Interface for Git operations.
© 2026
This is also the harpertoken/.github repository, which powers organization-level defaults:
- Org profile content:
profile/readme.md - Org activity bot:
.github/workflows/update-org-activity.ymlupdates the activity block inprofile/readme.md - Default templates:
.github/ISSUE_TEMPLATE/and.github/PULL_REQUEST_TEMPLATE.md
The activity bot rewrites only the section between:
<!-- ORG_ACTIVITY:START --><!-- ORG_ACTIVITY:END -->
See docs/ for detailed project state and coverage info.
See CONTRIBUTING.md for guidelines.
This repo uses pre-commit:
- Install hooks:
pre-commit install - Run all checks:
pre-commit run --all-files
This project follows conventional commit standards.
To enable commit message validation:
- Copy the commit hook:
cp scripts/commit-msg .git/hooks/commit-msg - Make it executable:
chmod +x .git/hooks/commit-msg
Commit messages must:
- Start with a type:
feat:,fix:,docs:,style:,refactor:,test:,chore:,perf:,ci:,build:,revert: - Be lowercase
- First line ≤60 characters
To rewrite existing commit messages in the history:
Run scripts/rewrite_msg.sh
This will lowercase and truncate first lines, then force-push the changes.
make installOr with one command to install and run:
make startmake runOr:
python main.pyIf files or folders are not visible (especially hidden files starting with .), on macOS:
- In Finder: Press
Cmd+Shift+. - Via Terminal (persistent):
defaults write com.apple.finder AppleShowAllFiles YES && killall Finder(hide again withNO)
Build and run with Docker Compose:
docker-compose up --buildRun tests with coverage and security scan:
python run_tests.pyOr manually:
pytest --cov=main --cov-report=html tests/Run all checks before commit/push:
python check_all.pyCode scanned with Bandit and CodeQL. Dependabot enabled for dependency updates.
Code linted and formatted with Ruff. Run ruff check . for linting and ruff format . for formatting. CI runs on push/PR.
Bump version:
python bump_version.py <major|minor|patch>Then tag a version (e.g., v1.0.0) to trigger the release workflow.
The app is built with Textual for the TUI framework. Main components:
GitTUIclass: core app logic, UI composition, event handling- Git command execution: uses
subprocessto run shell commands - Database: optional PostgreSQL for command history (falls back gracefully)
- UI: buttons for actions, input for commit messages, output display
.
├── .github/
│ ├── ISSUE_TEMPLATE/ # Issue templates
│ ├── workflows/ # GitHub Actions
│ └── PULL_REQUEST_TEMPLATE.md # PR template
├── docs/ # Documentation
├── tests/ # Test files
├── CONTRIBUTING.md # Contributing guide
├── Dockerfile # Docker image
├── README.md # This file
├── bump_version.py # Version bumping script
├── check_all.py # Pre-commit checks
├── docker-compose.yml # Docker Compose
├── main.py # Main app code
└── run_tests.py # Test runner
main.py: entry point, app definitiontests/: unit and e2e testspyproject.toml: packaging and dependencies- Workflows: CI/CD automation
- Run the app:
python main.pylaunches the TUI - Git operations: click buttons or use keyboard shortcuts (
s=status,a=add, etc.) - Commit: type message in input field, press Enter or click Commit
- History: view past commands if DB is connected
- Development: run
python check_all.pybefore committing
- App initializes DB connection (optional)
- UI built with Textual widgets (Header, Buttons, Input, Static)
- Events handled via
on_button_pressedandon_key - Git commands executed synchronously with error checking
- Tests use pytest and Textual's Pilot for e2e
- Git status, add, diff, log, commit, push, pull
- Command history (with PostgreSQL)
- Keyboard shortcuts
