wspace (published as @wazoo/workspace) is
a Git-native CLI that manages multi-repository Wazoo workspaces without Git
submodules. It consolidates workspace conventions into a manifest
(workspace.json) and standardizes feature development with Git worktrees.
Overview
Complex applications and agent infrastructure often span multiple independent Git repositories.wspace treats repository families as a synchronized
ecosystem without submodules:
- Submodules: Preserves independent Git history, remotes, package managers, and release surfaces for every repository.
- Git worktree isolation: Isolates feature development into linked worktrees
(
worktrees/<repo>/<feature>), preventing dirty state in base checkouts. - Conservative operations: Mutating command (
update) refuses to rewrite user history, touch dirty repositories, or alter unmanaged checkouts. - Project agnostic: Configured via a manifest file (
workspace.json) or custom--manifest <path>.
Repositories and packages
Installation
Install thewspace CLI using Deno:
wspace. Building from source writes
the binary to ./wspace.
Command reference
wspace check
Performs a read-only health check across the manifest-managed repositories and
linked feature worktrees.
- Reports each repository as
CLEAN,DIRTY,FEATURE_CLEAN,DIVERGED,UNKNOWN,MISSING, orUNMANAGED, withWORKTREE_DIRTYorERRORfor linked worktrees. - Filters directory scans to exclude managed repositories from unmanaged output.
- Exits
0when clean and1when any repository or worktree requires attention.
wspace init
Scaffolds a brand-new workspace in an empty directory: writes a schema v4
workspace.json with optional host, owner, and seed entries, then creates
repos/.
- Refuses to overwrite an existing manifest.
- Does not clone repositories; run
wspace installafter scaffolding.
wspace install
Clones repositories listed in the manifest that are missing from
repositoriesDirectory.
- Re-resolves the tree between passes, so newly detected sub-manifests bootstrap without reruns.
- Exits non-zero (
1) if a clone fails or collides with a non-Git path (PATH_BLOCKED). - Does not reset, overwrite, or clean up existing checkouts.
wspace update
Fetches remotes and fast-forwards clean default branches.
- Skips repositories checked out on feature branches (
SKIP_FEATURE) or containing uncommitted changes (SKIP_DIRTY). - Fast-forwards only clean default branches tracking remote branches without divergence.
wspace validate
Validates the manifest schema without touching the filesystem or invoking Git.
Beginner worktree lifecycle
Execute all commands from the workspace root (the directory containingworkspace.json):
- Scaffold:
wspace init(new workspaces) orwspace install(existing manifests) - Check status:
wspace check - Refresh baselines:
wspace update - Create worktree:
- Develop:
- Sync local secrets: copy local credentials (
.envfiles, tokens) into the checkout manually; they are never committed or synced bywspace - Push and create pull request:
- Find merged worktrees:
git -C repos/<repo> worktree list --porcelain - Clean up:
git -C repos/<repo> worktree remove "$PWD/worktrees/<repo>/<feature>"
Path resolution and worktree location
- Manifest discovery: By default
wspacelooks forworkspace.json, thenworkspace.jsonc, in the current directory. Pass--manifest <path>to point at a manifest elsewhere. Relative repository and worktree paths resolve relative to the directory containing the manifest, regardless of caller directory. - Why
$PWDis used withgit -C:git -C repos/<repo>changes Git’s working directory torepos/<repo>before executing. Passing a relative path likeworktrees/<repo>/<feature>would nest the worktree insiderepos/<repo>/worktrees/. Using"$PWD/worktrees/<repo>/<feature>"resolves$PWDfrom the workspace root before Git runs.
Worktree dependency management
Each Git worktree maintains an independent working directory, while package managers optimize dependency caching across worktrees:pnpm: Uses a central content-addressable store (~/.local/share/pnpm/store). Runningpnpm installin a new worktree hard-links dependencies from the central store without duplicating files or re-downloading packages.- Deno: Uses the global
DENO_DIRmodule cache (~/.cache/denoor%LOCALAPPDATA%\deno), sharing cached dependencies across all worktrees zero-copy. - npm / yarn: Running
npm installoryarn installinside a worktree installs dependencies for that worktree, fetching packages from the shared user HTTP cache.
Manifest schema
Schema v4 keeps a single flatrepositories[] array, with a host and owner
for shorthand expansion:
- Shorthand string:
"repo"expands tohttps://<host>/<owner>/<repo>;"owner/repo"expands tohttps://<host>/<owner>/<repo>with an inline owner.hostdefaults togithub.com. - Object entry:
{ "name", "url" }(any Git host) or{ "name", "owner" }(host shorthand).urlandownerare mutually exclusive. - Directories:
repositoriesDirectorydefaults torepos. Relative paths anchor to the folder containing the manifest file. - Names: a repository checks out at
<repositoriesDirectory>/<name>; names reject slashes and path traversal, and must be unique across the manifest.