CLI reference
briar scaffold
Emit a JSON config bundle that a downstream orchestrator (a hosted Briar deployment, a custom worker) consumes to wire up a full agent flow. The CLI doesn't execute the flow itself — it generates the bundle.
When to use it
- Stand up a new agent flow against a fresh repo or company.
- You want a JSON contract a downstream deployment can consume.
- You want a default config you can hand-edit, version-control, or template across companies.
If you're running the agent directly on your machine, you don't need scaffold — briar agent implement / prfix are the direct path.
Two templates ship
| Template | Shape |
|---|---|
implementation | Issue → plan → human approval → implement / comment |
pr-fixes | Read PR review comments → push fixes → reply (no human gate) |
$ briar scaffold implementation
briar scaffold implementation --prefix NAME --source SRC
[--archetype ARCH] [--shape SHAPE]
[--trigger-kind KIND] [--auth-mode {oauth,pat}]
[<source-specific flags>] [--out FILE]Most common: issue → plan → approve → implement.
$ briar scaffold implementation \--prefix acme \--source github --owner acme --repo widgets \--archetype engineer --shape plan-approve-act \--trigger-kind github_webhook \--auth-mode oauth \--out acme-implementation.json
$ briar scaffold pr-fixes
briar scaffold pr-fixes --prefix NAME --source SRC
[<same flags as implementation>] [--out FILE]Same flag set as implementation; the template differs in the default shape and tool wiring.
$ briar scaffold pr-fixes \--prefix acme \--source github --owner acme --repo widgets \--auth-mode pat --github-secret-id <UUID> \--out acme-prfix.json
Multi-source bundles
Pass
--source repeatedly to bundle multiple sources into one config — e.g. --source github --source jira --source aws.Core flags
--prefix NAMErequiredPrefix prepended to every resource name in the emitted bundle.
--source {aws,bitbucket,github,jira,sentry}awsbitbucketgithubjirasentrySource kind(s) to gather context from. Repeat for multiple.
--archetype ARCHETYPEdefault: engineerengineerpr-ci-fixerpr-conflict-resolverpr-fixertriagerAgent role + tool filter.
--shape SHAPEdefault: plan-approve-actone-shotplan-approve-acttriageWorkflow graph shape.
plan-approve-act includes a human checkpoint; one-shot skips it (good for the pr-fixer archetype on a cron).--trigger-kind KINDbitbucket_webhookgithub_webhookmanualschedule_cronWhat kicks off a run.
--auth-mode {oauth,pat}default: oauthoauthpatGitHub auth mode. OAuth handshake or stored PAT. Sentry is always PAT.
--llm-provider-key KEYLLMProvider config key in the downstream orchestrator.
--model MODELLLM model ID passed to LiteLLM as
<provider>/<model>.--company COMPANYCompany name whose extracted knowledge to splice into the agent's system prompt. Omit to emit a knowledge-aware persona without cached sections.
--knowledge-store STOREKnowledge-store backend to read the splice from. Default:
postgres if BRIAR_DATABASE_URL is set, else file.--out PATHOutput path. Default: stdout. Short form:
-o.GitHub source flags
--owner OWNERGitHub org / user. Required when
--source github.--repo REPOGitHub repo name. Required when
--source github.--github-secret-id UUIDSecret UUID holding a GitHub PAT. Required with
--auth-mode pat.--github-authors-allow LOGINOnly include issues whose creator is in this list. Repeatable.
--github-authors-block LOGINExclude issues whose creator is in this list. Repeatable.
--github-assignees-allow LOGINOnly include issues with an assignee in this list. Repeatable.
--github-assignees-block LOGINExclude issues with an assignee in this list. Repeatable.
--webhook-events EVENTSdefault: issues.opened, issues.labeledGitHub event names that fire the trigger.
--webhook-labels LABELSdefault: briarRestrict to issues with any of these labels.
Bitbucket source flags
--bitbucket-workspace SLUGWorkspace slug (the part before
/ in a repo URL).--bitbucket-repo SLUGRepository slug (the part after
/).--bitbucket-secret-id UUIDSecret UUID holding a Bitbucket app-password (username + app_password stored together). Required with
--auth-mode pat.--bitbucket-authors-allow LOGINReporter allowlist. Repeatable.
--bitbucket-authors-block LOGINReporter blocklist. Repeatable.
--bitbucket-assignees-allow LOGINAssignee allowlist. Repeatable.
--bitbucket-assignees-block LOGINAssignee blocklist. Repeatable.
--bitbucket-webhook-events EVENTSdefault: issue:created, issue:updatedBitbucket event names.
--bitbucket-webhook-labels LABELSdefault: briarRestrict to issues with these labels.
Jira source flags
--jira-project KEYJira project key to include. Repeatable; defaults to all.
--jira-jql JQLOptional JQL filter applied on top of the project list.
--jira-secret-id UUIDSecret UUID holding an Atlassian PAT (skip OAuth).
--jira-authors-allow USERReporter allowlist. Folds into JQL. Repeatable.
--jira-authors-block USERReporter blocklist. Folds into JQL. Repeatable.
--jira-assignees-allow USERAssignee allowlist. Folds into JQL. Repeatable.
--jira-assignees-block USERAssignee blocklist. Folds into JQL. Repeatable.
AWS source flags
--aws-role-arn ARNIAM role ARN the worker assumes to read AWS resources.
--aws-external-id IDExternal-id required by the trust policy on
--aws-role-arn.--aws-region REGIONDefault AWS region for resource queries.
--aws-services LISTWhich AWS services to gather (e.g.
ec2,s3,iam,logs).Sentry source flags
--sentry-org SLUGSentry organization slug. Required when
--source sentry.--sentry-project SLUGSentry project slug to include. Repeatable; at least one required.
--sentry-environment ENVRestrict to one or more environments. Repeatable.
--sentry-query QUERYSentry issue search query (e.g.
is:unresolved level:error).--sentry-level LEVELfatalerrorwarninginfodebugSeverity filter. Repeatable.
--sentry-secret-id UUIDSecret UUID holding a Sentry auth token. Required — PAT-only for now.
Schedule trigger flag
--schedule CRONdefault: 0 * * * *Cron expression for the
schedule_cron trigger. Default fires at the top of every hour.See also
- Plugin registries — full list of archetypes, shapes, triggers, and source templates.
- briar agent — the local equivalent if you don't need a downstream orchestrator.