CLI Commands
SYNAPSEED provides a CLI for standalone analysis and MCP server operation.
Global Options
synapseed [OPTIONS] <COMMAND>
Options:
-p, --project <PATH> Project root directory [default: .]
-h, --help Print help
-V, --version Print versionCommands
hoist
Index a project and display its code graph skeleton.
synapseed hoist --project /path/to/projectOutput: JSON with files_indexed and symbols_indexed counts.
lookup <NAME>
Look up a symbol by name across the indexed project.
synapseed lookup --project . MyStructOutput: JSON array of matching symbols with file path, line numbers, kind, and signature.
scan
Scan content for sensitive data (DLP check).
# From argument
synapseed scan --text "api_key=sk-live-abc123"
# From stdin
echo "secret_token=ghp_xxxx" | synapseed scanOutput: CLEAN or ALERT with redacted content.
check <COMMAND>
Evaluate a shell command against the security sentinel.
synapseed check "cargo test"
# ALLOWED (Safe): cargo test
synapseed check "rm -rf /"
# DENIED: Matches destructive patterndiagnose
Run full system diagnostic.
synapseed diagnose --project .Output: Project state, DNA configuration, git status, and metrics.
history
Show git history summary and recent commits.
synapseed history --project . --limit 10Options:
--limit, -l <N>— Number of recent commits (default: 10)
blame <FILE>
Show blame information for a file region.
synapseed blame --project . src/main.rs --start 1 --end 20Options:
--start, -s <LINE>— Start line (default: 1)--end, -e <LINE>— End line (default: 20)
status
Show runtime metrics and system status.
synapseed status --project .Initializes core plugins and displays all metrics.
init
Initialize all plugins and broadcast SystemInit event.
synapseed init --project .Useful for testing plugin initialization and event flow.
serve
Start MCP server (JSON-RPC 2.0 over stdio).
synapseed serve --project .This is the primary mode for LLM integration. All output goes to stderr; stdout is reserved for JSON-RPC.
Environment Variables
| Variable | Description |
|---|---|
RUST_LOG | Log level (default: info) |
SYNAPSEED_SELF_TELEMETRY | Set to 1 for self-instrumentation |
ask <QUERY>
Ask a natural-language question — SYNAPSEED orchestrates all subsystems (compiler, search, history, security, architecture) and returns enriched context.
synapseed ask "why is the login broken?"
# With Direct Symbol Injection (source code in prompt)
synapseed ask --raw "explain the router module"Options:
--raw— Inject the exact source code of discovered symbols into the prompt
Aliases: ask_synapseed, whisper
search <QUERY>
Search for code by concept using the Tantivy keyword index.
synapseed search "authentication flow" --limit 10Options:
--limit, -l <N>— Maximum results (default: 5)
similar <QUERY>
Find code similar to a query using vector embeddings (cosine similarity).
synapseed similar "error handling" --top-k 5 --min-similarity 0.4Options:
--top-k, -k <N>— Number of results (default: 5)--min-similarity, -m <FLOAT>— Minimum cosine similarity (default: 0.3)
architect
Analyze project structural health: score, coupling, cycles, violations.
synapseed architect --refreshOptions:
--refresh— Force fresh analysis (skip cache)
consult <QUERY>
Consult the project's architecture policy (DNA config).
synapseed consult "what libraries should I use for HTTP?"janitor
Run the Janitor: scan for clippy warnings and unused dependencies.
synapseed janitorverify <PATH>
Verify whether a file path exists in the project. Prevents LLM hallucination.
synapseed verify src/main.rs
# { "exists": true, "size_bytes": 1234, "language": "Rust", "is_file": true }
synapseed verify nonexistent.rs
# { "exists": false }Path traversal attempts (e.g., ../../../etc/passwd) are blocked.
train <SOURCE>
Evaluate Rust code in the Gym sandbox.
synapseed train src/lib.rs --tests tests/eval.rs --fuzz --adversarialOptions:
--tests, -t <FILE>— Test file path--timeout <SECS>— Timeout (default: 60)--fuzz— Enable proptest fuzzing--adversarial— Enable mutation testing