Skip to content

CLI reference

briar runbook

Walk a YAML runbook's extract: / schedules: and run the extractors it declares. Three subcommands cover one-shot runs, batch runs over a directory, and a long-running scheduler.

When to use it

  • You have a stable set of companies + extractor configs that rarely change — encode it once in YAML, version-control it, stop typing long briar extract command lines.
  • You want extractors to run on a cadence without cron — the serve subcommand registers every (company, task) job from the YAMLs in a directory and runs them in-process.
  • You want a sweep — run everything declared in every YAML in a directory right now.

Runbook YAML schema

See the runbook YAML reference for the full schema (CompanyEntry, ExtractEntry, MessageBinding, ScheduleEntry).

$ briar runbook extract

briar runbook extract [--task TASK] FILE

Run extractors declared in a single runbook YAML. Without --task, every extract: entry for every company in the file runs.

file PATHrequired
Positional. Path to a runbook YAML.
--task NAME
Run only the schedules.task: entry whose name matches. Lets a single YAML hold multiple cadences (daily / hourly / weekly) and only fire one.
$ briar runbook extract examples/acme.yaml
$ briar runbook extract examples/acme.yaml --task extractors

$ briar runbook sweep

briar runbook sweep DIRECTORY

Find every *.yaml in the directory and run briar runbook extract on each in turn. Useful for an ad-hoc cold rebuild of all per-company knowledge files.

directory PATHrequired
Positional. Directory of runbook YAMLs.
$ briar runbook sweep runbooks/

$ briar runbook serve

briar runbook serve [--tick SECONDS] DIRECTORY

Long-running scheduler. Registers every (company, task) tuple declared in the YAMLs in the directory and runs them on the cadence declared in each every: string ( "day at 07:30", "1 hour", "monday at 09:00", ...).

directory PATHrequired
Positional. Directory of runbook YAMLs.
--tick SECONDSdefault: 1
Seconds between schedule.run_pending() ticks. The scheduler library polls on this interval; the default is fine for production.
$ briar runbook serve runbooks/

systemd unit

For long-running scheduler deploys, see the DEPLOY_EC2.md recipe in the repo — a fully-worked Ubuntu setup with briar-scheduler.service and briar-dashboard.service.

See also