Terminal-native study and deliberate-practice system
Project description
ProductiveBrain
ProductiveBrain is a terminal-based system for turning learning intent into the next concrete session: study, deliberate practice, evidence, and recall.
The key long-running workflows are:
goal -> plan -> study
goal -> plan -> practise
or you can just start a session with: pb teach, pb study, or pb practice (better for adhoc work)
pb do routes to the most suitable command, helps when unclear which command would be the best. pb next chooses the next concrete step from local state. pb review allows you to reflect and report for improving context -> giving you a better learning UX.
What It Does Now
- Creates structured learning goals and short roadmaps with
pb goal add. - Drafts daily and weekly learning plans with
pb plan dayandpb plan week. - Starts study, practise, and teach blocks from a topic or skill.
- Keeps session/evidence notes in Markdown and fast runtime state in SQLite.
- Generates scoped Anki candidates with
genankiexport support. - Stores generated notes in a quarantine inbox before any merge into the vault.
- Manages named vault profiles for Obsidian-style Markdown vaults.
- Exposes the
productivebrain-mcpserver for agent clients while keeping the CLI as the primary interface.
Install
Requires Python 3.11+.
From a checkout:
git clone https://github.com/qwerty-sapien/pbrain.git
cd pbrain
python3 -m pip install -e .
pb init
pb doctor
With uv:
uv tool install git+https://github.com/qwerty-sapien/pbrain.git
pb init
For an isolated first run or scripted smoke test, use an explicit config path:
tmp="$(mktemp -d)"
pb --config "$tmp/config.toml" init --non-interactive --vault-name demo --vault-path "$tmp/vault" --provider gemini --model gemini-3-flash-preview
pb --config "$tmp/config.toml" doctor
pb init is conservative when a config already exists. Use a separate --config file when testing replacement behavior.
First Session
pb goal add "Understand Bayesian reasoning well enough to solve medical-test base-rate examples" --yes
pb plan day --quick --budget 90m --yes
pb do "I want to practise Bayes rule word problems with base rates"
pb practise "Bayes word problems" --duration 5m --drill "posterior odds" --cues "prior, likelihood" --steps --yes
pb finish "still mixing up P(A|B) and P(B|A)" --skip --yes
pb review day --skip
pb review week --skip
pb next
Use pb study "Rust async cancellation" --duration 10m --understand --steps --yes for conceptual work, and pb teach "Bayes theorem" --understand --steps --yes when you want the system to make you explain.
Stable CLI Surface
pb/brain: open the interactive learning shell.pb init,pb doctor,pb update,pb reset,pb set: setup and preferences.pb goal,pb plan: direction before execution.pb learn,pb study,pb practise,pb practice,pb teach: learning blocks.pb do,pb next: routing and next action.pb pause,pb resume,pb finish: session lifecycle.pb thought,pb todo,pb notes,pb feedback: capture and workflow guidance.pb anki: scoped recall candidates and export.pb context,pb vault,pb mcp: source context, vault profiles, and agent integration.
pb model and pb config still exist as compatibility/diagnostic surfaces. New preference docs use pb set.
State Model
Markdown vault
goals, evidence notes, generated notes, reviews, feedback proposals
SQLite data dir
sessions, tasks, plan blocks, reminders, Anki candidate state, indexes, caches
Quarantine inbox
Learning/Inbox/pb/ by default; generated Markdown lands here before merging
This split is deliberate: learner-facing durable material stays readable and auditable in Markdown; SQLite handles fast local state.
LLMs And Offline Behavior
The default provider is Gemini. The working Gemini model IDs are:
gemini-3.1-flash-lite-previewgemini-3-flash-previewgemini-3.1-pro-preview
Many commands have deterministic fallbacks or useful read-only behavior without a live model. Use pb doctor for local setup and pb doctor --llm only when you want a live provider probe.
Anki
Anki is optional. pb anki generate creates suggested cards, pb anki accept promotes candidates, and pb anki export packages accepted cards to .apkg or CSV. If AnkiConnect is offline, export still works through the package path.
Additional Docs
- Quickstart
- Examples
- Concepts
- Command Contract
- Architecture
- Vaults
- Notes
- Anki
- LLM Providers
- MCP
- Product Control
- Evidence Base
- Development
License
Copyright 2026 qwerty-sapien
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
See LICENSE for the full text.
AGPL Section 13 note: If this software is modified and run as a network service, you may be required to offer Corresponding Source to users interacting with it over the network.
Canonical source: https://github.com/qwerty-sapien/pbrain
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 probrain-0.1.0.tar.gz.
File metadata
- Download URL: probrain-0.1.0.tar.gz
- Upload date:
- Size: 706.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
669067c9029065c0a88f3a298abb5bca65a25de26c38319599452f7d3a40514b
|
|
| MD5 |
598b02616d888abb948a0d8126f21b74
|
|
| BLAKE2b-256 |
aa8f7839a471b13ed4f3168f8261b142b5406cd38d724568793d4ab36d33dda8
|
Provenance
The following attestation bundles were made for probrain-0.1.0.tar.gz:
Publisher:
python-publish.yml on qwerty-sapien/pbrain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
probrain-0.1.0.tar.gz -
Subject digest:
669067c9029065c0a88f3a298abb5bca65a25de26c38319599452f7d3a40514b - Sigstore transparency entry: 2084606071
- Sigstore integration time:
-
Permalink:
qwerty-sapien/pbrain@af79dd1f3c6d503cd040814dfb56a0cef920492c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/qwerty-sapien
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@af79dd1f3c6d503cd040814dfb56a0cef920492c -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file probrain-0.1.0-py3-none-any.whl.
File metadata
- Download URL: probrain-0.1.0-py3-none-any.whl
- Upload date:
- Size: 843.0 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 |
fc7fe2956f10f9cc4b8840fa48414e855ff0d206f50b708f1055866ee54b5f87
|
|
| MD5 |
b360dd2e16ad831489e1985d5b716be5
|
|
| BLAKE2b-256 |
c77dce99de3ca67bdd8fac23a7d97586a4f914e9f6b80e44424fca56b1b7cdfb
|
Provenance
The following attestation bundles were made for probrain-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on qwerty-sapien/pbrain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
probrain-0.1.0-py3-none-any.whl -
Subject digest:
fc7fe2956f10f9cc4b8840fa48414e855ff0d206f50b708f1055866ee54b5f87 - Sigstore transparency entry: 2084606078
- Sigstore integration time:
-
Permalink:
qwerty-sapien/pbrain@af79dd1f3c6d503cd040814dfb56a0cef920492c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/qwerty-sapien
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@af79dd1f3c6d503cd040814dfb56a0cef920492c -
Trigger Event:
workflow_dispatch
-
Statement type: