Getting Started¶
This guide walks you through installing and using Berry for the first time.
Prerequisites¶
Before installing Berry, ensure you have the following:
- Ollama - For running local embeddings (or an OpenAI API key)
For building from source:
- Rust 1.75+ (with cargo)
Installation¶
Installation Script (Recommended)¶
The easiest way to install Berry is via the install script:
This downloads pre-built binaries for your platform to ~/.local/bin.
From Source¶
For development or contributing, install from source:
# Install Rust if you don't have it
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Clone and build
git clone https://github.com/geoffjay/berry-rs.git
cd berry
cargo build --release
# The binaries are now in target/release/
# - target/release/berry
# - target/release/berry-server
# - target/release/berry-mcp
# Optionally install to ~/.cargo/bin
cargo install --path crates/cli
cargo install --path crates/server
cargo install --path crates/mcp
Ensure ~/.cargo/bin or ~/.local/bin is in your PATH:
Add this line to your shell profile (~/.bashrc, ~/.zshrc, etc.) to make it permanent.
Initialize Configuration¶
Berry uses a common configuration file for settings. The configuration file location is platform-specific:
| Platform | Configuration Path |
|---|---|
| Linux | ~/.config/berry/config.jsonc |
| macOS | ~/Library/Application Support/berry/config.jsonc |
| Windows | %APPDATA%\berry\config.jsonc |
Create the configuration file:
This creates the file in the platform dependent location with default settings. You can also create it manually:
mkdir -p ~/.config/berry
cat > ~/.config/berry/config.jsonc << 'EOF'
{
"store": "lance",
"server": {
"url": "http://localhost:4114",
"timeout": 5000
},
"defaults": {
"type": "information",
"createdBy": "user",
"visibility": "public"
},
"lance": {
"table": "berry_memories"
}
}
EOF
Starting the Services¶
Berry uses LanceDB by default, which is an embedded database — no additional services are needed. If you use Ollama for embeddings, ensure it is running:
If you opt to use ChromaDB instead, see ChromaDB setup.
Start the Berry server:
You should see:
Starting Berry server in background on port 4114...
Server started with PID 12345. Use `berry serve --foreground` to run in foreground.
Running in Foreground¶
To run the server in the foreground (useful for debugging):
Or run the server binary directly:
Basic Usage¶
Store a Memory¶
With type and tags:
Search Memories¶
Recall a Specific Memory¶
If you know the memory ID:
Remove a Memory¶
Verify Installation¶
Check that everything is working:
Expected health response:
Next Steps¶
- CLI Reference - Complete command reference
- Configuration - Customize Berry settings
- Development - Set up a development environment
Troubleshooting¶
Command not found: berry¶
Ensure your installation directory is in your PATH:
# For cargo install
export PATH="$HOME/.cargo/bin:$PATH"
# For install script
export PATH="$HOME/.local/bin:$PATH"
Add this line to your shell profile (~/.bashrc, ~/.zshrc, etc.) to make it permanent.
Server failed to start¶
If using the default LanceDB store, ensure the data directory is writable. Check the server logs for details.
If using ChromaDB, ensure it is running:
Connection refused¶
Check that the server URL in your configuration matches where the server is running:
The default configuration expects the server at http://localhost:4114.
ChromaDB connection issues (if using ChromaDB)¶
Verify ChromaDB is accessible:
If using a cloud ChromaDB instance, ensure you have set the environment variables: