Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CLI Usage

The csm binary provides command-line access to the memory system.

Installation

cargo install chaotic_semantic_memory --features cli

Commands

inject

Inject a new concept:

# Random vector
csm inject my-concept --database memory.db

# Vector from file
csm inject my-concept --from-file vector.bin --database memory.db

# Vector from stdin
echo "vector data" | csm inject my-concept --vector-source stdin --database memory.db

# With metadata
csm inject my-concept --metadata '{"key":"value"}' --database memory.db

probe

Find similar concepts:

# By concept ID
csm probe my-concept -k 10 --database memory.db

# Output as JSON
csm probe my-concept -k 10 --output-format json --database memory.db

associate

Create associations:

csm associate source target --strength 0.8 --database memory.db

export

Export memory state:

# JSON format
csm export --output backup.json --database memory.db

# Binary format (smaller)
csm export --output backup.bin --format binary --database memory.db

import

Import memory state:

# Replace existing
csm import backup.json --database memory.db

# Merge with existing
csm import backup.json --merge --database memory.db

completions

Generate shell completions:

# Bash
csm completions bash > ~/.local/share/bash-completion/completions/csm

# Zsh
csm completions zsh > ~/.zsh/completions/_csm

# Fish
csm completions fish > ~/.config/fish/completions/csm.fish

# PowerShell
csm completions powershell > $HOME\.config\powershell\completions\csm.ps1

Output Formats

FormatFlagDescription
Table--output-format tableHuman-readable table (default)
JSON--output-format jsonMachine-parseable JSON

Exit Codes

CodeMeaning
0Success
1Configuration error
2Database error
3Input error
4Output error
5Validation error
6Memory error
7I/O error
255Unknown error