nut 🔩
A workspace manager for working with multiple GitHub repositories simultaneously.
Overview
nut creates isolated workspaces for organizing and managing clones of GitHub repositories. The import command uses a local cache reduce cloning time to a minimum.
Usage
Create a workspace
This creates a new workspace and starts a shell session within it.
List workspaces
Enter an existing workspace
Import repositories
Import a single repository:
Import all repositories from a user:
Import all repositories from an organization:
Status command
Check the status of all repositories in the workspace:
The status command:
- Shows a summary of total repositories and how many have changes
- Lists only repositories with changes (clean repos are not displayed)
- For each changed repository, displays:
- Repository name and current branch
- Number of staged files
- Number of modified files
- Number of untracked files
This makes it efficient to check the status even when working with 100+ repositories.
Other commands
nut cache-dir- Print git cache directory pathnut data-dir- Print workspace data directory path
Not implemented yet
nut reset- Reset changes in workspacenut commit --message <msg>- Commit changesnut submit [--branch <name>] [--create-pr]- Submit changes
How it works
nut maintains two directories:
- Cache directory: Stores bare git repositories as mirrors for fast cloning
- Data directory: Contains individual workspaces, each with their own repository clones
When importing repositories, nut first creates or updates a cached bare clone, then uses git clone --local to create fast workspace copies. Workspaces are identified by ULID timestamps.
nut is smart and just knows when the cache repositories need updating.
Development
Running Tests
The project includes integration tests that verify the CLI behavior:
For more information about the testing strategy, see tests/README.md.
Building
License
See LICENSE file for details.