| Crates.io | gwt-cli |
| lib.rs | gwt-cli |
| version | 6.0.3 |
| created_at | 2026-01-14 15:02:31.403477+00 |
| updated_at | 2026-01-15 08:36:29.502731+00 |
| description | CLI for Git Worktree Manager with AI coding agent integration |
| homepage | |
| repository | https://github.com/akiojin/gwt |
| max_upload_size | |
| id | 2042970 |
| size | 487,223 |
Interactive Git worktree manager with Coding Agent selection (Claude Code / Codex CLI / Gemini CLI / OpenCode), graphical branch selection, and advanced workflow management.
@akiojin/gwt is a powerful CLI tool that revolutionizes Git worktree management through an intuitive interface. It seamlessly integrates with Claude Code / Codex CLI / Gemini CLI / OpenCode workflows, providing intelligent branch selection, automated worktree creation, and comprehensive project management capabilities.
The Rust implementation covers the core CLI/TUI workflow and the Web UI (REST + WebSocket terminal). The migration from TypeScript/Bun to Rust is complete. Remaining work is focused on documentation polish and continuous improvements.
~/.gwt/tools.jsonGitHub Releases are the source of truth for prebuilt binaries. The npm/bunx wrapper downloads the matching release asset on install.
Download pre-built binaries from the Releases page:
gwt-linux-x86_64 - Linux x86_64gwt-linux-aarch64 - Linux ARM64gwt-macos-x86_64 - macOS Intelgwt-macos-aarch64 - macOS Apple Silicongwt-windows-x86_64.exe - Windows x86_64# Example for Linux x86_64
curl -L https://github.com/akiojin/gwt/releases/latest/download/gwt-linux-x86_64 -o gwt
chmod +x gwt
sudo mv gwt /usr/local/bin/
Install globally or run without installation:
# Global install
npm install -g @akiojin/gwt
bun add -g @akiojin/gwt
# One-time execution
npx @akiojin/gwt
bunx @akiojin/gwt
Install the CLI with Cargo:
# From crates.io (recommended for Rust users)
cargo install gwt-cli
# With cargo-binstall (faster, downloads prebuilt binary)
cargo binstall gwt-cli
# From GitHub (latest development version)
cargo install --git https://github.com/akiojin/gwt --package gwt-cli --bin gwt --locked
# Or, from a local checkout
cargo install --path crates/gwt-cli
# Or run directly from source
cargo run -p gwt-cli
# Clone the repository
git clone https://github.com/akiojin/gwt.git
cd gwt
# Build release binary
cargo build --release
# The binary is at target/release/gwt
./target/release/gwt
Run in any Git repository:
# If installed globally or in PATH
gwt
# Or use bunx for one-time execution
bunx @akiojin/gwt
CLI options:
# Display help
gwt --help
# Check version
gwt --version
# List worktrees
gwt list
# Add worktree for existing branch
gwt add feature/my-feature
# Create new branch with worktree
gwt add -n feature/new-feature --base develop
# Remove worktree
gwt remove feature/old-feature
# Cleanup orphaned worktrees
gwt clean
The tool presents an interactive interface with the following options:
gwt detects agents available on PATH and lists them in the launcher.
Supported agents (built-in):
claude)codex)gemini)opencode)Custom agents are defined in ~/.gwt/tools.json and will appear in the launcher.
Minimal example:
{
"version": "1.0.0",
"customCodingAgents": [
{
"id": "aider",
"displayName": "Aider",
"type": "command",
"command": "aider",
"defaultArgs": ["--no-git"],
"modeArgs": {
"normal": [],
"continue": ["--resume"],
"resume": ["--resume"]
},
"permissionSkipArgs": ["--yes"],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
]
}
Notes:
type supports path, bunx, or command.modeArgs defines args per execution mode (Normal/Continue/Resume).env is optional per-agent environment variables.This repository follows a structured branching strategy:
main: Production-ready code. Protected branch for releases only.develop: Integration branch for features. All feature branches merge here.feature/*: New features and enhancements. Must be based on and target develop.hotfix/*: Critical production fixes. Based on and target main.release/*: Release preparation branches.Important: When creating feature branches, always use develop as the base branch:
# Correct: Create feature branch from develop
git checkout develop
git pull origin develop
git checkout -b feature/my-feature
# Or use this tool which handles it automatically
gwt
# → Select "Create new branch" → "feature" → automatically uses develop as base
Important: This workflow is intended for human developers. Autonomous agents must never create or delete branches unless a human gives explicit, task-specific instructions.
@akiojin/gwt/
├── Cargo.toml # Workspace configuration
├── crates/
│ ├── gwt-cli/ # CLI entry point and TUI (Ratatui)
│ ├── gwt-core/ # Core library (worktree management)
│ ├── gwt-web/ # Web server (future)
│ └── gwt-frontend/ # Web frontend (future)
├── package.json # npm distribution wrapper
├── bin/gwt.js # Binary wrapper script
├── scripts/postinstall.js # Binary download script
├── specs/ # Feature specifications
└── docs/ # Documentation
# Clone the repository
git clone https://github.com/akiojin/gwt.git
cd gwt
# Build the project
cargo build
# Run tests
cargo test
# Run with debug output
cargo run
# Development build
cargo build
# Release build
cargo build --release
# Run tests
cargo test
# Run clippy lints
cargo clippy --all-targets --all-features -- -D warnings
# Format code
cargo fmt
# Run the CLI locally
cargo run
cargo runcargo clippy and cargo fmt --checkcrates/gwt-cli/src/main.rs - Main application logicgwt-coregwt-cli/src/tui/thiserrorWe ship releases through release-please. End users can simply install the latest published package (via npm or the GitHub Releases tab) and rely on versioned artifacts. Maintainers who need the full workflow should read docs/release-guide.md (日本語版: docs/release-guide.ja.md).
Permission Errors: Ensure proper directory permissions
Git Worktree Conflicts: Use the cleanup feature to remove stale worktrees
GitHub Authentication: Run gh auth login before using PR cleanup features
Binary Not Found: Ensure the gwt binary is in your PATH
For verbose output, set the environment variable:
GWT_DEBUG=1 gwt
MIT - See LICENSE file for details
We welcome contributions! Please read our contributing guidelines: