bdy ruleset create

View as Markdown
$bdy ruleset create|add [options]

Create a ruleset from YAML or JSON Required scopes: RULESET_MANAGE

OPTIONS
--context <name>
Connection and scope context: default, git, link or a saved name. Overrides the globally active context for this invocation.
--examples
Show only examples; with this flag --format accepts text, json or jsonl
--verbose
Show REST API requests, responses, timing and retries on stderr
-w, --workspace <domain>
Workspace URL handle. Can be set via variable: BUDDY_WORKSPACE
-p, --project <name>
Project name. Can be set via variable: BUDDY_PROJECT
--yaml <content|@path>
Ruleset as YAML or JSON in the REST API shape (identifier, name, disabled, refs, bypass, rules, note, agent_note). To specify file use @path/to/file format in value
--format <text|json>
Output format: json, text. JSON CLI errors: {error:{code,message,hint}}, exit 1. Default: text (choices: "text", "json")
-h, --help
display help for command

Documentation for bdy v1.26.5

Last modified on Dec 1, 2026

Examples

Create a ruleset from a file
bdy rs add -p project --yaml @ruleset.yml$
Protect the default branch from force pushes and deletion
bdy rs add -p project --yaml '{"identifier": "protect-main", "refs": [":default"], "rules": {"block_force_push": true, "restrict_deletion": true}}'$