Page kind: Reference
swarmops ws delete#
Remove a workspace's directory, then its entry.
Edits or commits not landed are E_WS_DIRTY without --force (delete anyway) or --rescue (commit the edits as a rescue changeset first).
- Group
workspaces- Since
0.3.0- Mutates
- yes
- Identity required
- no
- MCP tool
- none
- Envelope op
ws_delete- Exit codes
- 01
- Errors
- E_WS_DIRTY
Syntax#
swarmops ws delete [OPTIONS] <NAME>Required arguments#
Syntax: <NAME>.
The workspace, by name.
Optional arguments#
The command also takes the global options.
Syntax: --force.
Delete it even with edits or unlanded commits.
Syntax: --rescue.
Commit its edits as a rescue changeset first.
Examples#
swarmops --repo [tmp]/store --as agent/worker-17 ws delete w1Show 17 more lines
"exit":Exit code 1. Recorded by the CLI tests. A name in square brackets, such as [tmp] or [c1], stands for what differs from run to run: the test's temporary directory, an id, a time.
Return information#
result is a WsDeleteResp (swarmops schema WsDeleteResp prints its JSON Schema).
| Field | Type | Required | Description |
|---|---|---|---|
deleted | string | yes | The workspace's name. |
head | string | yes | Its head when it was deleted. |
rescued | string or null | no | The rescue changeset of its edits, when there were some. |
Envelope op: ws_delete.
Exit codes:
0: Success.1: The operation failed.
Errors#
- E_WS_DIRTY (exit 1): The workspace holds edits the operation would overwrite or lose (
details.paths, the first 20); the hint names the command that commits or discards them.
Any command that opens a store may also fail with a store error, such as E_NOT_A_REPO, E_IO or E_STORE_CORRUPT; a command line the grammar refuses is E_INVALID_ARG (exit 2).