Search and write the company knowledge brain. Use for any question about the org, people, projects, decisions, or history, and to persist durable knowledge beyo
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-qm-harness-snippets-cd2453a3608f ,按照其中的说明把「gbrain」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
This sandbox has the gbrain CLI connected (thin-client) to the org's central
brain. It is the deep, indexed, cross-source memory: org docs, shared channel
knowledge, and every agent's durable notes. Your scope's own notebook stays the
fast per-turn memory; the brain is where knowledge outlives a scope and becomes
searchable by everyone entitled to it.
gbrain remote doctor passes)Your scope's brain credentials arrive via the deployment's secret handoff
(keychain entry or one-time secret drop named gbrain). Then:
gbrain init --mcp-only \
--issuer-url "https://brain.<org>.com" \
--mcp-url "https://brain.<org>.com/mcp" \
--oauth-client-id "<client id from the handoff>" \
--oauth-client-secret "<client secret from the handoff>"
gbrain whoami # must succeed before using any other command
Pass the secret with --oauth-client-secret, not via GBRAIN_REMOTE_CLIENT_SECRET:
an env-sourced secret is deliberately NOT written to ~/.gbrain/config.json, so
every later command would fail with "No client_secret available" once the
variable is out of scope. The flag persists it to the config file on this
sandbox's durable disk, which is what the tool's credential capture expects.
Do not run gbrain remote doctor — it needs admin scope, which your client
does not have (by design). gbrain whoami is the read-scope health check.
gbrain search "who decided X and why" # hybrid semantic + keyword search
gbrain get <slug> # read one page
gbrain query "question" --json # search tuned for agent consumption
You can read: the shared agent-memory source, org read-only sources (wiki, handbook), and everything under them. Reads are isolation-enforced server-side; you only ever see sources your client is entitled to.
Your client is write-fenced to slug prefixes — your own namespace plus the channels you belong to. Writes outside them are rejected server-side.
# personal durable memory (your namespace):
gbrain put emp-<your-slug>/people/jane-example --content "..."
# shared channel knowledge (channels you are in):
gbrain put chan-eng/decisions/2026-08-database-choice --content "..."
Conventions:
gbrain link <from> <to> (from must be in your
namespace; linking TO any readable page is fine).(said in <where>) provenance
note.gbrain search FIRST, then answer.gbrain put.gbrain whoami to confirm which client and scopes you're using, and report
its output.