Turn your daily Git workflow into a lightweight RPG loop.
Earn XP, level up, and unlock achievements from real Git usage.
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.
- 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
Requirements:
- Python 3.8+
- Git
Install from PyPI:
pip install git-gamifyOr install this repo in editable mode:
pip install -e .- 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.
Edit your profile:
notepad $PROFILEAdd:
function git {
gg git @args
}Restart PowerShell.
Add to ~/.bashrc or ~/.zshrc:
function git() {
gg git "$@"
}Reload shell (source ~/.bashrc / source ~/.zshrc) or restart terminal.
Run once:
gg --install-completion powershell(bash and zsh are also supported via Typer installer.)
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.
Show user profile, level progress, and unlocked achievements.
gg profileOptions:
gg profile --statsorgg profile -sgg profile --reset
Read or update config values.
gg config --get language
gg config --set language=zh
gg config --set language=enPrint local diagnostics (environment, git, and project status) for troubleshooting.
gg doctorShow internal command help.
gg helpUser data is stored locally under:
- Windows:
%USERPROFILE%\.git-gamify - Unix-like:
~/.git-gamify
Profiles are keyed by a hash of your Git user.email.
Create and use a virtual environment:
py -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e .
pip install pytest
pytest -q -p no:cacheproviderMIT License.