A CLI tool that adds a fun gamification layer to your daily Git usage.
Project description
Git-Gamify
Turn your daily Git workflow into a lightweight RPG loop.
Earn XP, level up, and unlock achievements from real Git usage.
What Is Git-Gamify
Git-Gamify wraps your normal git usage (commit, push) and adds a game layer:
- XP and level progression
- achievement unlocks
- reward messages on level up
- profile/stat display commands
The core goal is to keep your existing Git habits intact while adding immediate feedback and motivation.
Features
- Progressive XP system for commits and pushes
- Daily decay/cap mechanics to avoid farming
- Streak and behavior-based achievements
- Local profile persistence per Git identity (
user.email) - Multi-language support (
en,zh) - Rich terminal UI output
Installation
Requirements:
- Python 3.8+
- Git
Install from PyPI:
pip install git-gamify
Or install this repo in editable mode:
pip install -e .
Quick Start
- Add shell wrapper so your normal
gitcommand is routed through Git-Gamify. - Restart terminal.
- Use Git as usual (
git commit,git push). - Check progress with
gg profile.
Shell Setup
PowerShell (Required)
Edit your profile:
notepad $PROFILE
Add:
function git {
gg git @args
}
Restart PowerShell.
Bash / Zsh (Required)
Add to ~/.bashrc or ~/.zshrc:
function git() {
gg git "$@"
}
Reload shell (source ~/.bashrc / source ~/.zshrc) or restart terminal.
Autocompletion
CLI Completion for gg
Run once:
gg --install-completion powershell
(bash and zsh are also supported via Typer installer.)
PowerShell: Keep Both gg and Wrapped git Completion
When git is wrapped as a PowerShell function, default git completion can disappear because completion was attached to native git.exe, not your function.
Use this profile setup:
Import-Module PSReadLine
Import-Module posh-git
$GitPromptSettings.EnablePromptStatus = $false
function git {
gg git @args
}
Set-PSReadLineKeyHandler -Chord Tab -Function MenuComplete
# gg completion
$scriptblock = {
param($wordToComplete, $commandAst, $cursorPosition)
$Env:_GG_COMPLETE = "complete_powershell"
$Env:_TYPER_COMPLETE_ARGS = $commandAst.ToString()
$Env:_TYPER_COMPLETE_WORD_TO_COMPLETE = $wordToComplete
gg | ForEach-Object {
$commandArray = $_ -Split ":::"
$command = $commandArray[0]
$helpString = $commandArray[1]
[System.Management.Automation.CompletionResult]::new(
$command, $command, "ParameterValue", $helpString
)
}
$Env:_GG_COMPLETE = ""
$Env:_TYPER_COMPLETE_ARGS = ""
$Env:_TYPER_COMPLETE_WORD_TO_COMPLETE = ""
}
Register-ArgumentCompleter -Native -CommandName gg -ScriptBlock $scriptblock
# bridge completion for wrapped git function
Register-ArgumentCompleter -CommandName git -ScriptBlock {
param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters)
$line = $commandAst.ToString()
$lastWord = $wordToComplete
GitTabExpansion $line $lastWord | ForEach-Object {
[System.Management.Automation.CompletionResult]::new($_, $_, "ParameterValue", $_)
}
}
Notes:
Import-Module posh-gitis required forGitTabExpansion.- If startup throws
cannot find 'gg', ensureggis installed in the active Python environment and available inPATH. main/branch text in prompt is fromposh-gitprompt feature, not Git-Gamify runtime.
Commands
gg profile
Show user profile, level progress, and unlocked achievements.
gg profile
Options:
gg profile --statsorgg profile -sgg profile --reset
gg config
Read or update config values.
gg config --get language
gg config --set language=zh
gg config --set language=en
gg help
Show internal command help.
gg help
Data Storage
User data is stored locally under:
- Windows:
%USERPROFILE%\.git-gamify - Unix-like:
~/.git-gamify
Profiles are keyed by a hash of your Git user.email.
Development
Create and use a virtual environment:
py -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e .
pip install pytest
pytest -q -p no:cacheprovider
License
MIT License.
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
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 git_gamify-1.1.0.tar.gz.
File metadata
- Download URL: git_gamify-1.1.0.tar.gz
- Upload date:
- Size: 34.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d05df382ab058f254c1b4394edc951292056587a5b4095d2a8bfc45bde9df7b
|
|
| MD5 |
d08a1969b42cbd7355fc76ca1097e206
|
|
| BLAKE2b-256 |
7bec1ca93536d7b9cfa6adf6f189c6863ce847d211a3ffa4404f6746f8e2bcc4
|
File details
Details for the file git_gamify-1.1.0-py3-none-any.whl.
File metadata
- Download URL: git_gamify-1.1.0-py3-none-any.whl
- Upload date:
- Size: 29.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
327f441bb5bee32ea02c981f31a08b27dae2e80b868d280ac90bc5a246cb2787
|
|
| MD5 |
56a7612fdb259650538dfd17e575a990
|
|
| BLAKE2b-256 |
3c5900da3a794c8459a4ea82ae6ffef7316e013f1dd8203ba9e39d6c044fd480
|