docs: address review — add -r/--render, --inline flags, var set schema inference

This commit is contained in:
2026-06-01 16:46:43 +08:00
parent 0b48bd74cc
commit bb9112ba4f
3 changed files with 4 additions and 1 deletions
+2
View File
@@ -68,6 +68,8 @@ ocas render --pipe/-p [options]
| `--pipe`, `-p` | Read from stdin (`put`/`hash`: raw JSON; `render`: envelope) |
| `--schema <hash>` | Schema filter for var commands |
| `--tag <expr>` | Tag/label operations (repeatable) |
| `--render`, `-r` | Render output inline (equivalent to piping to `ocas render -p`) |
| `--inline <text>` | Inline text content for `template set` |
| `--format tree` | Tree display for `walk` |
## Type Aliases
+1
View File
@@ -63,4 +63,5 @@ At each level, `resolution *= decay`. When resolution drops below epsilon, refer
- **`ocas render <hash>`** — render a stored node by hash, expanding ocas_ref references
- **`ocas render -p`** — read a `{ type, value }` envelope from stdin and render it
- **`ocas <any-command> -r`** — inline render shortcut; any command with `-r` / `--render` automatically pipes its envelope output through the renderer, equivalent to `| ocas render -p`
- **`renderDirect(type, value, store, options)`** — in-memory render without requiring the data to be stored (used internally for CLI output)
+1 -1
View File
@@ -25,7 +25,7 @@ type Variable = {
};
```
The primary key is `(name, schema)` — the same name can point to nodes of different types.
The primary key is `(name, schema)` — the same name can point to nodes of different types. When using `var set`, the schema is automatically inferred from the node the hash points to, so you don't need to specify it explicitly.
## Operations