Observed since 20 Oct, 21:56 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
@01b/team-kb
Team Knowledge Base harness CLI - scaffold, wire, and manage KB for LLM-assisted development
CLI tool for building and wiring a Team Knowledge Base (KB) so that LLMs (Claude, Gemini, Codex) can automatically leverage shared team knowledge.
@01b/team-kb solves this by creating a shared, git-based knowledge base that automatically loads into any LLM tool across your team.
How is this different from RAG? RAG searches documents when you ask. team-kb pre-loads knowledge into every LLM session — your LLM already knows your domain before you ask anything. Learn more
npm install -g @01b/team-kb
kb initCreate a new KB repository. Run once per team.
mkdir ~/team-kb && cd ~/team-kb
kb init
Generates:
team-kb/
├── ai-context/ # Auto-loaded by LLMs
│ ├── kb-rules.md # Search, record, and reference rules
│ └── team-focus.md # Team intro and focus areas
├── rules/ # Verified business rules
├── analysis/ # Code analysis results
├── decisions/ # Decision records
├── troubleshoot/ # Incident responses
├── drafts/ # Unverified drafts
├── archive/ # Inactive notes
├── templates/ # Note templates
├── .kb/
│ ├── hooks/pre-commit # Frontmatter validation + index rebuild
│ └── scripts/ # rebuild-index.sh
├── .github/workflows/ # CI health checks
└── kb-index.json # Search index (auto-generated)
kb join <url>Join an existing KB. Run once per team member.
kb join https://github.com/your-org/team-kb.git
This will:
git clone the KB repositorykb wire <tool>Wire a project to the KB. Run once per project per tool.
cd ~/repos/my-project
kb wire claude # Claude Code
kb wire gemini # Gemini CLI
kb wire codex # Codex CLI
Creates symlinks in .claude/rules/ pointing to KB files. Claude Code auto-scans this directory, so KB rules and knowledge are loaded automatically every session.
Creates GEMINI.md with @import chain via .gemini/kb-context/ symlink. Gemini loads GEMINI.md as a foundational mandate, which imports KB rules and knowledge through the symlink.
Creates AGENTS.md with a directive to read .codex/kb-directive.md. Codex reads AGENTS.md on session start and follows the instruction to load KB content via tool calls.
Claude: .claude/rules/ ── auto-scan ──→ symlinks ──→ KB ai-context/
Gemini: GEMINI.md ──@import──→ kb-import.md ──@import──→ kb-context/ (symlink) ──→ KB ai-context/
Codex: AGENTS.md ──directive──→ kb-directive.md ──tool call──→ KB ai-context/
Tracked vs local-only: Tracked files (git commit) contain only KB entry points. Files with absolute paths are local-only (.gitignore) to prevent path conflicts between team members.
kb indexRebuild the KB search index. Uses Node.js for safe JSON serialization (replaces the legacy bash script).
kb index # Rebuild kb-index.json
kb index --check # Validate frontmatter without rebuilding
Runs automatically via the pre-commit hook on every commit.
kb query <keywords>Search the KB from the command line. Designed for LLM tool calls — one command returns matching notes.
kb query "coupon discount" # OR matching, top 5, tldr + first 30 lines
kb query "coupon" --repo my-service # Prioritize notes tagged with repo/my-service
kb query "redis" --brief # Show tldr only (note list)
kb query "cache" --full # Show full note content
kb query "coupon" --limit 3 # Top 3 results only
LLMs use this automatically via the rules in ai-context/kb-rules.md.
While working with an LLM, when you discover new domain knowledge:
"Record this to KB"
The LLM will:
Tags use / as a namespace separator (Obsidian-compatible):
tags: [repo/my-service, domain/coupon, tech/redis]
| Folder | Purpose |
|---|---|
rules/ | Team-verified business rules |
analysis/ | Code analysis results |
decisions/ | Decision records |
troubleshoot/ | Incident response records |
drafts/ | Unverified drafts |
Defined in ai-context/kb-rules.md and auto-loaded into every LLM session:
kb query for fast single-command KB search| Folder | Trust level |
|---|---|
global/ | Highest — org-wide rules |
rules/, decisions/ | Team-verified |
analysis/, troubleshoot/ | Generally reliable — lightly verify |
drafts/ | Unverified — must verify |
archive/ | Inactive — may be outdated |
The KB is a plain folder of markdown files with YAML frontmatter — Obsidian reads it natively as a vault. Tags use / separator, which Obsidian renders as a navigable tree in the tag panel. Obsidian CLI (v1.12+) can also be used to search and manage KB notes from the terminal.
MIT
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
fs-extraEnvironment{
"local_name": "fs-extra",
"alias": false,
"peer_metadata": null
} | ^11.0.0 | runtime |
commanderEnvironment{
"local_name": "commander",
"alias": false,
"peer_metadata": null
} | ^13.0.0 | runtime |
picocolorsEnvironment{
"local_name": "picocolors",
"alias": false,
"peer_metadata": null
} | ^1.0.0 | runtime |
simple-gitEnvironment{
"local_name": "simple-git",
"alias": false,
"peer_metadata": null
} | ^3.0.0 | runtime |
@inquirer/promptsEnvironment{
"local_name": "@inquirer/prompts",
"alias": false,
"peer_metadata": null
} | ^7.0.0 | runtime |
tsupEnvironment{
"local_name": "tsup",
"alias": false,
"peer_metadata": null
} | ^8.0.0 | development |
vitestEnvironment{
"local_name": "vitest",
"alias": false,
"peer_metadata": null
} | ^2.0.0 | development |
typescriptEnvironment{
"local_name": "typescript",
"alias": false,
"peer_metadata": null
} | ^5.0.0 | development |
@types/nodeEnvironment{
"local_name": "@types/node",
"alias": false,
"peer_metadata": null
} | ^20.0.0 | development |
@types/fs-extraEnvironment{
"local_name": "@types/fs-extra",
"alias": false,
"peer_metadata": null
} | ^11.0.0 | development |
Source distribution
{
"shasum": "4933cc73e4ae9e6940028d2af983b9b5fab54432",
"tarball": "https://registry.npmjs.org/@01b/team-kb/-/team-kb-0.2.0.tgz",
"fileCount": 15,
"integrity": "sha512-MLdLpwZXkSugflfa+XUCdSkkPnQXMdOWkmIl3vNMAp4oyC2yeO25cEA0ZM9umpHCFH1ejhYCYQrPewrbPkgtNA==",
"signatures": [
{
"sig": "MEUCIGNzaUP1ljYJTOf4AZZWCotKjG/NR5lszpeJXbZeILI/AiEAt3vjau86mkxmDXf1MhJfk6+DaLtH/Rn9ahY3t5jDPIs=",
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
}
],
"unpackedSize": 83729
}Observed since 20 Oct, 21:56 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:fbfbfa193d8fcfffac5c350ed900e37e6b911fc1ebc2da413f481745d4eea7ca