braid docs

braid references

Manage reference files — supplementary files attached to rules that provide examples, schemas, or other context.

Subcommands

SubcommandDescription
listList references for a rule
getGet a reference by ID
createAttach a file as a reference to a rule
updateUpdate reference metadata or replace the file
removeRemove a reference
reorderReorder references within a rule

Common options

Most reference subcommands accept:

OptionDescription
-s, --server <url>Override the braid server URL
--api-key <token>Override the API key
--jsonOutput JSON

Subcommand options

SubcommandRequired optionsAdditional 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.ts

Reorder references:

braid references reorder --rule-id <id> --ordered-ids ref1,ref2,ref3