wiki / segments / cli / commandsedited 2026-07-19
CLI — commands
The full command surface of sg. Aliases are shown in parentheses.
Server
startStart the server (alias: serve).stopStop the server.
Tasks
listList projects and tasks (alias: status). Auto-detects the current project from the working-directory name; pass -a to include completed tasks. A task-ID prefix as the argument falls through to view.nextPrint the single best unblocked task to pick up — highest priority, oldest wins — followed by the rest of the ready queue (alias: n).recentList recently closed tasks.statsProgress / agents / recent-activity dashboard rendered in the current theme (alias: st).viewFull task details: title, status, priority, blockers, timestamps, body.addCreate a task.doneMark a task as done.closeClose a task without completing it.rmDelete a task (alias: delete).renameRename a project.
Setup
setupConfigure integrations — required first step (alias: install).initInitialize a project in the current directory.beadsImport tasks from Beads.exportDump task state as JSONL for git-workflow snapshots.removeRemove a project.uninstallRemove segments and all data.
Maintenance
compactReclaim disk by compacting each project's LMDB file.doctorHost health checks; --clean-temp reclaims leaked temp dirs.
Info
helpShow help (-h, --help).versionPrint version.
How these compose day to day is covered in workflow.
backlinks (1): segments/overview