braid rules
Manage rules in your braid account from the command line.
Subcommands
| Subcommand | Description |
|---|---|
list | List available rules for a scope |
get | Get a rule by ID |
create | Create a new rule |
update | Update a rule |
remove | Delete a rule |
enable | Enable a disabled rule |
disable | Disable a rule |
move | Move a rule to a different project |
duplicate | Duplicate a rule |
fork | Fork a rule (creates a linked copy) |
Common options
Most rule subcommands accept:
| Option | Description |
|---|---|
-s, --server <url> | Override the braid server URL |
--api-key <token> | Override the API key |
--json | Output JSON |
CRUD and state options
| Subcommand | Required options | Additional options |
|---|---|---|
list | none | --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:
| Subcommand | Description |
|---|---|
sync-status | Show sync status for one rule or all rules |
sync-history | Show sync history for a rule |
sync-enable | Enable sync for a rule |
sync-disable | Disable sync for a rule |
sync-check | Check for upstream updates |
sync-now | Run sync immediately |
Sync options
| Subcommand | Required options | Additional options |
|---|---|---|
sync-status | none | optional --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 --jsonFork 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