tree-swing
v1.0.3
Published
Git branch management CLI tool
Downloads
305
Maintainers
Readme
🌳 Tree Swing
Interactive CLI tool for git branch management. Create feature branches from origin branches with configurable prefixes — no more typing long git commands.
✨ Features
- 🔀 Quick branch creation — Select an origin branch and get a prefixed feature branch in seconds
- 📋 Configurable presets — Define your own origin branches and prefixes
- ⌨️ Interactive TUI — Navigate with arrow keys, no flags or arguments needed
- 🛡️ Safety checks — Prevents duplicate prefixes and validates branch names
- 🎨 Colorful output — Clear step-by-step feedback in the terminal
📦 Prerequisites
- Bun runtime installed
🚀 Install
npm install -g tree-swingOr install from source:
git clone https://github.com/MrPinabutter/tree-swing-ts
cd tree-swing
npm install -g .📖 Usage
tree-swingAn interactive menu will appear:
- Select an origin branch (e.g.,
develop,staging) - The tool will:
- Fetch the latest from origin
- Create a new branch with the configured prefix (e.g.,
for-dev/your-current-branch) - Merge the origin branch into it
Config Manager
Select "other" from the main menu to:
- ➕ Create new config — Add a new origin branch + prefix pair
- 🗑️ Delete config — Remove an existing configuration
- ← Go back — Return to the main menu
⚙️ Configuration
Configs are stored in a config.txt file using a simple key=value format:
develop=for-dev
staging=for-stagEach line maps an origin branch (left) to a prefix (right). When you select develop, the tool creates a branch like for-dev/your-current-branch.
🗑️ Uninstall
npm uninstall -g tree-swing📝 License
MIT
