One-command git workflow helper: add, summarize, commit, pull --rebase, and push.
Project description
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! 🎯
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gitlazy_cli-0.1.2.tar.gz.
File metadata
- Download URL: gitlazy_cli-0.1.2.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a1f2a8c7cf54512c6c4bc6d08b875797bd6e1e16c81baccfb5ff6f4286cc868
|
|
| MD5 |
dec4797d69a8d922f79eae8374c173df
|
|
| BLAKE2b-256 |
22409a20e92474a474c3cd0946dada892a2e54c0b10abf2ba5d8766b3d69fe7c
|
File details
Details for the file gitlazy_cli-0.1.2-py3-none-any.whl.
File metadata
- Download URL: gitlazy_cli-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d47c8fe05e2ddc3691179076648a361ddb76caccf10eca37c64fba8e5ce238b2
|
|
| MD5 |
e234e37b7cdd96301fcc722e9f5dba32
|
|
| BLAKE2b-256 |
c6a88d97e1bfbfb229e391481d3eefe2dc13789e76285380f74bf9fe5a28fbde
|