CLI Reference
Complete reference for the Workset CLI.
Command Syntax
Section titled “Command Syntax”workset <command> [flags]Commands that operate on a thread require -t <thread> unless defaults.thread is set. Most flags should appear before positional args.
Commands
Section titled “Commands”workset new
Section titled “workset new”Create a new thread.
workset new <name> [--path <path>] [--workset <name>] [--repo <alias|url|path> ...]workset ls
Section titled “workset ls”List registered threads.
workset status
Section titled “workset status”Show thread status.
workset status -t <thread>workset rm
Section titled “workset rm”Remove a thread.
workset rm -t <name|path> [--delete]Use --delete to also remove files from disk. Safety checks prevent deletion of unmerged branches.
workset repo registry
Section titled “workset repo registry”Manage registered repos (global repo catalog).
workset repo registry lsworkset repo registry add <name> <url|path>workset repo registry set <name> <url|path>workset repo registry rm <name>workset repo
Section titled “workset repo”Manage repos within a thread.
workset repo add -t <thread> <source> [--name] [--repo-dir]workset repo ls -t <thread>workset repo rm -t <thread> <name> [--delete-worktrees] [--delete-local]workset config
Section titled “workset config”Manage global configuration.
workset config showworkset config set <key> <value>workset config recover [--workset-root <path>] [--rebuild-repos] [--dry-run]workset hooks run
Section titled “workset hooks run”Run repo hooks for an event.
workset hooks run -t <thread> <repo> [--event <event>] [--reason <reason>] [--trust]workset version
Section titled “workset version”Print version information.
workset versionworkset --versionworkset completion
Section titled “workset completion”Generate shell completion scripts.
workset completion <bash|zsh|fish|powershell>Output Modes
Section titled “Output Modes”workset new --jsonworkset new demo --plainworkset repo ls -t demo --jsonworkset status -t demo --jsonGitHub Auth
Section titled “GitHub Auth”Workset uses your GitHub CLI session by default:
gh auth loginFor PAT mode, set WORKSET_GITHUB_PAT in your environment or configure in the desktop app. See GitHub Integration for details.
Safety Checks
Section titled “Safety Checks”workset rm --delete and workset repo rm --delete-* run safety checks before removing files. Branches are treated as merged when the base branch already contains the same file contents (covers squash merges).
Shell Completion
Section titled “Shell Completion”# bashworkset completion bash > ~/.workset-completion.bashsource ~/.workset-completion.bash
# zshworkset completion zsh > ~/.workset-completion.zshsource ~/.workset-completion.zsh
# fishworkset completion fish > ~/.config/fish/completions/workset.fish
# powershellworkset completion powershell > workset.ps1. ./workset.ps1Completion includes hints for thread names, registered repo names, and repo names within a thread.