braid docs

braid rules

Manage rules in your braid account from the command line.

Subcommands

SubcommandDescription
listList available rules for a scope
getGet a rule by ID
createCreate a new rule
updateUpdate a rule
removeDelete a rule
enableEnable a disabled rule
disableDisable a rule
moveMove a rule to a different project
duplicateDuplicate a rule
forkFork a rule (creates a linked copy)

Common options

Most rule subcommands accept:

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

CRUD and state options

SubcommandRequired optionsAdditional options
listnone--org-id <id>, --org-projects <ids>, --personal-projects <ids>, --include-user-global, --include-org-global
get--id <id>common options only
create--title <title>, --content <content>--project-id <id>, --tags <list>, --priority <priority>
update--id <id>--title <title>, --content <content>, --tags <list>, --priority <priority>
remove--id <id>-y, --yes
enable--id <id>common options only
disable--id <id>common options only
move--id <id>, --project-id <id>common options only
duplicate--id <id>--target-project-id <id>
fork--id <id>--target-project-id <id>

Sync subcommands

Rules can sync with upstream sources. These commands manage sync state:

SubcommandDescription
sync-statusShow sync status for one rule or all rules
sync-historyShow sync history for a rule
sync-enableEnable sync for a rule
sync-disableDisable sync for a rule
sync-checkCheck for upstream updates
sync-nowRun sync immediately

Sync options

SubcommandRequired optionsAdditional options
sync-statusnoneoptional --id <id> plus common options
sync-history--id <id>common options only
sync-enable--id <id>common options only
sync-disable--id <id>common options only
sync-check--id <id>common options only
sync-now--id <id>common options only

Examples

Create a rule:

braid rules create \
--title "Conventional Commits" \
--content "Use conventional commits: type(scope): description" \
--tags "git,commits"

List rules with JSON output:

braid rules list --json

Fork a rule to another project:

braid rules fork --id <rule-id> --target-project-id <project-id>

Check sync status across all rules:

braid rules sync-status