Skip to main content

GitLazy (gz)

gz is a cross-platform Git automation helper designed to streamline everyday workflows. It stages, summarizes, commits, rebases, and pushes changes with a single command, adapting intelligently to the state of your repository.

Features

  • Works from any subdirectory by auto-detecting the repository root (or via an explicit path argument).
  • Generates commit messages with [add], [refactor], or [removed] tags based on the staged changes.
  • Summarizes added, modified, renamed, and removed files in the commit body.
  • Performs git pull --rebase --autostash for safe synchronization.
  • Pushes automatically when an upstream is configured and guides you when it is not.
  • Handles conflicts gracefully by surfacing clear next steps.

Installation

Via PyPI (recommended)

pip install gitlazy-cli

This installs the gz console script on your PATH.

Manual install (macOS / Linux)

sudo cp gz /usr/bin/gz
# or, without sudo:
mkdir -p ~/.local/bin
cp gz ~/.local/bin/
chmod +x ~/.local/bin/gz
# ensure ~/.local/bin is on your PATH

Manual install (Windows PowerShell or CMD)

  1. Install Python 3.8+ and Git.
  2. Save gz to %USERPROFILE%\bin\gz.
  3. Create gz.cmd somewhere on your PATH containing:
    @echo off
    python "%USERPROFILE%\bin\gz" %*
    

Now gz is available globally.

Usage

# Run from the current repo
gz

# Target an explicit repo
gz /path/to/repo

# Or via python -m
python -m gitlazy /path/to/repo

Example Output

[refactor] 2 updated, 1 added
3 files changed, 54 insertions(+), 23 deletions(-)
Done. Changes committed, rebased, and pushed.

Behavior

  • Always stages everything with git add -A.
  • Skips committing when no changes are staged but still performs a safe pull/push.
  • Skips pull/push and prints the upstream command when the current branch has no upstream configured.
  • On pull failures, surfaces Git’s stderr and reminds you to finish any rebase with git rebase --continue before pushing.
  • When no upstream is configured:
    git push --set-upstream origin <branch>
    

Acceptance Checks

  1. Add only: create a repo, add files, run gz → [add] <count> added.
  2. Modify + add: modify and add files, run gz → [refactor] … updated, … added.
  3. Rename + delete: rename and delete files, run gz → [removed] … renamed, … removed.
  4. No changes: run gz with a clean tree → prints “Nothing to commit. Syncing with remote…” and still pulls/pushes.
  5. New branch: run on a branch without upstream → shows git push --set-upstream origin <branch>.
  6. Cross-path: run from subfolders or via gz /path/to/repo → operates on the correct repository.
  7. Outside repo: run where no .git exists → exits with a helpful error message.

Development Notes

  • Python 3.8+ package with a single CLI module.
  • Depends only on the Python standard library modules: os, sys, pathlib, subprocess, and shutil.

Building and publishing

python -m build
twine upload dist/*

Use TestPyPI first: twine upload --repository testpypi dist/*.


Happy automating! 🎯

Metadata

Release files for gitlazy-cli 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gitlazy-cli 0.1.2
File Size Uploaded Provenance Actions
gitlazy_cli-0.1.2.tar.gz 6.4 kB Without provenance Details for gitlazy_cli-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gitlazy-cli 0.1.2
File Interpreter ABI Platform Actions
gitlazy_cli-0.1.2-py3-none-any.whl Python 3 none any Details for gitlazy_cli-0.1.2-py3-none-any.whl

Total release size: 13.5 kB

Release files / gitlazy_cli-0.1.2.tar.gz

Download URL gitlazy_cli-0.1.2.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5a1f2a8c7cf54512c6c4bc6d08b875797bd6e1e16c81baccfb5ff6f4286cc868
BLAKE2b-256 checksum
How to use checksums
22409a20e92474a474c3cd0946dada892a2e54c0b10abf2ba5d8766b3d69fe7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / gitlazy_cli-0.1.2-py3-none-any.whl

Download URL gitlazy_cli-0.1.2-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d47c8fe05e2ddc3691179076648a361ddb76caccf10eca37c64fba8e5ce238b2
BLAKE2b-256 checksum
How to use checksums
c6a88d97e1bfbfb229e391481d3eefe2dc13789e76285380f74bf9fe5a28fbde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Security for gitlazy-cli 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page