Skip to main content

Terminal client for the Briar agent-orchestration API.

Project description

briar

Turn the live state of your tools into agent-ready context — then let autonomous agents act on it. All on your machine.

briar is a local-first Python CLI that mines what's actually happening across your stack — GitHub, Bitbucket, AWS/GCP/Azure, Jira, Linear, Fireflies — into a knowledge store, keeps it fresh on a schedule, and runs LLM agents that fix PRs and ship tickets against it.

No SaaS, no remote workspace, no data leaving your laptop. Your credentials, your machine, your APIs — briar just shells out to them directly and writes the results to local markdown or Postgres.

pip install briar-cli
briar version

Why briar

  • 🔒 Local-first. Everything runs on your machine against your own API tokens. Nothing is uploaded to a service.
  • 🔌 One CLI, every system. GitHub · Bitbucket · AWS · GCP · Azure · Jira · Linear · Fireflies — behind a single, consistent interface.
  • 🧠 Context, not dashboards. Extraction produces clean markdown knowledge an LLM (or a human) can actually read — PR archaeology, codebase conventions, infra inventory, reviewer profiles, meeting digests.
  • ⏰ Cron, replaced. An in-process scheduler keeps per-company knowledge fresh with one long-running command.
  • 🤖 Agents that do the work. Point an agent at a PR to address review comments, or at a ticket to implement it end-to-end — branch, code, open a draft PR.
  • 🗺️ Plans from your board. Turn a Jira/GitHub Projects board into an ordered, LLM-synthesised implementation plan and run it card by card.

Quickstart

pip install briar-cli

# 1. Authenticate the providers you'll use (tokens land in ~/.config/briar/secrets.env)
briar auth login github-pat --company acme
briar auth login jira-token --company acme
export ANTHROPIC_API_KEY=sk-ant-...        # LLM key comes from the environment

# 2. Mine a repo's PR history into a knowledge blob
briar extract --company acme \
    --include pr-archaeology \
    --repo acme-co/acme-app --max 50

# 3. Read it back
briar context get knowledge:acme

Telemetry: briar ships with opt-out error/usage analytics (Sentry). No prompts, file contents, ticket keys, repo names, paths, or secret values ever leave the machine. Turn it off any time with briar telemetry off, BRIAR_TELEMETRY=off, or DO_NOT_TRACK=1.

Less typing: shared flags, project config, inference

briar resolves every flag through one chain — CLI flag > env var > project config > built-in default — so the stable values move off the command line:

# .briar.toml (or [tool.briar] in pyproject.toml), searched upward from cwd
company = "acme"
store   = "postgres"

[repo]
owner = "acme-co"
repo  = "acme-app"

With that file present, and inside the git checkout, the same extract is just:

briar extract --include pr-archaeology        # company + repo come from config/git
  • Canonical extractor flags. One shared knob per concept — --repo, --since-days, --max, --top-n, --sample, --authors-allow/-block, --assignees-allow/-block — applies to every extractor selected with --include. The old per-extractor flags (--pr-repo, --risk-since-days, …) still work but are hidden from -h; run briar extract --advanced-help to see them.
  • Inference. --owner/--repo are read from the git origin remote when neither the flag nor config supplies them.
  • A per-extractor override always wins over the shared flag when both are given.

What you can do

briar extract — mine live state into knowledge

# PRs + AWS infra in one shot, filtered to your team
briar extract --company acme \
    --include pr-archaeology --include aws-infra \
    --repo acme-co/acme-app \
    --authors-allow alice --authors-allow bob \
    --aws-extract-region us-east-1 \
    --aws-extract-service ecs --aws-extract-service rds

# Account-wide inventory: every tagged AWS resource across all services
briar extract --company acme --include aws-infra \
    --aws-extract-service tagging-inventory

# Last 14 days of Fireflies meeting summaries for an attendee list
FIREFLIES_ACME_API_KEY=ff_xxx briar extract --company acme \
    --include meeting-digest --meeting-since-days 14 \
    --meeting-attendee-allow alice@acme.com

