13 releases
| 0.3.0 | Nov 15, 2025 |
|---|---|
| 0.2.2 | Nov 15, 2025 |
| 0.1.8 | Sep 4, 2025 |
| 0.1.4 | May 18, 2025 |
#709 in Development tools
55KB
933 lines
π οΈ syncgit β Git Sync CLI (v0.2.0)
A lightweight Rust-based CLI to streamline everyday Git workflows with enhanced safety and user experience. Automatically detects repository context, provides clear status, and guides you through the commit and sync process with intuitive prompts.
π What's New in v0.2.0
- π‘οΈ Safer Push Workflow: Added explicit confirmation before pushing changes
- π Improved Sync: Better handling of remote changes with clear prompts
- π Fully Internationalized: All user-facing messages now in English
- π― More Precise: Better detection of repository state and changes
- π οΈ Bug Fixes: Various stability improvements and edge case handling
π Features
- π Auto-detects the repository root (
.git) - π§ Context-aware: Shows repository root and current subpath
- π Clear status overview with color-coded output
- π Subpath-aware operations for precise changes
- β―οΈ Interactive workflow with clear prompts at each step
- π Smart sync that handles both push and pull scenarios
- π Secure credential handling with GitHub token support
- π Offline-friendly with clear status indicators
- π§ Works from any subdirectory within a repository
All path-sensitive git operations use git -C <repo_root> for robust behavior regardless of where you run syncgit.
π οΈ Installation
Prerequisites
- Rust (latest stable version recommended)
- Git 2.0 or later
Install from crates.io
cargo install syncgit
Build from source
git clone https://github.com/rickypcyt/syncgit-rustcli.git
cd syncgit
cargo install --path .
GitHub Token (for private repositories)
To work with private repositories, set your GitHub token:
export GITHUB_TOKEN=your_github_token_here
# Add to your shell's rc file to make it persistent
π Basic Usage
Run the tool from any directory within a Git repository:
syncgit
The tool will guide you through:
- Reviewing changes
- Staging files
- Committing with a message
- Syncing with remote (if needed)
- Info header:
Repository rootandSubpath. - Global short status.
- Check pending pushes; optionally push first.
- Pull changes.
- Local changes check; show subpath-only grouped status.
- Stage only current subpath (idempotent if already staged).
- Pause: press Enter β ask for commit message.
- Commit and push.
Subpath grouping (visual aid)
When youβre in a parent folder with multiple projects, the subpath status is grouped by top-level folder. This keeps large changes readable and helps you focus on a particular folderβs changes when committing from the parent.
π Offline Mode
If no internet connection is detected, changes are committed locally but not pushed. A message will inform you to push manually once online.
π GitHub Token Authentication
To push to private GitHub repositories via HTTPS, the tool will use the GITHUB_TOKEN environment variable (if available) to authenticate securely by rewriting the remote URL temporarily.
π¦ Update to latest version
- Update this CLI:
cargo install syncgit --force
- Or manage binaries with cargo-update:
cargo install cargo-update
cargo install-update -a
π Dependencies
term_size: For responsive terminal layout.- Standard Rust
std::process,std::io,std::env, andstd::net.
π Changelog
- 0.1.6
- Grouped subpath status printing for cleaner views in parent folders with many projects.
- Staging limited to current subpath; consistent
git -C <root>usage. - βPress Enter to commit changesβ¦β pause before commit message.
- Header simplified:
Repository root+Subpath. - Various UX improvements and clearer outputs.
π€ Contributions
Pull requests and feedback are welcome! Please open an issue first to discuss any major changes.
Made with β€οΈ in Rust.
Dependencies
~6β22MB
~250K SLoC