braid references
Manage reference files — supplementary files attached to rules that provide examples, schemas, or other context.
Subcommands
| Subcommand | Description |
|---|---|
list | List references for a rule |
get | Get a reference by ID |
create | Attach a file as a reference to a rule |
update | Update reference metadata or replace the file |
remove | Remove a reference |
reorder | Reorder references within a rule |
Common options
Most reference subcommands accept:
| Option | Description |
|---|---|
-s, --server <url> | Override the braid server URL |
--api-key <token> | Override the API key |
--json | Output JSON |
Subcommand options
| Subcommand | Required options | Additional options |
|---|---|---|
list | --rule-id <id> | common options only |
get | --id <id> | common options only |
create | --rule-id <id>, --file <path> | common options only |
update | --id <id> | --label <label>, --replace-file <path> |
remove | --id <id> | -y, --yes |
reorder | --rule-id <id>, --ordered-ids <ids> | common options only |
Examples
Attach a reference file to a rule:
braid references create --rule-id <id> --file ./examples/good-pattern.tsReorder references:
braid references reorder --rule-id <id> --ordered-ids ref1,ref2,ref3