# Code-quality signal from git history + the repo-host API.
# One --repo feeds every selected extractor.
briar extract --company acme --repo acme-co/acme-app \
    --include defect-hotspots --include pr-hygiene \
    --include review-nits --include ci-health

Code-quality extractors (all --provider github|bitbucket): defect-hotspots (churn × bug-fix × size risk), pr-hygiene (size/rubber-stamp/time-to-review), review-nits (recurring reviewer asks → lint candidates), revert-signals, commit-message-quality, stale-prs, ci-health, dependency-health, code-scanning, repo-governance, test-discipline, release-cadence, todo-density. See agents/extract.md.

Feed the knowledge to Claude Code — on demand

# Merge a knowledge index into CLAUDE.md; full detail lands in
# .briar/knowledge/<company>.md for the agent to read when relevant.
briar extract --company acme --repo acme-co/acme-app \
    --include defect-hotspots --include ci-health \
    --merge-claude-md

--merge-claude-md writes the full bundle to .briar/knowledge/<company>.md and splices a short, marker-bounded index — section titles plus a pointer to that file — into CLAUDE.md (override with --claude-md-path). Because CLAUDE.md is auto-loaded into every Claude Code session but the detail file is not, the knowledge stays available on demand without paying a per-session context cost: the agent reads the detail file only when a task touches one of the listed topics. Re-runs replace just briar's block, leaving your hand-written CLAUDE.md untouched.

briar runbook serve — scheduled extraction, in-process

Describe every company + task in one YAML and let briar run the schedule forever — no cron, no external job runner.

briar runbook serve runbooks/

briar agent — autonomous LLM flows

# prfix: read a PR's open review comments, push fixes, reply inline
briar agent prfix \
    --company acme --owner acme-co --repo acme-app \
    --pr 42 --branch fix-typo \
    --runbook runbooks/acme.yaml

# implement: take a ticket end-to-end — clone, branch, code, open a draft PR
briar agent implement \
    --company acme --owner acme-co --repo acme-app \
    --ticket-project ACME --ticket-key ACME-42 --tracker jira \
    --runbook runbooks/acme.yaml

# Preview the exact prompt + tools without spending a token
briar agent prfix --company acme --owner acme-co --repo acme-app \
    --pr 42 --branch fix-typo --dry-run

briar plan — LLM-driven implementation plans from a board

# Build an ordered plan from a GitHub Projects board, with company knowledge spliced in
briar plan build https://github.com/orgs/acme/projects/1 \
    --name acme-q3 --company acme --llm anthropic --with-knowledge

# Run the loop: the selector picks the next card, the engineer agent ships it,
# the knowledge store learns what changed — card by card.
briar plan run acme-q3 \
    --company acme --owner acme-co --repo acme-app \
    --tracker github-issues --llm anthropic

# Smoke one card with --dry-run before letting the loop go wide
briar plan run acme-q3 --limit 1 --dry-run --llm anthropic \
    --company acme --owner acme-co --repo acme-app

briar scaffold — JSON config bundles for downstream tools

briar scaffold implementation \
    --prefix acme-impl --source github \
    --owner acme --repo widgets

Plus briar context (local knowledge blobs), briar dashboard (read-only HTML status page), briar secrets doctor (credential coverage), and briar journal (decision-journal inspection).

Repeatable flags — fan out across repos, projects, services

Most list-style flags accept multiple occurrences: repeat the flag, once per value (there's no comma form — --repo a,b is one repo named a,b). The canonical --repo feeds every extractor selected with --include.

# Mine several repos, keep the team's PRs, drop the bots — one --repo,
# every selected extractor. --max applies per repo; author allow/block
# compose as allow ∩ ¬block.
briar extract --company acme \
    --include pr-archaeology --include defect-hotspots \
    --repo acme-co/web --repo acme-co/api --repo acme-co/mobile \
    --max 75 \
    --authors-block "dependabot[bot]" --authors-block "renovate[bot]"

# Scaffold a triage flow from two sources — one shared author/assignee
# filter applies to every --source.
briar scaffold implementation --prefix acme-triage \
    --source github --source jira \
    --owner acme-co --repo acme-app --github-secret-id <uuid> \
    --authors-block "dependabot[bot]" \
    --assignees-allow alice --assignees-allow bob \
    --jira-project ACME --jira-project PLAT --jira-secret-id <uuid> \
    --auth-mode pat

The same lists map onto runbook YAML as arrays — e.g. repo: [acme-co/web, acme-co/api] under an extractor's args:.

Divergent identifiers in one run. Some extractors key off a tracker project (active-tickets, ticket-archaeology) rather than an owner/repo slug. When you run those alongside repo-based extractors in a single invocation and they need different values, reach for the per-extractor override flags (--ticket-project, --pr-repo, … — listed by briar extract --advanced-help), or split into two invocations. The runbook YAML models this cleanly: one args: block per extractor.

Handy patterns

# Script briar: --format json pipes straight into jq (works on every command).
briar plan status acme-q3 --format json | jq -r '.blocked[].key'

# Gate CI on credential coverage — exits non-zero if any runbook is missing creds.
briar secrets doctor --examples runbooks/

# Cost-safe agent rollout: preview for free, then one paid card, then go wide.
briar agent implement --company acme --owner acme-co --repo acme-app \
    --ticket-project ACME --ticket-key ACME-42 --dry-run
briar plan run acme-q3 --company acme --owner acme-co --repo acme-app \
    --tracker jira --llm anthropic --limit 1 --max-iter 20

Install options

pip install briar-cli                # base: GitHub/Bitbucket/AWS, Jira/Linear, Anthropic + Bedrock, file + Postgres stores
pip install 'briar-cli[openai]'      # OpenAI LLM
pip install 'briar-cli[gemini]'      # Google Gemini LLM
pip install 'briar-cli[mcp]'         # MCP-server tools for `briar agent` (runbook `mcp:` block)
pip install 'briar-cli[gcp]'         # GCP cloud provider
pip install 'briar-cli[azure]'       # Azure cloud provider
pip install 'briar-cli[vault]'       # HashiCorp Vault credential store
pip install 'briar-cli[all]'         # everything

Each adapter fails loudly with the right install command if its SDK is missing. Python 3.10+ (tested through 3.12).


Documentation

Full command reference, every flag, runbook-YAML schema, configuration, and recipes:

📖 usebriar.com/docs

  • End-to-end usage flows (14 multi-feature recipes — onboard a company, extract AWS + Fireflies + fix a PR, build & run a plan, full lifecycle in one sitting, …): agents/flows.md
  • Per-command operator manual: agents/
  • A comprehensive multi-company runbook lives in examples/all_features.yaml.

License

See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

briar_cli-1.1.46.tar.gz (648.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

briar_cli-1.1.46-py3-none-any.whl (444.8 kB view details)

Uploaded Python 3

File details

Details for the file briar_cli-1.1.46.tar.gz.

File metadata

  • Download URL: briar_cli-1.1.46.tar.gz
  • Upload date:
  • Size: 648.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for briar_cli-1.1.46.tar.gz
Algorithm Hash digest
SHA256 0f9f1a15fc2077d511f8114ee3db7ac533726a5c893482c98518d2a1e054cd75
MD5 753b7f9e96e9ef08289f4a293b21317f
BLAKE2b-256 3336657edc0cd449015270c1eef3c8885fdc17c0f4d343aed0877046a376e4c3

See more details on using hashes here.

File details

Details for the file briar_cli-1.1.46-py3-none-any.whl.

File metadata

  • Download URL: briar_cli-1.1.46-py3-none-any.whl
  • Upload date:
  • Size: 444.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for briar_cli-1.1.46-py3-none-any.whl
Algorithm Hash digest
SHA256 8c92197a79a2e3c62c5b98cd7550b69870b65de89ff15d809f44e4b5c2cb848b
MD5 13afc60ef92415fe407caf55b3c31569
BLAKE2b-256 e9e59d4a8b98c3811b915127d2181311650023b97d3d9b9d4178ee4358efb223

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page