PYPI PACKAGE AUDIT v34.0.1 Enterprise Healthy

brain-framework

Brain Framework is a local-first brain for you and your AI agents. It compiles YAML-frontmatter Markdown notes into JSONL records, validates with optional JSON Schemas, orchestrates least-privilege loops, and searches offline via a disposab

PyPkgScore brain-framework
Methodology & Criteria โ™ฅ Donate
955 / 1000
Quick Install
pip install brain-framework
1. Governance
200/200
2. PEP Metadata
200/200
3. Security
200/200
4. Docs & SEO
155/200
5. CI Engineering
200/200
๐Ÿ“ฃ Share Audit: Share this report and visual preview in the current language
Advertisement
PYPI TELEMETRY

Downloads & Community Adoption

Last 30 days (without mirrors)
Last 7 days
1199
Last 30 days
3971
Total (180 days)
11519
Metric / Ecosystem Status / Value Source
Downloads (30d / 180d) โ€” PyPI Stats (without mirrors)
Trusted Publishing (PEP 740) โœ“ Verified OIDC PyPI Integrity / Sigstore
Django Packages โ€” djangopackages.org
PyTech / PyPkgScore 955 / 1000 PyPkgScore Engine

Health & Engineering Analysis (5 Pillars)

1. Governance & Community200 / 200 โ–พ
LICENSEโœ“ 50 pts
SECURITY.mdโœ“ 50 pts
CONTRIBUTING.mdโœ“ 50 pts
CODE_OF_CONDUCT.mdโœ“ 50 pts
2. PEP Metadata & Packaging200 / 200 โ–พ
Wheel (.whl)โœ“ 50 pts
pyproject.tomlโœ“ 50 pts
Project URLsโœ“ 50 pts
Trove Classifiersโœ“ 50 pts
3. Security & Supply Chain200 / 200 โ–พ
Zero CVEs (OSV)โœ“ 60 pts
Trusted Publishing (OIDC)โœ“ 50 pts
Snyk / Audit Linkโœ“ 40 pts
HTTPS Repositoryโœ“ 50 pts
4. Documentation, SEO & Ecosystem155 / 200 โ–พ
Structured READMEโœ“ 60 pts
Read the Docsโœ“ 50 pts
Django Packagesโœ• 0 pts
Website / Technical Articlesโœ“ 45 pts
5. Engineering, CI & Quality200 / 200 โ–พ
Automated Testsโœ“ 65 pts
GitHub Actions CIโœ“ 65 pts
CHANGELOG.mdโœ“ 35 pts
Env & Lockfile (uv/rye/poetry/pdm/hatch)โœ“ 35 pts
Advertisement
README & DOCS

Official Documentation & Usage Guide โ€” brain-framework

PyPI Metadata v34.0.1
Show full original documentation (English README) โ–พ

AI coding agents lose context between sessions, while proprietary memory platforms lock your knowledge inside opaque databases. Brain Framework (bf) turns a plain Git folder of Markdown notes, schema-validated JSONL records, and shell or Python loops into a fast, offline knowledge brain for humans and AI coding agents.

  • Plain files, zero lock-in: YAML for config, Markdown for humans, canonical JSONL for records. Inspect or query your data anytime with git, rg, jq, or DuckDB.
  • Instant offline BM25 search: A strictly disposable SQLite FTS5 cache ranks authored notes ahead of raw memories, resolves aliases and backlinks, and never mutates disk on read-only commands.
  • Least-privilege automation loops: Run deterministic collectors (sensors/), maintenance jobs (routines/), coding agents (agents/), and stream daemons (when: daemon) with per-loop secret allowlists (env_from:) and headless bf watch.
  • Lean, model-agnostic core: Three runtime dependencies (jsonschema, markdown-it-py, pyyaml) on Python 3.12+, zero built-in LLMs, and zero global config.

Quick start

Requires Linux or macOS and uv (Python 3.12+). No model API key, database server, or cloud account is required:

uv tool install brain-framework
bf init ~/brain
cd ~/brain
bf check --format text
bf status --format text
bf query "welcome" --format text

Output on a fresh brain:

Check: brain  [OK]
  notes=1  memories=0  errors=0  warnings=0

Brain: brain  [HEALTHY]
  notes=1  memories=0  loops=0  events=1

Query (fts5): 1 result(s) for 'welcome'

  concepts/welcome.md#welcome  Welcome

If BF_BRAIN is already exported in your shell, unset it or pass --brain ~/brain.

Next, follow Getting started to ingest records and write linked decisions, or run the four-tool walkthrough with synthetic Workspace, Jira, GitHub, and Google Cloud fixtures.

How it works

A brain is one portable directory organized around a 3x3 layout (three note folders, three loop folders, three JSONL record streams):

my-brain/
โ”œโ”€โ”€ bf.yaml         # Config: notes, brains, search.exclude, concurrency pools, loops
โ”œโ”€โ”€ concepts/       # Durable knowledge (<slug>.md or <slug>/index.md bundles)
โ”œโ”€โ”€ projects/       # Ongoing initiatives and decisions
โ”œโ”€โ”€ actions/        # Scoped requests, deliverables, and attachments
โ”œโ”€โ”€ sensors/        # Deterministic collectors (stdout JSONL -> memories/)
โ”œโ”€โ”€ routines/       # Maintenance scripts and continuous daemons (when: daemon)
โ”œโ”€โ”€ agents/         # Coding-harness or LLM tasks
โ”œโ”€โ”€ schemas/        # Optional domain JSON Schemas (core record schema always enforced)
โ”œโ”€โ”€ evals/          # User-owned Python/pytest contract checks
โ”œโ”€โ”€ memories/       # Canonical JSONL (_notes.jsonl + <source>.jsonl; gitignored)
โ”œโ”€โ”€ logs/           # Private 0700 structured JSONL loop logs (gitignored)
โ””โ”€โ”€ .bf/            # Private 0700 runtime: disposable cache/index.sqlite3, state/, locks/
  • Authoring: Write CommonMark Markdown with YAML frontmatter, #id heading anchors, checklist tasks, typed links ({rel=cites}), universal refs (source:id, bf://), and optional schemas/<source>.json validation.
  • Retrieval: Search ranked BM25 hits and --links-to backlinks with bf query, resolve notes, #anchor sections, or aliases with bf read, track freshness with bf review, and run rg, jq, or DuckDB directly on memories/*.jsonl.
  • Operations: Declare explicit loops: with named concurrency: pools, per-loop env_from: secrets, trailing-edge debounce:, delayed bf emit --in|--at wakeups, live bf pause/bf resume, and headless bf watch supervision.
  • Reference: Full CLI contract (strict read-only vs write commands), exit codes, BF_* env vars, {{...}} placeholders, bf.yaml config, and published Draft 2020-12 JSON Schemas (bf schema).

Works with your AI coding harness

bf pairs with Claude Code, Codex, Antigravity, Gemini CLI, OpenCode, or any terminal agent without an MCP server:

  • Inside a brain: Agents read the repo's AGENTS.md, orient with bf status and bf review, edit Markdown notes directly, and verify with bf build && bf check plus evals/.
  • From any repository: Set export BF_BRAIN=~/brain and install the optional /bf skill so your harness queries and updates your brain on demand.
  • Always-on supervision: Run bf watch headlessly under systemd --user or launchd and monitor live in any terminal with watch -n 2 bf status --format text.

Design principles

  1. Strict read/write boundary: bf status, bf review, bf read, bf query, bf events, bf check, and bf schema never touch disk. Cache readers open .bf/cache/index.sqlite3 in strict read-only mode (mode=ro) with automatic JSONL fallback.
  2. Private and confined by default: Every path opens via O_NOFOLLOW directory descriptors, .bf/ and logs/ enforce 0700/0600 owner-only permissions, secrets stay scoped to each loop's env_from:, and logs redact credentials automatically.
  3. Git-native collaboration: Track notes, config, schemas, loops, and evals in Git while keeping generated memories/, private logs/, .env, and .bf/ local.

Documentation ยท Examples ยท Issues ยท Contributing ยท Governance ยท Security ยท Third-party notices