Basic Memory
Reference

Configuration

Complete configuration reference for Basic Memory including all settings, environment variables, and configuration priority.

Basic Memory can be configured through ~/.basic-memory/config.json or environment variables. Environment variables take precedence over config file settings.


Configuration File

Location: ~/.basic-memory/config.json

Example configuration:

{
  "default_project": "main",
  "default_project_mode": true,
  "log_level": "INFO",
  "sync_delay": 1000,
  "kebab_filenames": false,
  "disable_permalinks": false,
  "sync_changes": true
}

Project Settings

projects

Mapping of project names to filesystem paths.

PropertyValue
TypeDictionary
Default{"main": "~/basic-memory"}
Example{"work": "~/work-notes", "personal": "~/personal-notes"}

default_project

Name of the default project used when no project is specified.

PropertyValue
TypeString
Default"main"

default_project_mode

Automatic project selection for single-project users. When enabled, AI assistants automatically use the default project without asking.

PropertyValue
TypeBoolean
Defaultfalse
Environment VariableBASIC_MEMORY_DEFAULT_PROJECT_MODE

Behavior:

  • When true, tools automatically use your default project
  • You can still override by explicitly passing a different project
  • Best for users who primarily work in one project

project_root

Constrain all projects under a root directory.

PropertyValue
TypeString (optional)
Defaultnull (projects can be created anywhere)
Environment VariableBASIC_MEMORY_PROJECT_ROOT

When set, all project paths must be within this directory.


Sync Settings

sync_changes

Enable or disable real-time synchronization.

PropertyValue
TypeBoolean
Defaulttrue
Environment VariableBASIC_MEMORY_SYNC_CHANGES

When false, changes are not automatically synced to the database.

sync_delay

Milliseconds to wait after changes before syncing. Prevents excessive sync operations during rapid edits.

PropertyValue
TypeInteger
Default1000 (1 second)
Environment VariableBASIC_MEMORY_SYNC_DELAY

sync_thread_pool_size

Thread pool size for file I/O operations. Higher values may improve performance with many files.

PropertyValue
TypeInteger
Default4
Environment VariableBASIC_MEMORY_SYNC_THREAD_POOL_SIZE

skip_initialization_sync

Skip expensive initialization sync. Useful for cloud/stateless deployments.

PropertyValue
TypeBoolean
Defaultfalse
Environment VariableBASIC_MEMORY_SKIP_INITIALIZATION_SYNC

watch_project_reload_interval

Seconds between reloading project list. Used in watch service to detect new projects.

PropertyValue
TypeInteger
Default30
Environment VariableBASIC_MEMORY_WATCH_PROJECT_RELOAD_INTERVAL

File Management

kebab_filenames

Filename format for generated files.

PropertyValue
TypeBoolean
Defaultfalse
Environment VariableBASIC_MEMORY_KEBAB_FILENAMES
  • false: Preserves spaces and special characters (e.g., My Important Note.md)
  • true: Converts to kebab-case (e.g., my-important-note.md)

Update permalinks when files are moved.

PropertyValue
TypeBoolean
Defaultfalse
Environment VariableBASIC_MEMORY_UPDATE_PERMALINKS_ON_MOVE

When true, permalinks are updated to reflect new file location. When false, permalinks remain stable identifiers.

Disable automatic permalink generation.

PropertyValue
TypeBoolean
Defaultfalse
Environment VariableBASIC_MEMORY_DISABLE_PERMALINKS

When true, new notes won't have permalinks added. Existing permalinks still work for reading.


Logging

log_level

Logging verbosity level.

PropertyValue
TypeString
Default"INFO"
Options"DEBUG", "INFO", "WARNING", "ERROR"
Environment VariableBASIC_MEMORY_LOG_LEVEL

Console Logging

Enable logging to console (environment variable only).

PropertyValue
Environment VariableBASIC_MEMORY_CONSOLE_LOGGING
Valuestrue, false, 1, 0, yes, no
Defaultfalse (logs to file only)

Log file location: ~/.basic-memory/basic-memory-{process}.log


Environment Variables

All configuration can be overridden with environment variables using the BASIC_MEMORY_ prefix:

# Set default project mode
export BASIC_MEMORY_DEFAULT_PROJECT_MODE=true

# Change log level
export BASIC_MEMORY_LOG_LEVEL=DEBUG

