CLI reference
kusaw extract
Resume a session and print a validated <output> JSON block
kusaw extract
Resume a session and print a validated JSON block
Usage
kusaw extract --provider claude-code|cursor --session <id> --dir <worktree> --schema <file> [--retries 2] [flags]Flags
| Name | Short | Type | Default | Description |
|---|---|---|---|---|
--config | string | Path to kusaw.yaml (overrides KUSAW_CONFIG and parent search) | ||
--dir | string | Worktree directory | ||
--factory | string | factory name from kusaw list | ||
--help | -h | bool | false | help for extract |
--provider | string | claude-code or cursor | ||
--retries | int | 2 | Extra extract calls after the first try (0–5) | |
--schema | string | JSON Schema file | ||
--session | string | Session id to resume |
Exit codes
| Code | Name | Description |
|---|---|---|
| 0 | ok | Success. |
| 1 | error | Runtime error. |
| 2 | usage | Usage or validation error. |
| 3 | rejected | Control request rejected; the error string is printed verbatim. |
| 4 | not picked up | Control request not picked up within the wait time while serve runs. |
Example
kusaw extract --provider claude-code --session s1 --dir . --schema schema.json