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 --autostashfor 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)
- Install Python 3.8+ and Git.
- Save
gzto%USERPROFILE%\bin\gz. - Create
gz.cmdsomewhere on yourPATHcontaining:@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 --continuebefore pushing. - When no upstream is configured:
git push --set-upstream origin <branch>
Acceptance Checks
- Add only: create a repo, add files, run
gz→[add] <count> added. - Modify + add: modify and add files, run
gz→[refactor] … updated, … added. - Rename + delete: rename and delete files, run
gz→[removed] … renamed, … removed. - No changes: run
gzwith a clean tree → prints “Nothing to commit. Syncing with remote…” and still pulls/pushes. - New branch: run on a branch without upstream → shows
git push --set-upstream origin <branch>. - Cross-path: run from subfolders or via
gz /path/to/repo→ operates on the correct repository. - Outside repo: run where no
.gitexists → 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, andshutil.
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)
| 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)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| 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.