bwrb new
Create a new note with interactive prompts based on your schema.
Synopsis
Section titled “Synopsis”bwrb new [options] [type]Options
Section titled “Options”| Option | Description |
|---|---|
-t, --type <type> | Type of note to create (alternative to positional argument) |
-o, --open | Open the note after creation |
--json <frontmatter> | Create note non-interactively with JSON frontmatter |
--template <name> | Use a specific template (use “default” for default.md) |
--no-template | Skip template selection, use schema only |
--no-instances | Skip instance scaffolding (when template has instances) |
--owner <wikilink> | Owner note for owned types (e.g., "[[My Novel]]") |
--standalone | Create as standalone (skip owner selection for ownable types) |
--fork <target> | Create a sibling document forked from an exact path, name, alias, or stable UUID |
--label <label> | Name the fork <source> — <label> |
--name <name> | Set the fork’s frontmatter name and filename explicitly |
--output <text|json> | Set fork output format (default: text; only valid with --fork) |
Examples
Section titled “Examples”Basic Creation
Section titled “Basic Creation”# Interactive type selectionbwrb new
# Direct creation by typebwrb new ideabwrb new objective/task
# Create and open immediatelybwrb new draft --openTemplates
Section titled “Templates”# Use specific templatebwrb new task --template bug-report
# Use default.md template explicitlybwrb new task --template default
# Skip templates, use schema onlybwrb new task --no-templateOwnership
Section titled “Ownership”Some types support ownership relationships. When creating an owned type:
# Prompted: standalone or owned?bwrb new research
# Create in shared location (standalone)bwrb new research --standalone
# Create owned by specific notebwrb new research --owner "[[My Novel]]"Instance Scaffolding
Section titled “Instance Scaffolding”Some templates define child instances that are automatically created with the parent note:
# Create project with scaffolded research notesbwrb new project --template with-research
# Skip instance creationbwrb new project --template with-research --no-instancesWhen a template defines instances, the CLI displays what files were created:
✓ Created: Projects/My Project.md
Instances created: ✓ Research/Background Research.md ✓ Research/Competitor Analysis.md
✓ Created 3 files (1 parent + 2 instances)Instances are written to each child type’s configured output_dir, not beside
the parent unless the schema points both types at the same directory. Templates
may scaffold same-type children, such as a task template that creates more
task notes. Date expressions in instance defaults evaluate for date fields;
non-date fields remain literal. Instance defaults and explicit instance
filenames do not interpolate parent placeholders like {name}.
Non-interactive (JSON) Mode
Section titled “Non-interactive (JSON) Mode”For scripting and automation:
# Basic JSON creationbwrb new idea --json '{"name": "My Idea", "status": "raw"}'
# With templatebwrb new task --json '{"name": "Bug"}' --template bug-report
# With body sectionsbwrb new task --json '{"name": "Fix bug", "_body": {"Steps": ["Step 1", "Step 2"]}}'
# With raw markdown bodybwrb new task --json '{"name": "Quick capture", "_body": "## Notes\n\n- Captured from a script."}'
# With instance scaffolding (JSON output includes instances)bwrb new project --json '{"name": "My Project"}' --template with-research--json mode validates the merged frontmatter before writing. Unknown fields in the JSON input or selected template defaults are rejected unless they are built-in bwrb fields such as name.
The _body field accepts either a raw Markdown string or an object whose keys are schema body section names. Section-object values may be strings or string arrays. A raw string is written as the note body as-is and bypasses template/body-section generation.
If the note name or resolved filename pattern is not filesystem-portable, bwrb new removes invalid characters, avoids Windows device basenames, trims trailing dots/spaces, and deterministically shortens long UTF-8 names to keep the complete Markdown filename at or below 192 bytes. Shortened names include a stable digest, so distinct long titles remain distinct. Interactive creation prints a warning. JSON mode includes nameTransformed metadata:
{ "success": true, "path": "Ideas/What if we used slashes.md", "nameTransformed": { "original": "What if we used / slashes?", "sanitized": "What if we used slashes", "filename": "What if we used slashes.md" }}The persisted name remains the original note identity. Only the physical
filename is normalized.
Creation uses an exclusive write for new paths: a concurrent collision is refused rather than overwriting the file that appeared.
Paths longer than 200 characters include pathLengthWarning in JSON mode and print a warning in interactive mode. Paths longer than 260 characters are rejected.
JSON output for templates with instances includes an instances object:
{ "success": true, "path": "Projects/My Project.md", "instances": { "created": ["Research/Background Research.md", "Research/Competitor Analysis.md"], "skipped": [], "errors": [] }}Document forks
Section titled “Document forks”Forks are ordinary Markdown notes with a small lineage marker. They live beside
their immediate source, receive a fresh id, and store the source UUID in
forked-from:
# Creates "Launch Brief — concise.md" beside the sourcebwrb new --fork "Launch Brief" --label concise
# Exact paths and stable UUIDs are accepted toobwrb new --fork "Briefs/Launch Brief.md" --name "Launch Brief v2"bwrb new --fork 8f48f6a8-55c1-4ea7-9f4b-96735ed24af3 --label alternate
# Script-friendly outputbwrb new --fork "Launch Brief" --label alternate --output jsonTargets are exact: bwrb never substitutes a fuzzy near-match. Duplicate names
or aliases must be disambiguated with a path or UUID. A legacy source without an
id receives one before the fork is written; an invalid existing ID is rejected
without modification. Source-ID backfill and ordinary bwrb edit commits share
a path lock and compare their authoritative raw-byte snapshots before writing,
so a stale writer cannot erase the other operation. A detected conflict is
retryable; JSON uses data.reason: "note-modified-concurrently" and numeric
code: 2.
The child copies the source body and frontmatter, then:
- replaces
id,name, and any inheritedforked-from; - removes
prevandnextnavigation fields; - resets schema fields marked
reset_on_forkand applies their defaults; - clears the type’s alias-role field so two notes do not claim one identity;
- preserves unknown schema-drift fields and reports them as warnings.
Without --name, --label supplies the suffix in <source> — <label>. In an
interactive terminal, omitting both prompts with <source> (fork) as the
default. --non-interactive and --output json require --name or --label.
Fork mode cannot be combined with a positional type, --type, templates,
--json, instance scaffolding, or ownership-selection flags. An owned note can
only be forked when its owner’s field permits multiple children.
Behavior
Section titled “Behavior”- Type resolution: Prompts for type if not specified (with subtype navigation)
- Template loading: Loads matching template if available (unless
--no-template) - Field prompts: Prompts for each field defined in schema/template
- File creation: Creates pooled files in the type’s resolved output directory: an explicit type directory wins, then an explicit ancestor directory, then the computed pluralized type hierarchy. Owned notes still live beneath their owner
- Built-in fields: Writes system-managed
idandnamein both interactive and JSON creation.namepreserves the note identity even when filename normalization or a filename pattern produces a different path. The reservedforked-fromprovenance field cannot be supplied through--json, templates, or schema fields/defaults;new --forkcreates new lineage, whilelineage adoptis the guarded in-place path for two existing documents - Output: Returns path to created file
Template Discovery
Section titled “Template Discovery”Templates are stored in .bwrb/templates/{type}/{subtype}/*.md:
- If
default.mdexists, it’s used automatically - If multiple templates exist without
default.md, you’ll be prompted to select - Use
--no-templateto skip template system entirely
See Also
Section titled “See Also”- Templates Overview — Template system concepts
- bwrb template — Template management
- Schema — Schema structure and field types
- bwrb lineage — Adopt existing notes into lineage