Skip to main content

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.

PyPI version Python 3.10+ License: MIT

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

Canonical path: the guided installer installs the CLI + server, configures a provider, and offers to wire your AI coding assistant(s) — Claude Code, Codex, OpenCode, Antigravity, skill-runtime — all in one run:

curl -sSL https://raw.githubusercontent.com/bxw91/brainpalace/main/scripts/setup.sh | bash

Just this package, via pip:

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-ctl is still available but deprecated. Please use brainpalace for 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_URL is 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 (or BRAINPALACE_URL / DOC_SERVE_URL env 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

Release Information

Related Packages

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

brainpalace_cli-26.8.2.tar.gz (525.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

brainpalace_cli-26.8.2-py3-none-any.whl (663.4 kB view details)

Uploaded Python 3

File details

Details for the file brainpalace_cli-26.8.2.tar.gz.

File metadata

  • Download URL: brainpalace_cli-26.8.2.tar.gz
  • Upload date:
  • Size: 525.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for brainpalace_cli-26.8.2.tar.gz
Algorithm Hash digest
SHA256 61b6076dcaa45aabbc54da68fb03385040d1b375f3137a1da0c3576db353ebbe
MD5 14d70460da4062c30fa3a08862fb9227
BLAKE2b-256 b0e2e9317c127e55763a2fd56265af49df3277842404914d868c4826eaca33bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for brainpalace_cli-26.8.2.tar.gz:

Publisher: publish-to-pypi.yml on bxw91/brainpalace

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file brainpalace_cli-26.8.2-py3-none-any.whl.

File metadata

File hashes

Hashes for brainpalace_cli-26.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 37fd1aa88805436f849ea77fa167ca23e23d30c006fd46f1ab3f198f31158988
MD5 e4482e643b09704c45b26192cd98928e
BLAKE2b-256 38e337087dc1cb6bf5e04ee98c6449cc605c2c665b9af45f411e9265896a1bfd

See more details on using hashes here.

Provenance

The following attestation bundles were made for brainpalace_cli-26.8.2-py3-none-any.whl:

Publisher: publish-to-pypi.yml on bxw91/brainpalace

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

26.8.2 This release

2 files

26.8.1

2 files

26.7.13

2 files

26.7.12

2 files

26.7.11

2 files

26.7.10

2 files

26.7.9

2 files

26.7.8

2 files

26.7.7

2 files

26.7.6

2 files

26.7.5

2 files

26.7.4

2 files

26.7.3

2 files

26.7.2

2 files

26.7.1

2 files

26.6.54

2 files

26.6.53

2 files

26.6.52

2 files

26.6.51

2 files

26.6.50

2 files

26.6.49

2 files

26.6.48

2 files

26.6.47

2 files

26.6.46

2 files

26.6.45

2 files

26.6.44

2 files

26.6.43

2 files

26.6.42

2 files

26.6.41

2 files

26.6.40

2 files

26.6.39

2 files

26.6.38

2 files

26.6.37

2 files

26.6.36

2 files

26.6.35

2 files

26.6.34

2 files

26.6.33

2 files

26.6.32

2 files

26.6.31

2 files

26.6.30

2 files

26.6.29

2 files

26.6.28

2 files

26.6.27

2 files

26.6.26

2 files

26.6.25

2 files

26.6.24

2 files

26.6.23

2 files

26.6.22

2 files

26.6.21

2 files

26.6.19

2 files

26.6.18

2 files

26.6.17

2 files

26.6.16

2 files

26.6.15

2 files

26.6.14

2 files

26.6.13

2 files

26.6.12

2 files

26.6.11

2 files

26.6.10

2 files

26.6.9

2 files

26.6.8

2 files

26.6.7

2 files

26.6.6

2 files

26.6.5

2 files

26.6.4

2 files

26.6.3

2 files

26.6.2

2 files

26.6.1

2 files

26.5.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page