# swarmops ws materialize

> Release: 0.11.0 · Last changed: 2026-11-08 · Source: https://github.com/KeiaiLab/SwarmOps/blob/stable/docs/reference/commands/ws-materialize.md

Write out more of a workspace's tree: the paths join its prefixes.

The .gitignore and .swarmignore files of the directories above each path join too. A path the tree lacks joins as it is, nothing written, when it is on disk and its parent is the root, a directory of the tree or one above a prefix: a new file the hint of E\_WS\_OUTSIDE\_PREFIXES names. Else it is E\_PATH\_NOT\_FOUND.

```yaml
title: "swarmops ws materialize"
description: "Write out more of a workspace's tree: the paths join its prefixes."
group: "workspaces"
since: "0.3.0"
mutates: true
identity_required: false
mcp_tool: "ws_materialize"
envelope_op: "ws_materialize"
exit_codes: [0]
errors: []
syntax: "swarmops ws materialize [OPTIONS] <PATH>..."
```

## Syntax

```text
swarmops ws materialize [OPTIONS] <PATH>...
```

## Required arguments

### `PATH`

Syntax: `<PATH>`.

The repository paths to write out.

## Optional arguments

The command also takes the [global options](../cli.md#global-options).

### `--ws`

Syntax: `--ws <NAME>`.

The workspace, by its name in the store's registry (default: the one around the working directory).

### `--ws-path`

Syntax: `--ws-path <DIR>`.

The workspace's directory.

### `--status-after`

Syntax: `--status-after <STATUS_AFTER>`.
Default: `page`.

page: the first page of the status follows the result; none: it is left out. Values: `page`: The first page of the status; `none`: No status.

## Examples

### CLI

No recorded example yet.

### MCP

No recorded example yet.

## Return information

`result` is a `WsMaterializeResp` (`swarmops schema WsMaterializeResp` prints its JSON Schema).

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `bytes` | `integer` | yes | How many bytes were written. |
| `materialized` | `array of string` | yes | The prefixes added. |
| `status_after` | `WsStatus or null` | no | The status after the mutation; omitted when the request said `none`. |

Envelope `op`: `ws_materialize`.

Exit codes:

- `0`: Success.

## Errors

No golden step shows this command failing yet.

Any command that opens a store may also fail with a store error, such as [`E_NOT_A_REPO`](../errors.md#e_not_a_repo), [`E_IO`](../errors.md#e_io) or [`E_STORE_CORRUPT`](../errors.md#e_store_corrupt); a command line the grammar refuses is [`E_INVALID_ARG`](../errors.md#e_invalid_arg) (exit 2).

## See also

- [`swarmops ws create`](ws-create.md)
- [`swarmops ws status`](ws-status.md)
- [`swarmops ws diff`](ws-diff.md)
- [`swarmops ws commit`](ws-commit.md)
- [`swarmops ws rebase`](ws-rebase.md)
- [`swarmops ws resolve`](ws-resolve.md)
- [`swarmops ws land`](ws-land.md)
- [`swarmops ws discard`](ws-discard.md)
- [`swarmops ws snapshot`](ws-snapshot.md)
- [`swarmops ws list`](ws-list.md)
- [`swarmops ws info`](ws-info.md)
- [`swarmops ws delete`](ws-delete.md)
- [`swarmops ws hook`](ws-hook.md)
- [CLI reference](../cli.md)
- [Error codes](../errors.md)
