CLI and MCP server for Beakr's knowledge base
Project description
beakr-cli
CLI and MCP server for Beakr's knowledge base.
Install
pipx install beakr-cli
pipx is recommended so the beakr binary is on PATH globally — MCP clients
spawn beakr from their own environment and won't see a project-local venv.
pip install beakr-cli works too if you already have an isolated environment.
Quick start
# Authenticate (prompts for API key, then project selection)
beakr auth login
# Use sandbox environment
beakr auth login --env sandbox
# Browse knowledge base
beakr kb ls
beakr kb ls --roots # top-level pages only
beakr kb ls --parent "My Page" # children of a page
beakr kb cat "Page Title"
beakr kb search "authentication flow"
beakr kb blame "API Design"
beakr kb sources "API Design"
beakr kb log
# Propose wiki writes for review
beakr kb propose create --project <project-id> --title "API Design" --file api-design.md
beakr kb propose create --mine --title "Scratch Note" --content "Personal note"
beakr kb propose edit --project <project-id> "API Design" --patches @patches.json
beakr kb propose edit --project <project-id> "Launch Plan" --file launch.md --sections @sections.json
beakr kb proposals list
beakr kb proposals list --mine
beakr kb proposals show <proposal-id>
beakr kb proposals accept <proposal-id>
# Output JSON (for piping)
beakr kb ls --json
--sections accepts a JSON array with section IDs, optional event dates, and
citations. Each section ID should match a <!-- sec:ID --> marker in the page
content. Event dates should be full ISO dates like 2026-04-01; use
date_precision (day, month, quarter, year, or approx) to express
the intended precision. Citations can reference existing Beakr sources from
beakr kb sources or beakr kb provenance, external identifiers, or inline
agent/user-supplied context. To cite the current session, use an inline source
with source_type set to conversation, agent_note, or user_note, plus
source_title and meta.excerpt, meta.content, or meta.text. The backend
assigns a real source id when creating the proposal.
Write proposals require exactly one scope. Use --project <project-id> for
shared/team knowledge or --mine to resolve and use your personal space.
Non-personal spaces do not have wikis.
MCP server (Claude Code integration)
beakr mcp
Add to .mcp.json in your project root:
{
"mcpServers": {
"beakr": {
"command": "beakr",
"args": ["mcp"],
"env": {
"BEAKR_API_URL": "https://api.thebeakr.com",
"BEAKR_API_KEY": "<your-key>"
}
}
}
}
This gives Claude direct access to your knowledge base via tools: research,
kb_ls, kb_cat, kb_search, kb_grep, kb_blame, kb_sources,
kb_provenance, kb_links, kb_timeline, kb_log, kb_stats, kb_graph,
list_spaces, list_projects, get_profile, kb_propose_create,
kb_propose_edit, kb_propose_patch, kb_propose_find_replace,
kb_propose_move, kb_propose_archive, kb_list_proposals,
kb_show_proposal, kb_accept_proposal, and kb_dismiss_proposal.
MCP write tools follow the same proposal workflow as the CLI. They require
exactly one scope: project_id for project knowledge or personal=true for the
user's personal space. They do not write immediately; the assistant should show
or list the proposal and only call kb_accept_proposal after the user explicitly
asks to apply that proposal.
Skills (Claude Code & Codex)
The CLI ships with a Beakr skill and slash commands you can install into your Claude Code or Codex setup. They teach the assistant when and how to use the MCP tools (research workflows, propose-then-accept patterns, citation discipline).
# Install for all detected clients (~/.claude and/or ~/.codex)
beakr install
# Install for one client explicitly
beakr install --client claude
beakr install --client codex
# Install into the current project (./.claude and ./.agents/skills) — committed,
# shared with teammates
beakr install --scope project
# Overwrite existing files
beakr install --force
# Remove
beakr install --uninstall
What gets installed:
- Claude Code:
~/.claude/skills/beakr/(skill + examples + reference) and~/.claude/commands/kb-*.md(slash commands:/kb-search,/kb-research,/kb-write,/kb-audit). - Codex:
~/.codex/skills/beakr/(same skill, invoked as$beakror via/skills).
Restart Claude Code or Codex after installing if the skill doesn't appear.
Environment variables
| Variable | Description |
|---|---|
BEAKR_API_KEY |
API key (overrides stored config) |
BEAKR_API_URL |
API base URL (default: https://api.thebeakr.com) |
BEAKR_ORG_ID |
Active org UUID or slug for X-Org-Id |
BEAKR_PROJECT_ID |
Project scope |
Release
Releases publish to PyPI from GitHub Actions when a GitHub release is published.
Configure a PyPI Trusted Publisher for this project. For the first release, use
PyPI's pending publisher flow if the beakr-cli project does not exist yet:
- PyPI project:
beakr-cli - Owner:
BeakrHub - Repository name:
beakr-cli - Workflow filename:
publish.yml - Environment name:
pypi
Then release:
# Bump both versions to the same value
$EDITOR pyproject.toml src/beakr_cli/__init__.py
# Verify locally
python -m pip install --upgrade build twine
python -m build
twine check dist/*
# Commit, tag, push, and publish a GitHub release for the tag.
# The publish workflow uploads dist/* to PyPI.
After the workflow succeeds:
pipx install beakr-cli
beakr version
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file beakr_cli-0.1.0.tar.gz.
File metadata
- Download URL: beakr_cli-0.1.0.tar.gz
- Upload date:
- Size: 87.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90036333182e4bc658947bd7f9d2a44d33832d1b359562f421775b78b0cbae02
|
|
| MD5 |
15f024ba4853535a5c7c4a657b77366d
|
|
| BLAKE2b-256 |
043046947e91b687c785750425edd7fb3d308fa772767151524c551f299aeb80
|
Provenance
The following attestation bundles were made for beakr_cli-0.1.0.tar.gz:
Publisher:
publish.yml on BeakrHub/beakr-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
beakr_cli-0.1.0.tar.gz -
Subject digest:
90036333182e4bc658947bd7f9d2a44d33832d1b359562f421775b78b0cbae02 - Sigstore transparency entry: 1397529075
- Sigstore integration time:
-
Permalink:
BeakrHub/beakr-cli@902d8be3f9c407249fc6a9c9eeca760e7e793f0a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/BeakrHub
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@902d8be3f9c407249fc6a9c9eeca760e7e793f0a -
Trigger Event:
release
-
Statement type:
File details
Details for the file beakr_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: beakr_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 42.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69ee2cca70bdc6db1e7fb5d11ccaa4055f0dcfe95805e49fcb97840adee9b362
|
|
| MD5 |
6d6456d8ec8fc4b4dac40287f1541547
|
|
| BLAKE2b-256 |
d707ef6e3dd8da2686478acce6482042fe6ff4400b7dede499f1a4ae8b1d2a6e
|
Provenance
The following attestation bundles were made for beakr_cli-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on BeakrHub/beakr-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
beakr_cli-0.1.0-py3-none-any.whl -
Subject digest:
69ee2cca70bdc6db1e7fb5d11ccaa4055f0dcfe95805e49fcb97840adee9b362 - Sigstore transparency entry: 1397529097
- Sigstore integration time:
-
Permalink:
BeakrHub/beakr-cli@902d8be3f9c407249fc6a9c9eeca760e7e793f0a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/BeakrHub
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@902d8be3f9c407249fc6a9c9eeca760e7e793f0a -
Trigger Event:
release
-
Statement type: