
briar
io.github.iklobato由 GitHub 账号 iklobato 发布v1.1.94更新于 Oct 27, 2026
Local knowledge store built from GitHub, Jira, Linear and cloud history, served over MCP.
概览
Briar 从 GitHub、Jira、Linear 和云历史中构建本地 markdown 知识库,并通过 MCP 提供给 AI 助手使用。
- 可以做什么
- 从代码托管、工单系统、云和会议工具中抽取信息,保存为 markdown 知识块,并可读取、写入、列出和删除这些知识块
- 把 briar 作为 MCP 工具提供,或在终端聊天中驱动这些工具
- 运行编码代理:根据工单开启草稿 PR,或修复 PR 上的评审意见
- 把 Jira 或 GitHub Projects 看板转成计划并逐卡执行
- 按 YAML runbook 定时运行抽取器,并在日志中查看记录的决策
- 保存与检查凭据,并提供只读状态仪表盘
- 适用场景
- 适合希望助手基于团队自己的 GitHub、Bitbucket、Jira、Linear、AWS 或 Fireflies 上下文工作,而不是依赖通用知识的场景;也适合在本地运行“工单到草稿 PR”和“修复 PR 评审意见”的代理。
- 运行要求
- 以本地 Python 3.10 及以上命令行工具运行(pip install briar-cli),或使用 iklob1/briar Docker 镜像;MCP 服务与聊天命令需要 mcp 附加包。代理还需要 git 和 GitHub CLI gh。凭据通过 briar auth login 保存到本地配置文件,LLM 密钥来自 ANTHROPIC_API_KEY、GITHUB_TOKEN 等环境变量。Docker 镜像仅支持 linux/amd64。
安装
在 SourceWeft 中
- 打开 控制台中的 briar,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
briar
The local CLI that turns your team's tools into knowledge, then runs coding agents that open draft PRs with it.
[PyPI] [Python] [Downloads] [Docker pulls] [Tests] [License: MIT]
Install · Quickstart · Docs · Website · Changelog
[briar init, briar doctor, then briar extract collects facts about the repo and briar context get prints them]New to briar? Learn it in 3 examples, from install to AI agents.
briar is a command-line tool (you run it in your terminal) that helps AI coding assistants do better work on your team's code.
The problem: an AI assistant like Claude can write code, but it does not know your team. It does not know which tests you run, who reviews what, how your PRs usually look, or what the ticket really asks. So it guesses, and you fix its guesses.
What briar does about it, in two parts:
- It collects facts. It reads your team's tools (GitHub or Bitbucket, Jira or Linear, AWS, Fireflies meeting notes) and writes what it learns into plain text files on your computer. briar calls these facts "knowledge".
- It gives those facts to AI agents. An agent is an AI that works on its own, step by step. One briar agent takes a ticket and opens a draft PR (a PR marked "not ready to merge yet"). Another one fixes the review comments on a PR. You always review and merge yourself.
There is no briar server and no account. briar only talks to the services you set up: your code host, your tracker, your cloud and your AI provider. Your tokens stay in a file on your computer.
What you get
- Facts from your tools. briar has 23 extractors. An extractor is a small reader for one kind of fact, for example "how long PRs take to merge" or "which files change the most". They read GitHub, Bitbucket, Jira, Linear, AWS, GCP, Azure and Fireflies, and write plain markdown text to a folder (or to a Postgres database), once or on a schedule.
- AI agents that read the facts first.
briar agent implementtakes a ticket, reads the facts it needs, writes the code in a fresh copy of your repo, runs your tests and opens a draft PR.briar agent prfixanswers each review comment with its own small commit. Agents never force-push, amend or rebase, so they never rewrite history that is already there. - A whole board, one card at a time.
briar planreads a Jira board or a GitHub Project (the list of tickets your team works on), puts the cards in order and works on them one by one. When a card needs another card's code, it starts from that card's branch, so the PRs build on each other. - You stay in charge. Agents only open draft PRs. briar has no command that merges.
- Works with your other AI tools.
--merge-claude-mdadds the facts toCLAUDE.md, the file Claude Code reads when it starts.briar mcp serveshares the facts with any app that speaks MCP (a standard way for AI apps to call tools); it offers 10 tools. - Runs on your computer. No account. Keys stay in a file on your machine, or in AWS Secrets Manager, SSM or Vault.
Where the knowledge comes from, and where the work goes
Everything in the dashed box runs on your machine and reads from your
tools. Agents push branches, open draft PRs and reply on reviews; their
send_message tool only reaches the channels you list in the runbook.
- Extractors read your tools, on demand or on a schedule, and write markdown knowledge to a local folder or to Postgres.
- You point an agent at a ticket or a PR. It fetches the ticket, the PR's review threads, and matching meeting notes and Slack messages live.
- In a clean git worktree it first reads the knowledge sections that fit its job (conventions, hotspots, reviewers, PR history), writes the code on a new branch and runs your tests. Coding agents run on Anthropic with your own key.
- It pushes and opens a draft PR. If you allow those channels in the runbook, it can also comment on the ticket or post in Slack or Telegram.
- You review.
briar agent prfixanswers the comments with one commit per thread. You merge; briar never does. - A plan run writes what each card taught into the plan's knowledge, which
its selector reads before the next pick. All knowledge also feeds Claude
Code (
CLAUDE.md) and any MCP client.
More diagrams are in See it run.
Install
briar needs Python 3.10 or later. To run briar agent or briar plan run
you also need git and the GitHub CLI gh, because the agent runs them.
The base install covers GitHub, Bitbucket, AWS, Jira, Linear, Fireflies, Anthropic (Claude) and AWS Bedrock, with a file or Postgres store, and runs the coding agents. Extras add more:
Or skip the install and use the Docker image, which also has git and
gh:
Mounts, keys and running agents in Docker: usebriar.com/docs/install#docker. What each extra adds: usebriar.com/docs/install#extras.
Quickstart
The short version, for a GitHub repo with Jira tickets. New to briar? Learn it in 3 examples instead.
After step 3 you have ./knowledge/knowledge/acme.md. After step 6 you
have a branch chore/acme-42 and a draft PR on acme-co/acme-app.
Learn briar in 3 examples
Written for someone who has never used briar. Each example says the problem it solves, what each command does, what happens behind the scenes, and what you get. Every GIF is a real run in a clone of this repo on briar 1.1.99: the commands really ran; only the typing is paced, and a long output is shown one screen at a time so you can read it.
Before you start (once, about 2 minutes):
If you do not use the GitHub CLI gh, run
briar auth login github-pat --company myteam and paste a GitHub token
instead. That token is all examples 1 and 2 need. Nothing is sent to an
AI, so they cost nothing. Example 3 also uses --dry-run, so it costs
nothing either; you only need an AI key (export ANTHROPIC_API_KEY=...)
when you drop --dry-run and let the agent really work.
Words you will see:
Example 1: Set up briar and collect facts
The problem: an AI that writes code for you does not know your repo or how your team works: how fast PRs get merged, who writes them, how often you release, how often CI passes.
What happens:
initrunsgit remote get-url originto find the GitHub owner and repo name, and writes them into.briar.tomlwith the team name you chose (myteamis just a label). After this, no command needs--companyor--repo. To see each setting and where it came from, runbriar config show.doctorchecks Python, the settings file, the git remote, your GitHub token and your AI key.okmeans ready;warntells you what is missing and what needs it.extractruns the extractors you name with--include. They ask the GitHub API for your merged PRs (pr-archaeology), your releases (release-cadence) and your last 100 CI runs (ci-health), and sum them up. The result is saved as one markdown file under./knowledge/, calledknowledge:myteam.--merge-claude-mdalso writes the facts to.briar/knowledge/myteam.mdand adds a short block toCLAUDE.mdthat points to it. Claude Code (an AI coding assistant) readsCLAUDE.mdwhen it starts, so every session begins with your facts. Your own text inCLAUDE.mdstays as it is.context getprints the saved file. It only reads your disk; nothing goes online.
You get: your repo's facts in one text file, ready for any AI.
briar extract -h lists all 23 extractors. Good ones to add later:
code-hotspots (the files that change the most),
codebase-conventions (your test runner, linter and formatter) and
stale-prs (open PRs nobody touched for a while). Running extract again
only replaces the sections of the extractors that ran, so the facts you
already have stay. briar extract with no --include runs all 23; on this
repo that took about 4 minutes.
Example 2: Keep the facts fresh with a runbook
The problem: facts from last month are wrong today, and you do not want to type the extract command every day.
Save this as runbooks/myteam.yaml. It lists the same three extractors as
example 1:
What happens:
serveis a scheduler: a program that keeps running and starts each job on time. Every second it checks which job is due.- When the job is due, it does the same work as
briar extractand savesknowledge:myteamagain. The log lines show each step. - It runs until you press Ctrl+C. On a server you leave it running.
- To run the file once, right now, use
briar runbook extract runbooks/myteam.yaml. - More teams go under
companies:. Each team gets its own file, and their first runs start a few seconds apart, so they do not all call GitHub at the same moment. - A runbook writes its whole file each time, so list in it every extractor you want to keep.
You get: facts that refresh themselves, without anyone typing a command.
Example 3: Let AI agents do the work
An agent reads your facts first, then works on its own. briar has two:
one turns a ticket into a draft PR, the other answers review comments.
Both are shown with --dry-run, so you see exactly what the AI would be
told, without running it.
A ticket becomes a draft PR
The problem: before an AI can write good code for a ticket, it needs the ticket, your repo's rules and your team's facts, all in one set of instructions, and it must not be able to do anything risky.
What happens:
- briar reads issue #38 from GitHub and your saved facts, and builds the prompt: the agent's steps (make a new branch, write the code, run the tests, open a draft PR), its rules (never force-push, amend or rebase), and the tools it may use (a limited shell, and reading and editing files).
--dry-runprints all of that and stops. No AI is called, nothing is cloned, nothing is pushed.
You get: run it again without --dry-run, with ANTHROPIC_API_KEY
set, and the agent writes the code on a new branch, runs your tests and
opens a draft PR. You review it and merge it; briar never merges. Jira and
Linear tickets work the same way (--tracker jira, --tracker linear).
Review comments get answered
The problem: reviewers leave comments on your PR, and fixing each one, committing and replying on GitHub takes time.
What happens:
- briar reads PR #75, its description and its open review comments from GitHub (here there is one, shown under "Inline review comments (1)").
- It builds the prompt: one small commit per comment, then a reply on the comment with the commit's SHA (its id), and the same safety rules as above.
--dry-runprints it and stops. Nothing changes on the PR.
You get: run it without --dry-run and the agent fixes each comment,
pushes to the PR's branch and replies on GitHub.
Commands
Each command has a manual in agents/.
The same reference, with more examples, is at
usebriar.com/docs.
Recipes that chain these commands are in flows.md. A runbook that uses every feature is examples/all_features.yaml.
Three flags work with every command, anywhere on the line:
See it run
The same four diagrams as on usebriar.com. Click one to open it.
Which command?
- Want to know something about the code, the team or production? Read it
once with
briar extract, every day withrunbook serve, from Claude Code or any MCP client, or askbriar chat. - Want code changed? One ticket is
agent implement, an open PR with review comments isagent prfix, and a whole board isplan buildonce, thenplan run. - Setting up or checking?
briar initandbriar doctorfirst,secrets doctorwhen a credential is missing, andjournal listto read back what a plan run decided.
Inside an agent run
- briar builds one system prompt: the agent's persona, the knowledge sections that persona reads (for implement: codebase conventions, code hotspots, reviewer profiles, active work, PR history and the meeting digest), the ticket or PR context, and the procedure to follow.
- The Anthropic model answers with tool calls. briar runs them inside a
temporary git worktree and sends back the results. This repeats for at
most 30 turns (
--max-iter). - The tools are bash and file read, write and edit.
send_messageand MCP tools are added only when the runbook lists channels or servers. - When the model finishes, briar prints its final message (ending with the PR URL) and deletes the worktree. On an error or the turn ceiling the worktree is kept so you can look.
--dry-runprints the prompt and the tool list and stops there: no clone, no model call.
Answering a review
- prfix reads the PR with
gh pr view: review decision, branch and checks. - If it is approved, every required check is green and every open thread is positive, it reports "skipped" and stops.
- Otherwise it lists every open review thread and PR comment and handles them one at a time.
- A requested code change gets the smallest fix and its own commit citing the comment. A question or opinion gets a reply, no commit. A fix that isn't safe gets a comment saying why.
- Then it pushes fast-forward to the PR branch and replies on each thread it addressed with the commit SHA.
- It never force-pushes, amends, rebases or squashes, and never commits as a bot identity.
Working a board
plan buildreads a Jira board or GitHub Project and turns it into an ordered card list (with--with-knowledge, using your knowledge too). It also seeds aknowledge:acme.q3blob for the plan.plan runasks the selector (an LLM) what to do next. It reads the plan, the knowledge and the journal of earlier decisions.- Pick: the card's ticket goes to
agent implement, on the card's branch (chore/kan-2when built without an LLM), from the card's parent branch. Success marks it done and writes a lesson intoknowledge:acme.q3, which the selector reads before its next pick. - A failed card is marked blocked. The run stops there, unless
--continue-on-failure. - Replan: briar re-reads the board, keeps the status of cards it already
knew, and adds new ones as pending. At most 3 times per run
(
--max-replans). - Complete ends the run. Blocked stops it until you step in.
--limit Nstops after N cards. Every decision lands in the journal.
Contributing
Bug reports and PRs are welcome: open an
issue or read
CONTRIBUTING.md
first. Every merge to main is a release on PyPI and Docker Hub, and
CHANGELOG.md
lists what each version changed. If briar helps you, a star on GitHub
helps other people find it.
Telemetry
briar sends error reports and usage counts by default. No prompts, file
contents, ticket keys, repo names, paths or secret values leave your
machine. Turn it off with briar telemetry off, BRIAR_TELEMETRY=off
or DO_NOT_TRACK=1.
License
MIT. See LICENSE.
来源:README.md,提交 ec6d313
工具
0版本历史
3- v1.1.94最新Oct 13, 2026
- v1.1.79Oct 12, 2026
- v1.1.73Oct 11, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分