CLI for ProjectBrain — AI-native project management
Project description
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
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 project_brain-0.1.2.tar.gz.
File metadata
- Download URL: project_brain-0.1.2.tar.gz
- Upload date:
- Size: 47.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e87dbc17954d3ba71c3078a92ba35678568a316fbf6e06cb0647671f1a082781
|
|
| MD5 |
982ee6e0606e1c4a5df17b027954d19c
|
|
| BLAKE2b-256 |
99866bcb0ea8b2ddfae80ce208a48e0195765a6db5798ff858ce0512d3395470
|
Provenance
The following attestation bundles were made for project_brain-0.1.2.tar.gz:
Publisher:
publish.yml on 9-Trinkets/projectbrain-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
project_brain-0.1.2.tar.gz -
Subject digest:
e87dbc17954d3ba71c3078a92ba35678568a316fbf6e06cb0647671f1a082781 - Sigstore transparency entry: 1173087662
- Sigstore integration time:
-
Permalink:
9-Trinkets/projectbrain-cli@e06d2c1d24c342b674f37434f7f5e08d35f36e1f -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/9-Trinkets
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e06d2c1d24c342b674f37434f7f5e08d35f36e1f -
Trigger Event:
release
-
Statement type:
File details
Details for the file project_brain-0.1.2-py3-none-any.whl.
File metadata
- Download URL: project_brain-0.1.2-py3-none-any.whl
- Upload date:
- Size: 24.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9956a2e5e3dbc19f76f9f57809022b14dae8db3ba410f60e747f540d231cbfa4
|
|
| MD5 |
a094477447966bc399bead44d3ae38b1
|
|
| BLAKE2b-256 |
ea471ed02cd3c540675f31726fcecb1d424669e4e752b0b586e0ac6ea10b9aad
|
Provenance
The following attestation bundles were made for project_brain-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on 9-Trinkets/projectbrain-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
project_brain-0.1.2-py3-none-any.whl -
Subject digest:
9956a2e5e3dbc19f76f9f57809022b14dae8db3ba410f60e747f540d231cbfa4 - Sigstore transparency entry: 1173087737
- Sigstore integration time:
-
Permalink:
9-Trinkets/projectbrain-cli@e06d2c1d24c342b674f37434f7f5e08d35f36e1f -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/9-Trinkets
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e06d2c1d24c342b674f37434f7f5e08d35f36e1f -
Trigger Event:
release
-
Statement type: