WSM Command Reference

Concise reference for core workspace, registry, git, and JS runner commands.

Sections

Terminology & Glossary
πŸ“– Documentation
Navigation
6 sectionsv0.1
πŸ“„ WSM Command Reference β€” glaze help wsm-command-reference
wsm-command-reference

WSM Command Reference

Concise reference for core workspace, registry, git, and JS runner commands.

Topicworkspace-managercommandsreferencediscoverlistcreatestatuscommitrebaserunner--workspace--jobs--output-mode

This page is a complete reference for every WSM command, organized by group. Every flag listed here is verified against the source code. If you are looking for a guided walkthrough, start with wsm help wsm-getting-started instead.

All commands accept the global --output-mode flag (see Output Modes at the bottom of this page).


Registry commands

These commands manage the repository registry that WSM uses to resolve repo names.

wsm discover [paths...]

Scan directories for git repositories and add them to the registry.

wsm discover ~/code ~/projects
wsm discover ~/monorepo --max-depth 1
FlagTypeDefaultDescription
pathsargument (list)cwdDirectories to scan
-r, --recursivebooltrueRecurse into subdirectories
--max-depthint3Maximum recursion depth

wsm list repos

List all discovered repositories.

wsm list repos
wsm list repos --tags go,cli
FlagTypeDefaultDescription
--tagsstring listFilter by tags (comma-separated)

wsm list workspaces

List all created workspaces, sorted newest first.

wsm list workspaces
wsm list workspaces --output-mode data

No command-specific flags.


Workspace commands

These commands manage the lifecycle of multi-repository workspaces.

wsm create <name>

Create a new workspace with git worktrees for the selected repositories.

wsm create my-feature --repos wsm,geppetto
wsm create hotfix --repos wsm --branch hotfix/urgent
wsm create spike --interactive --dry-run
FlagTypeDefaultDescription
workspace-nameargument(required)Name for the new workspace
--reposstring listRepository names to include
--branchstring(auto)Explicit branch name
--branch-prefixstringtaskPrefix for auto-generated branches
--base-branchstring(repo default)Base branch to create from
--agent-sourcestringPath to AGENT.md template to copy in
--interactiveboolfalseChoose repositories interactively
--dry-runboolfalsePreview without creating

When --branch is omitted, WSM generates <branch-prefix>/<workspace-name>.

wsm info [name]

Display metadata about a workspace.

wsm info
wsm info my-feature --field path
FlagTypeDefaultDescription
workspace-nameargument(auto-detect)Workspace name
--workspacestringWorkspace name (alternative)
--fieldstringOutput a single field: path, name, branch, repositories, created, date, time

Use --field path in scripts to get the workspace directory without parsing human output.

wsm status [name]

Show aggregated git status across all workspace repositories.

wsm status
wsm status my-feature --short
wsm status --untracked --jobs 4
FlagTypeDefaultDescription
workspace-nameargument(auto-detect)Workspace name
--workspacestringWorkspace name (alternative)
--shortboolfalseOne-line-per-repo summary
--untrackedboolfalseInclude untracked files
--jobsint1Parallel repository processing

wsm add <workspace> <repo>

Add a repository to an existing workspace.

wsm remove <workspace> <repo>

Remove a repository from an existing workspace.

wsm fork <new-name> [source]

Create a new workspace by forking an existing one. Inherits the same repository set, creates fresh branches.

wsm fork iteration-2
wsm fork v2-spike my-feature --branch spike/v2 --dry-run
FlagTypeDefaultDescription
new-workspace-nameargument(required)Name for the new workspace
source-workspace-nameargument(auto-detect)Source workspace
--workspacestringSource workspace (alternative)
--branchstring(auto)Branch for the new workspace
--branch-prefixstringtaskPrefix for auto-generated branches
--agent-sourcestringAGENT.md template (defaults to source workspace's)
--dry-runboolfalsePreview without creating

wsm merge [name]

Merge workspace branches back into their base branch.

wsm merge my-feature
wsm merge --dry-run
FlagTypeDefaultDescription
workspace-nameargument(auto-detect)Workspace name
--workspacestringWorkspace name (alternative)
--dry-runboolfalseShow what would be merged
--forceboolfalseSkip confirmation prompt
--keep-workspaceboolfalseKeep workspace after merge

wsm delete <name>

Delete a workspace registration and optionally its files.

wsm delete old-feature
wsm delete old-feature --remove-files -f
FlagTypeDefaultDescription
workspace-nameargumentWorkspace name
--workspacestringWorkspace name (alternative)
-f, --forceboolfalseSkip confirmation prompt
--force-worktreesboolfalseForce-remove worktrees even with uncommitted changes
--remove-filesboolfalseDelete the workspace directory and all contents

Git commands

These commands operate on the repositories in the current (or specified) workspace, applying git operations across all of them.

wsm commit

Commit changes across workspace repositories with a single message.

wsm commit -m "feat: add shared validation"
wsm commit --add-all --push -m "fix: correct timestamps"
wsm commit --interactive
wsm commit --dry-run -m "wip"
FlagTypeDefaultDescription
-m, --messagestringCommit message
--interactiveboolfalseInteractively select files to commit
--add-allboolfalseStage all changes before committing
--pushboolfalsePush to remote after committing
--dry-runboolfalseShow what would be committed
--commit-templatestringUse a commit message template

If --message is not provided and --interactive is not set, the command errors. In interactive mode, WSM shows changes per-repo and lets you confirm before proceeding.

wsm diff

Show a unified diff across all workspace repositories.

wsm diff
wsm diff --staged
wsm diff --repo geppetto
FlagTypeDefaultDescription
--stagedboolfalseShow staged changes only
--repostringFilter to a specific repository
--jobsint1Parallel processing

wsm log

Show commit history across all workspace repositories.

wsm log
wsm log --since "1 week ago" --oneline
wsm log --limit 5
FlagTypeDefaultDescription
--sincestringShow commits since date (e.g. "1 week ago")
--onelineboolfalseOne line per commit
--limitint10Max commits per repository

wsm branch create <name>

Create a branch across all workspace repositories.

wsm branch create feature/shared-types
wsm branch create feature/shared-types --track
FlagTypeDefaultDescription
branch-nameargument(required)Branch name to create
--trackboolfalseSet up remote tracking

wsm branch switch <name>

Switch all workspace repositories to the given branch.

wsm branch switch main
FlagTypeDefaultDescription
branch-nameargument(required)Branch to switch to

wsm branch list

Show the current branch for each repository in the workspace.

wsm branch list

No command-specific flags.

wsm rebase [repository]

Rebase workspace repositories onto a target branch. By default, rebases all repositories against main.

wsm rebase
wsm rebase --target develop
wsm rebase geppetto
wsm rebase --manual
wsm rebase --jobs 4 --dry-run
FlagTypeDefaultDescription
repositoryargument(all)Rebase only this repository
--targetstringmainTarget branch to rebase onto
--dry-runboolfalseShow what would happen
-i, --interactiveboolfalseInteractive rebase
--jobsint1Parallel processing
--manualboolfalsePrint git commands instead of running them

Manual mode is useful when you want to review the exact git commands before executing them yourself.

wsm rebase status

Check rebase state and conflict counts across repositories.

wsm rebase status
wsm rebase status --repo geppetto
FlagTypeDefaultDescription
--repostringCheck only this repository
--jobsint1Parallel processing

wsm rebase continue

Continue in-progress rebases after resolving conflicts.

wsm rebase continue
wsm rebase continue --repo geppetto
FlagTypeDefaultDescription
--repostringContinue only this repository
--jobsint1Parallel processing

wsm rebase abort

Abort in-progress rebases across repositories.

wsm rebase abort
wsm rebase abort --repo geppetto
FlagTypeDefaultDescription
--repostringAbort only this repository
--jobsint1Parallel processing

JavaScript commands

wsm runner <script.js>

Execute a JavaScript file with the WSM API pre-loaded. The script can require("wsm") to access workspace management functions.

wsm runner demo/js/wsm-api-smoke.js
wsm runner my-automation.js --print-result=false --output-mode data
FlagTypeDefaultDescription
scriptargument(required)Path to JavaScript file
--print-resultbooltruePrint the script's return value

The script's final expression is its return value. When --print-result is true (the default), this value is printed as formatted output. Use --output-mode data for machine-readable output.

High-level API groups available from require("wsm"):

  • manager.registry (listRepositories, listWorkspaces)
  • manager.workspaces (create, list, status, info, add, remove, delete, fork, merge)
  • manager.git (status, commit, diff, log, branch.*, rebase.*)
  • manager.loadWorkspace(name) for workspace-handle scoped methods

See wsm help wsm-js-api-and-runner for full method contracts and input shapes.


Output modes

Every command supports the --output-mode flag:

ModeDescription
humanHuman-readable formatted output (default)
dataStructured table output via Glazed (machine-friendly)
bothHuman output first, then structured data

Use data or both when piping WSM output into scripts or other tools. Glazed supports additional output formatting flags (JSON, YAML, CSV, etc.) when --output-mode is data or both.

See Also

  • wsm help wsm-getting-started
  • wsm help wsm-js-api-and-runner
  • wsm help wsm-architecture-overview