# Enable console logging
export BASIC_MEMORY_CONSOLE_LOGGING=true

# Set custom sync delay
export BASIC_MEMORY_SYNC_DELAY=2000

Special Environment Variables

VariableDescriptionDefault
BASIC_MEMORY_HOMEOverride default project location~/basic-memory
BASIC_MEMORY_PROJECT_ROOTConstrain project paths(none)
BASIC_MEMORY_CLOUD_MODEEnable cloud modefalse
BASIC_MEMORY_MCP_PROJECTLock MCP server to specific project(none)

Configuration Priority

Settings are applied in this order (highest to lowest priority):

mermaid
Rendering diagram...

Example:

# Config file has: "log_level": "INFO"
# Environment has: BASIC_MEMORY_LOG_LEVEL=DEBUG
# Result: DEBUG is used (environment wins)

Cloud Configuration

When using Basic Memory Cloud, additional configuration is stored in ~/.basic-memory/basic-memory-cloud.json:

{
  "access_token": "...",
  "refresh_token": "...",
  "tenant_id": "...",
  "expires_at": "..."
}

This file is managed automatically by bm cloud login and bm cloud logout.

Cloud-Specific Settings

VariableDescription
BASIC_MEMORY_CLOUD_MODEForce cloud mode on/off
BASIC_MEMORY_CLOUD_URLOverride cloud API URL (for development)

Editing Configuration

Via Config File

# Edit configuration
vim ~/.basic-memory/config.json

# Restart MCP server for changes to take effect
# (Claude Desktop, VS Code, etc.)

Via CLI

# Set default project
basic-memory project default work

# View all projects
basic-memory project list

# Check current configuration
cat ~/.basic-memory/config.json

Via Environment

# Temporary (current session)
export BASIC_MEMORY_LOG_LEVEL=DEBUG
basic-memory status

# Permanent (add to ~/.bashrc or ~/.zshrc)
echo 'export BASIC_MEMORY_DEFAULT_PROJECT_MODE=true' >> ~/.bashrc
After changing configuration, restart your MCP client (Claude Desktop, VS Code, etc.) for changes to take effect.

Ignore Patterns

Basic Memory respects ignore patterns to skip sensitive files during indexing.

Pattern Sources

  1. Global patterns: ~/.basic-memory/.bmignore (applied to all projects)
  2. Project patterns: {project}/.gitignore (applied to specific project)

Example .bmignore

# Sensitive files
.env
.env.*
*.key
credentials.json

# Build artifacts
node_modules/
__pycache__/
dist/
build/

# OS files
.DS_Store
Thumbs.db

# Database files
*.db
*.db-wal
*.db-shm

Benefits

  • Security: Prevents indexing sensitive files like .env or API keys
  • Performance: Skips unnecessary files like node_modules/ or build outputs
  • Cleaner knowledge base: Ignores OS and editor files

Files matching these patterns are automatically skipped during index sync and never indexed in your knowledge base.


Complete Settings Reference

SettingTypeDefaultEnvironment Variable
default_projectString"main"-
default_project_modeBooleanfalseBASIC_MEMORY_DEFAULT_PROJECT_MODE
project_rootStringnullBASIC_MEMORY_PROJECT_ROOT
sync_changesBooleantrueBASIC_MEMORY_SYNC_CHANGES
sync_delayInteger1000BASIC_MEMORY_SYNC_DELAY
sync_thread_pool_sizeInteger4BASIC_MEMORY_SYNC_THREAD_POOL_SIZE
skip_initialization_syncBooleanfalseBASIC_MEMORY_SKIP_INITIALIZATION_SYNC
watch_project_reload_intervalInteger30BASIC_MEMORY_WATCH_PROJECT_RELOAD_INTERVAL
kebab_filenamesBooleanfalseBASIC_MEMORY_KEBAB_FILENAMES
update_permalinks_on_moveBooleanfalseBASIC_MEMORY_UPDATE_PERMALINKS_ON_MOVE
disable_permalinksBooleanfalseBASIC_MEMORY_DISABLE_PERMALINKS
log_levelString"INFO"BASIC_MEMORY_LOG_LEVEL

Next Steps

CLI Reference

Command line tools for managing configuration.

Troubleshooting

Common configuration issues and solutions.

Getting Started

Initial setup and project configuration.