j 9ad82ca526
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 6s
Build-Test-Publish / build (linux/arm64) (push) Successful in 12s
fix: Return exit code 0 on success when running without TTY (e.g. background execution)
2026-03-15 13:24:31 +13:00
2025-09-02 20:41:11 +12:00
2025-08-24 16:09:47 +12:00

gp - Git Push

Add, commit, and push in one command. Generates commit messages using Claude AI with a heuristic fallback.

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

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

CI Workflow Monitoring

After pushing to a Gitea remote, gp automatically monitors the CI workflow progress, showing per-job status:

[INFO] Waiting for CI workflow... (press ESC to stop waiting)
  ✓ build (linux/amd64)
  ⠹ build (linux/arm64) running
  · test-install (linux/amd64) queued
  · test-install (linux/arm64) queued
  • Press ESC at any time to stop waiting (CI continues in background)
  • Requires a Gitea API token (extracted from the remote URL or GITEA_TOKEN env var)
  • Automatically skipped for GitHub/GitLab remotes or when no token is available
  • Use --no-wait to 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 --global gp.auto-yes true  # Apply globally

Commit Message Generation

Uses Claude AI (claude --print) if available, otherwise falls back to heuristic analysis:

  • 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
  • File type prefixes: feat:, docs:, test:, config:
Description
Lazy Git Push command
Readme 144 KiB
Languages
Shell 100%