| icon | lucide/rocket |
|---|
This guide will help you install gut and get it configured for your GitHub organization.
Download the latest nightly build for your platform:
Extract the archive and move the binary to somewhere on your $PATH.
If you prefer to build from source:
- Install Rust
- Clone the repository:
git clone https://github.com/divvun/gut.git cd gut - Build and install:
cargo install --path .
The gut binary will be installed to ~/.cargo/bin/.
gut needs a personal access token to interact with GitHub's API:
- Go to GitHub Settings > Personal Access Tokens
- Click "Generate new token (classic)"
- Give it a descriptive name (e.g., "gut CLI")
- Select the required scopes:
repo(Full control of private repositories)admin:org(Full control of orgs and teams) - if managing organizationsdelete_repo(Delete repositories) - if you need this capability
- Click "Generate token"
- Copy the token - you won't be able to see it again!
Run the initialization command:
gut init -r <root-dir> -t <token>Parameters:
-
<root-dir>: The directory where gut will store all cloned repositories- Repositories are organized as
<root-dir>/<organization>/<repo-name> - Example:
/Users/you/projects/repos
- Repositories are organized as
-
<token>: The GitHub personal access token you created in step 1
Example:
gut init -r ~/gut-repos -t ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxThis creates a configuration file in your system's config directory (e.g., ~/.config/gut/ on Linux/macOS).
To avoid specifying -o <owner> with every command, set a default:
gut set owner <owner-name>For example:
gut set owner divvunBy default, gut uses HTTPS for git operations. If you prefer SSH:
- Set up an SSH key for GitHub following these instructions
- When running
gut init, the tool will detect your SSH setup
!!! note "Protocol Selection" The choice between HTTPS and SSH is made during initialization. HTTPS is recommended for simplicity, while SSH is useful if you have complex authentication requirements or use hardware security keys.
Check that everything is working:
# View your configuration
gut show config
# List repositories in your organization
gut show repositories -o <org-name> -r ".*"If these commands work, you're all set!
Now that gut is installed and configured, you can:
- Explore common commands to see what gut can do
- Check out the usage overview for detailed command documentation
- Learn about the architecture if you want to contribute
- Run
gut --helpto see all available commands - Run
gut <command> --helpfor help with a specific command - Check the GitHub issues for known problems
- Review the USAGE.md file for additional examples