Git-based package manager CLI
Project description
zyt 🚀
zyt is a lightweight, high-performance Git repository manager designed to streamline your terminal-based workflow. It automates common tasks like cloning, forking, and syncing, allowing you to focus on code rather than Git syntax.
📖 Overview
Working with Git often involves repetitive commands, manual remote configurations, and context-switching between different authentication methods. zyt eliminates these friction points by providing:
- Intuitive Commands: Short, memorable aliases for complex Git operations.
- Auto-Authentication: Seamlessly detects and uses Git CLIs (
gh,glab), SSH, or HTTPS. - Smart Forking: Automatically configures
origin(your fork) andupstream(the source) remotes. - Selective Cloning: Clone specific files or directories without downloading the entire repository.
- Local Registry: Keeps track of your managed repositories with metadata like clone date and auth method.
🚀 Getting Started
Installation
The recommended way to install zyt is via pipx:
pipx install zyt-si
Requirements
- Python >= 3.8
git- (Optional) GitHub CLI (
gh) or GitLab CLI (glab) for enhanced forking support.
🛠 Core Commands
| Command | Description | Flag Support (-my) |
Usage Example |
|---|---|---|---|
in |
Clone a repository | ✅ | zyt in google/googletest |
f |
Fork and clone | ✅ | zyt f torvalds/linux |
sync |
Sync fork with upstream | ❌ | zyt sync linux |
up |
Fresh re-clone | ✅ | zyt up owner/repo |
get |
Clone specific directory/file | ✅ | zyt get owner/repo/src |
un |
Delete local repository | ❌ | zyt un my-old-repo |
l |
List managed repositories | ❌ | zyt l a |
info |
View repository details | ❌ | zyt info my-repo |
man |
Detailed manual | ❌ | zyt man sync |
🔥 Features & Deep Dive
🔐 Authentication Auto-Detection
zyt intelligently identifies the best way to interact with your Git provider. It prioritizes methods in this order:
- Git CLIs: Uses existing authentication from
gh,glab, orbitbucket. - SSH: Uses your local SSH keys.
- HTTPS: Falls back to standard HTTPS cloning.
🍴 Professional Forking & Syncing
- Fork (
f): Forks the repo via CLI, clones it, and automatically adds the source as anupstreamremote. - Sync (
sync): Fetches fromupstream, detects your current branch, and attempts a rebase. If conflicts occur, it safely aborts the rebase and performs a merge instead.
📥 Selective Clone (get)
Download only specific parts of a repository. It offers two modes:
- Absolute Path: If you know the exact path (e.g.,
src/utils), zyt will extract it directly. - Search Mode: If you only know the filename or folder name, zyt will scan the repo, list all matches, and let you pick the one you want to download.
🔄 Safe Updates (up)
Unlike a simple git pull, zyt up ensures a clean state:
- It renames your current directory to a timestamped
trashfolder. - It performs a fresh
git clone. - On success, it deletes the
trash. On failure, it rolls back by restoring your original folder.
👤 The -my Flag
Available for in, f, up, and get. It automatically prepends your Git user.name to the repository path.
zyt in my-project -my
# Result: zyt clones <your-username>/my-project
📂 Project Structure
src/zyt/
├── auth.py # Authentication detection logic
├── cli.py # CLI entry point and dispatching
├── config.py # Configuration and data path management
├── gitops.py # Core Git operations (clone, fork, sync)
├── registry.py # Local JSON registry management
├── OtherOps.py # Manuals and auxiliary operations
└── ExceptionHandler.py # Centralized error handling
📄 License
zyt is open-source software licensed under the GNU General Public License v3.
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 zyt_si-2.1.1.tar.gz.
File metadata
- Download URL: zyt_si-2.1.1.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
582bfdf3ae29d9719b6a020ed32a88c11efbe6ea220c074e7529990379b0aa6a
|
|
| MD5 |
f84b3ddcd1dd79cf3aa6b088d263dee7
|
|
| BLAKE2b-256 |
50794911286847f0951a69d8021b691f2e720a946a1f380e6101f7f114cff7a5
|
File details
Details for the file zyt_si-2.1.1-py3-none-any.whl.
File metadata
- Download URL: zyt_si-2.1.1-py3-none-any.whl
- Upload date:
- Size: 24.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eafb0a4e1e167f003366d2993e6a04b33202c167e29b6a36bdf345959749bfa5
|
|
| MD5 |
91bc830d4e790161cf193851e102ee97
|
|
| BLAKE2b-256 |
1729bc8ce1ad54de79b67ef141329aa9e6708db40cbd57fecd5cb141dd5c0718
|