BrainPalace CLI - Command-line interface for managing AI agent memory and knowledge retrieval
Project description
BrainPalace CLI
Command-line interface for managing AI agent memory and knowledge retrieval with the BrainPalace RAG server.
BrainPalace (formerly doc-serve) is an intelligent document indexing and semantic search system designed to give AI agents long-term memory. This CLI provides a convenient way to manage your BrainPalace server and knowledge base.
Why BrainPalace?
AI agents need persistent memory to be truly useful. BrainPalace provides the retrieval infrastructure that enables context-aware, knowledge-grounded AI interactions.
Search Capabilities
| Search Type | Description | Best For |
|---|---|---|
| Semantic Search | Natural language queries using OpenAI embeddings | Conceptual questions, related content |
| Keyword Search (BM25) | Traditional keyword matching with TF-IDF ranking | Exact matches, technical terms |
| Hybrid Search | Combines vector + BM25 approaches | General-purpose queries |
| GraphRAG | Knowledge graph retrieval | Understanding relationships |
Installation
pip install brainpalace-cli
Quick Start
brainpalace init # Initialize project
brainpalace start # Start server
brainpalace index ./docs # Index documents
brainpalace query "search term"
Note: The legacy command
doc-svr-ctlis still available but deprecated. Please usebrainpalacefor new installations.
Development Installation
cd brainpalace-cli
poetry install
Usage
# Check server status
brainpalace status
# Search documents
brainpalace query "how to use python"
# Index documents from a folder
brainpalace index ./docs
# Reset/clear the index
brainpalace reset --yes
Configuration
Set the server URL via environment variable:
export BRAINPALACE_URL=http://localhost:8000
Or use the --url flag:
brainpalace --url http://localhost:8000 status
Note: The legacy environment variable
DOC_SERVE_URLis still supported for backwards compatibility.
Commands
Server Management
| Command | Description |
|---|---|
init |
Initialize project for BrainPalace (creates .claude/brainpalace/) |
start |
Start the BrainPalace server for current project |
stop |
Stop the running server |
list |
List all running BrainPalace instances |
status |
Check server health and indexing status |
Data Management
| Command | Description |
|---|---|
query |
Search indexed documents |
index |
Start indexing documents from a folder |
reset |
Clear all indexed documents |
Options
All commands support:
--url- Server URL (orBRAINPALACE_URL/DOC_SERVE_URLenv var)--json- Output as JSON for scripting
Example Workflow
# 1. Initialize a new project
cd my-project
brainpalace init
# 2. Start the server
brainpalace start
# 3. Index your documentation
brainpalace index ./docs ./src
# 4. Query your knowledge base
brainpalace query "How does authentication work?"
# 5. Stop when done
brainpalace stop
Documentation
- User Guide - Getting started and usage
- Developer Guide - Contributing and development
- API Reference - Full API documentation
Release Information
- Current Version: See pyproject.toml
- Release Notes: GitHub Releases
- Changelog: Latest Release
Related Packages
- brainpalace-rag - The RAG server that powers BrainPalace
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 brainpalace_cli-26.5.1.tar.gz.
File metadata
- Download URL: brainpalace_cli-26.5.1.tar.gz
- Upload date:
- Size: 82.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7ce32b46325a4c20ecbf4e1e1d6245ceef5bac6c7c4b4ed7cf07d76855c7709
|
|
| MD5 |
1e0da27a942241e0a4b8add3f73e186b
|
|
| BLAKE2b-256 |
9c623cf4d20d58196a40071c4a1bc9f6bbdd1ff8aa16b6ab915d097d5ab59587
|
Provenance
The following attestation bundles were made for brainpalace_cli-26.5.1.tar.gz:
Publisher:
publish-to-pypi.yml on bxw91/brainpalace
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
brainpalace_cli-26.5.1.tar.gz -
Subject digest:
d7ce32b46325a4c20ecbf4e1e1d6245ceef5bac6c7c4b4ed7cf07d76855c7709 - Sigstore transparency entry: 1674655083
- Sigstore integration time:
-
Permalink:
bxw91/brainpalace@bca83d1ceb48ae97f962e626d0d213b269bc326f -
Branch / Tag:
refs/tags/v26.5.1 - Owner: https://github.com/bxw91
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@bca83d1ceb48ae97f962e626d0d213b269bc326f -
Trigger Event:
release
-
Statement type:
File details
Details for the file brainpalace_cli-26.5.1-py3-none-any.whl.
File metadata
- Download URL: brainpalace_cli-26.5.1-py3-none-any.whl
- Upload date:
- Size: 113.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 |
230d632f66988bea5cd2a9de0360786b4978ec43653b42f024889204853f220d
|
|
| MD5 |
99ee239e51d484dcf30181b6581794e0
|
|
| BLAKE2b-256 |
e47465fc94da1cd10dc6824fe5dba7ae744c49a1fa14b52b775e54a03244e650
|
Provenance
The following attestation bundles were made for brainpalace_cli-26.5.1-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on bxw91/brainpalace
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
brainpalace_cli-26.5.1-py3-none-any.whl -
Subject digest:
230d632f66988bea5cd2a9de0360786b4978ec43653b42f024889204853f220d - Sigstore transparency entry: 1674655122
- Sigstore integration time:
-
Permalink:
bxw91/brainpalace@bca83d1ceb48ae97f962e626d0d213b269bc326f -
Branch / Tag:
refs/tags/v26.5.1 - Owner: https://github.com/bxw91
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@bca83d1ceb48ae97f962e626d0d213b269bc326f -
Trigger Event:
release
-
Statement type: