- Go 90.3%
- Shell 9.7%
| .gitea/workflows | ||
| .gitignore | ||
| build.sh | ||
| ci.go | ||
| display.go | ||
| git.go | ||
| go.mod | ||
| llm.go | ||
| llm_test.go | ||
| main.go | ||
| publish.sh | ||
| README.md | ||
| setup_script.sh | ||
| test.sh | ||
gp - Git Push
Add, commit, and push in one command.
Generates commit messages using a configurable LLM with a heuristic fallback. Supports pushing multiple repos and waiting for all CI workflows in parallel.
Install
getpkg install gp
Usage
gp # Add all, auto-generate commit message, push
gp "Fix the parser" # Custom commit message
gp --dry-run # Preview without executing
gp --staged-only # Only commit staged changes
gp -y # Skip confirmations
gp -b develop # Push to a specific branch
gp --no-wait # Don't wait for CI after push
gp --llm ask # Use ask for commit messages
gp -y repo1/ repo2/ repo3/ # Push multiple repos, parallel CI wait
Options
| Option | Description |
|---|---|
-n, --dry-run |
Preview changes without executing |
-f, --force |
Skip all confirmations |
-y, --yes |
Auto-answer yes to prompts |
-a, --add-all |
Add all files including untracked (default) |
--staged-only |
Only commit staged changes |
-b, --branch |
Push to specified branch |
--no-wait |
Skip waiting for CI workflow |
--llm NAME |
LLM for commit messages (see below) |
Commit Message Generation
The LLM used for commit messages is configurable via --llm, GP_LLM env var, or git config gp.llm:
| Value | Description |
|---|---|
auto |
Try ask, claude, ollama, then heuristic (default) |
ask |
Use the ask utility, configured by ~/.config/ask/ask.env |
claude |
Use Claude CLI (claude --print) |
ollama |
Use Ollama API with default model (qwen2.5:0.5b) |
ollama:MODEL |
Use Ollama API with a specific model (e.g. ollama:qwen2.5:1.5b) |
none |
Heuristic only, no LLM |
ask reads its router settings from ~/.config/ask/ask.env, usually LLM_ROUTER_URL="http://rtx6000pro.home:8585".
When ask is used, gp runs it with -v and reports the routed model when ask includes one, for example ask:qwen3.6-27b-fp8.
Generated messages are shown with their source, for example Generated commit message using ask:qwen3.6-27b-fp8: 'Update gp commit message reporting'.
The Ollama API URL defaults to http://localhost:11434 and can be changed with GP_OLLAMA_URL or git config gp.ollama-url.
Heuristic fallback examples:
- Single file:
Add src/auth.py,Update README.md,Remove old_config.json - Multiple files:
feat: Add 2 and update 3 files,docs: Update 2 files
Multi-Repo
Pass directory arguments to commit and push multiple repos, then wait for all CI workflows in parallel:
gp -y repo1/ repo2/ repo3/
Each repo gets its own auto-generated commit message. All commits and pushes happen first, then all CI workflows are monitored simultaneously. This replaces the old waterfall pattern of running gp in each repo one at a time.
CI Workflow Monitoring
After pushing to a Gitea remote, gp automatically monitors CI workflow progress:
[INFO] Waiting for CI workflows... (press ESC to stop)
myproject
✓ build (linux/amd64)
⠹ build (linux/arm64) running
otherproject
⠋ build (linux/amd64) running
· build (linux/arm64) queued
- Press ESC at any time to stop waiting (CI continues in background)
- Requires a Gitea API token (from the remote URL,
GITEA_TOKENenv, or git credential store) - Automatically skipped for GitHub/GitLab remotes or when no token is available
- Use
--no-waitto disable
Config Defaults
Set per-repo or global defaults via git config:
git config gp.auto-yes true # Skip confirmations (like -y)
git config gp.wait false # Don't wait for CI (like --no-wait)
git config gp.llm ask # Default LLM for commit messages
git config gp.ollama-url http://... # Ollama API URL
git config --global gp.llm claude # Apply globally