workspace-cli-1.0.0 is not a library.
workspace-cli
Manage multiple repos as a virtual workspace via symlinks, streamline multi-repo dev workflows easily.
Implementation Details
Tech Stack
- Language: Rust
- CLI Framework:
clap - TUI Framework:
ratatui+crossterm - Error Handling:
anyhow
Storage Layout
- Default location:
~/.workspaces/<name>/ - No central registry file; the filesystem directory structure is the source of truth.
- Symlinks are created directly under each workspace directory.
└── <workspace_name>/ # Workspace directory, holds symlinks
└── <link_name> -> /path/to/repo
Core Features
- Zero dependencies: compiled into a single static binary, no extra runtime required.
- TUI activation: use
workspace activatefor interactive workspace selection. - Sub-shell activation: activation launches a new shell in the workspace directory. Exit the shell to return to the previous state.
Configuration
You can customize the storage location via environment variable:
WORKSPACE_ROOT: workspace root directory (default:~/.workspaces).
Installation
Build from Source
# Option 1: use cargo directly
# cargo build --release
# Option 2: use the build script wrapper
# Binary located at ./target/release/workspace-cli
Install to System (Optional)
Move the compiled binary into a directory on your PATH, for example /usr/local/bin:
# You can now use the `workspace` command anywhere
Usage
Create a Workspace
# Or use the -n flag
Sample output:
Created workspace directory: "/Users/user/.workspaces/my-project"
Linked "/Users/user/.workspaces/my-project/backend" -> "/Users/user/repos/backend"
Linked "/Users/user/.workspaces/my-project/frontend" -> "/Users/user/repos/frontend"
List Workspaces
Sample output (default):
my-project
backend; frontend
other-workspace
api; web
Sample output (detail):
my-project
backend -> "/Users/user/repos/backend"
frontend -> "/Users/user/repos/frontend"
other-workspace
api -> "/Users/user/repos/other/api"
web -> "/Users/user/repos/other/web"
Update a Workspace
Add a repo:
Sample output:
Linked "/Users/user/.workspaces/my-project/docs" -> "/Users/user/repos/docs"
Remove a link:
Sample output:
Removed link: frontend
Activate a Workspace
# Activate a specific workspace
# or
# Interactive selection
Interactive UI example:
┌ Select Workspace ──────────────┐
│>> my-project │
│ other-workspace │
│ │
└────────────────────────────────┘
Use ↑/↓ to move, Enter to select, q/Esc to quit
After selection:
Activating workspace: my-project
Entering sub-shell at "/Users/user/.workspaces/workspaces/my-project"
# (You are now in a new shell; current directory is the workspace root)
Remove a Workspace
Sample output:
Removed workspace: my-project