ProjectBrain CLI
Command-line interface for ProjectBrain — manage projects, tasks, knowledge, and run AI agents from your terminal.
Installation
pip install project-brain
Requires Python 3.11+.
Quick Start
# Log in (opens browser)
pb login --google
# List your projects
pb projects list
# Start the agent runner
pb run --project <project-id> --agent <agent-name>
Authentication
| Method | Command |
|---|---|
| Google OAuth | pb login --google |
| GitHub OAuth | pb login --github |
| Email / password | pb login |
| API token | pb login --token pb_xxx |
pb whoami # show current identity
pb logout # clear stored credentials
Credentials are stored in ~/.pb/config.json. Set PB_TOKEN in your environment to override.
Commands
pb run — Start the agent runner
Connects an agent to ProjectBrain and polls for tasks to execute.
pb run --project <project-id> # interactive agent selection
pb run --project <project-id> --agent <name> # skip selection prompt
pb run --project <project-id> --once # single tick, then exit
Options
| Flag | Default | Description |
|---|---|---|
--project, -p |
(required) | Project ID |
--agent, -a |
interactive | Agent name or ID prefix |
--interval |
60 |
Poll interval in seconds |
--once |
false |
Run one tick and exit |
--max-concurrent |
1 |
Max simultaneous tasks |
--mcp-url |
auto-derived | MCP server URL |
--github OWNER/REPO |
auto-detected | Enable GitHub mode (Docker + PRs) |
--rebuild |
false |
Force rebuild of agent Docker image |
--log-level |
INFO |
Logging verbosity |
GitHub mode is enabled automatically when your project has GitHub configured. The runner spawns a Docker container per task and opens pull requests. Requires GITHUB_TOKEN in your environment.
Adapter mode (no Docker) uses a local adapter script. The adapter is resolved from the agent's configured type (claude_code, gemini, etc.).
pb projects
pb projects list # list all projects
pb projects get <id> # show project details
pb tasks
pb tasks list --project <id> # list tasks
pb tasks list --project <id> --status todo # filter by status
pb tasks list --project <id> --search "auth" # search
pb tasks get <task-id> # show task detail
pb knowledge
pb knowledge search --project <id> "auth middleware" # semantic search
pb knowledge list --project <id> # list entries
pb curate
AI-assisted knowledge curation — reviews and improves knowledge entries in a project.
pb curate run --project <id>
pb completion
Shell tab-completion setup.
pb completion install # install for current shell
pb completion show # print completion script
Environment Variables
| Variable | Description |
|---|---|
PB_TOKEN |
API token or JWT (overrides stored credentials) |
PB_SERVER |
API server URL (default: https://api.projectbrain.tools) |
PB_MCP_URL |
MCP server URL (default: auto-derived from PB_SERVER) |
GITHUB_TOKEN |
GitHub personal access token (required for GitHub mode) |
GITHUB_REPO |
Override GitHub repo (owner/repo) |
PB_RUNNER_PATH |
Override path to runner.py |
PB_OAUTH_PORT |
Local port for OAuth callback (default: 8085) |
Global Flags
pb --json <command> # output raw JSON
pb --server <url> <command> # override API server
pb --version # print version
License
MIT
Metadata
Release files for project-brain 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| project_brain-0.1.2.tar.gz | 47.7 kB | With provenance | Details for project_brain-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| project_brain-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for project_brain-0.1.2-py3-none-any.whl |
Total release size: 71.9 kB
Release files / project_brain-0.1.2.tar.gz
| Download URL | project_brain-0.1.2.tar.gz |
|---|---|
| Size | 47.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e87dbc17954d3ba71c3078a92ba35678568a316fbf6e06cb0647671f1a082781
|
|
BLAKE2b-256 checksum How to use checksums |
99866bcb0ea8b2ddfae80ce208a48e0195765a6db5798ff858ce0512d3395470
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.
Transparency logRelease files / project_brain-0.1.2-py3-none-any.whl
| Download URL | project_brain-0.1.2-py3-none-any.whl |
|---|---|
| Size | 24.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9956a2e5e3dbc19f76f9f57809022b14dae8db3ba410f60e747f540d231cbfa4
|
|
BLAKE2b-256 checksum How to use checksums |
ea471ed02cd3c540675f31726fcecb1d424669e4e752b0b586e0ac6ea10b9aad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.
Transparency logSecurity for project-brain 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for project_brain-0.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.