gyt-cli
A Python CLI abstracting common Git interactions like Conventional Commit and Atlassian Smart Commit helpers.
Installation
From PyPI
pip install gyt-cli
From Source
git clone https://github.com/your-username/gyt-cli.git
cd gyt-cli
uv sync
uv run pip install -e .
Usage
After installation, the gyt command will be available:
gyt --help
Run gyt conf aliases to also expose every command as a git alias (git sync, git wip, ...).
Commands
Commands that take an optional BRANCH use it as the base branch. Without it, they use the
remote's default branch (refs/remotes/origin/HEAD), falling back to a local main or master.
| Command | What it does |
|---|---|
gyt fresh NAME |
Create a feature branch from HEAD and push it with an upstream. |
gyt camp MESSAGE [--type] [--scope] [--breaking-changes] |
Commit with a Conventional Commit / Atlassian Smart Commit message, then push. --breaking-changes adds the ! and a BREAKING CHANGE: footer. |
gyt sync [BRANCH] [--merge] |
Fetch and rebase (or merge) the current branch onto origin/BRANCH, stashing and restoring uncommitted work. Aborts cleanly on conflicts. |
gyt cleant [BRANCH] [--rebase] [--all] [--force] |
Check out and pull the base branch, delete local branches whose upstream is gone (merged and deleted on origin), then return to your branch (optionally rebasing it). --all also deletes branches that were never pushed. |
gyt branches [BRANCH] [--fetch] |
List local branches with ahead/behind counts vs. the base branch and their upstream state (gone, no upstream, ...). |
gyt undo [--force] |
Undo the last commit, keeping its changes staged. Refuses if it is already pushed unless --force. |
gyt squash [BRANCH] [-m MESSAGE] [--type] [--scope] [--push] |
Squash all commits since the branch left the base into one. Reuses the first non-WIP commit's message, or formats -m like camp. |
gyt fixup [COMMIT] [--no-rebase] |
Fold staged changes into an earlier commit via commit --fixup and a non-interactive autosquash rebase. Prompts for the commit when omitted. |
gyt rename NEW [--local] |
Rename the current branch locally and on origin, and repoint its upstream. |
gyt wip [--no-push] |
Commit everything, including untracked files, as chore: wip (skipping hooks) and push it. |
gyt unwip |
Turn the consecutive WIP commits on top of the branch back into uncommitted changes. |
gyt pr [BRANCH] [--no-open] |
Push the branch if needed and open GitHub's new pull request page, titled from the latest non-WIP commit. |
gyt tree BRANCH [--path] [--from] |
Check out a branch in a new worktree at <repo>-<branch> next to the repo. Creates the branch from the base if it doesn't exist. |
gyt repo / gyt ci / gyt jira |
Open the branch, CI, or Jira issue in the browser. |
Development
Prerequisites
- Python 3.10 or higher
- UV package manager
Setup Development Environment
-
Clone the repository:
git clone https://github.com/your-username/gyt-cli.git cd gyt-cli
-
Install dependencies using UV:
uv syncThis will create a virtual environment and install all production and development dependencies.
Development Workflow
Adding Dependencies
To add a new production dependency:
uv add <package-name>
To add a development dependency:
uv add --dev <package-name>
Running Tests
Run the test suite:
uv run pytest
Run tests with coverage:
uv run pytest --cov=gyt_cli
Code Quality
Format code with Black:
uv run black .
Run type checking with MyPy:
uv run mypy gyt_cli
Running the CLI During Development
Execute the CLI directly from source:
uv run gyt --help
Or run specific commands:
uv run gyt <command> <args>
Project Structure
gyt-cli/
├── gyt_cli/ # Main package
│ ├── __init__.py
│ ├── cli.py # CLI entry point
│ ├── commands/ # Command modules
│ ├── config/ # Configuration handling
│ └── utils.py # Utility functions
├── tests/ # Test suite
├── pyproject.toml # Project configuration
├── uv.lock # Dependency lock file
└── README.md # This file
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Run tests:
uv run pytest - Run code quality checks:
uv run black .anduv run mypy gyt_cli - Commit your changes using conventional commits
- Push to your fork and submit a pull request
License
This project is licensed under the Apache-2.0 License - see the LICENSE file for details.
Metadata
Release files for gyt-cli 1.1.0
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 |
|---|---|---|---|---|
| gyt_cli-1.1.0.tar.gz | 22.5 kB | With provenance | Details for gyt_cli-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gyt_cli-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for gyt_cli-1.1.0-py3-none-any.whl |
Total release size: 56.7 kB
Release files / gyt_cli-1.1.0.tar.gz
| Download URL | gyt_cli-1.1.0.tar.gz |
|---|---|
| Size | 22.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
defa0b78ac662b32c98c180012e8f035973789eba11172135d01ba11d1b220ee
|
|
BLAKE2b-256 checksum How to use checksums |
8483cf021d68bec3bfae60a5048098f88ad42a4b4323e9658a0a6ce2690b3420
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logRelease files / gyt_cli-1.1.0-py3-none-any.whl
| Download URL | gyt_cli-1.1.0-py3-none-any.whl |
|---|---|
| Size | 34.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ff085e3d3b27219eb9b67c564cc343308e17815e12e07e6fbd10a046f6dbd8b
|
|
BLAKE2b-256 checksum How to use checksums |
bf6a508f5cfd482dd623801763841f66a9f7be524a3f594bba4aea8b0271f8d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logSecurity for gyt-cli 1.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for gyt_cli-1.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logA 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.