Complete guide for using Synapsis command-line interface.
# Clone and build
git clone https://github.com/methodwhite/synapsis.git
cd synapsis
cargo build --release
# Optional: Install to local bin
cargo install --path .
# Or manually copy binary
cp target/release/synapsis ~/.local/bin/# Clone repository
git clone https://github.com/methodwhite/synapsis.git
cd synapsis
# Build release
cargo build --release
# Binary location
.\target\release\synapsis-mcp.exe# Local MCP server (for IDE integration)
./target/release/synapsis-mcp# Start TCP server on port 7438
./target/release/synapsis --tcp 7438
# Start with secure mode (PQC authentication)
./target/release/synapsis --tcp 7438 --secure
# Custom bind address
./target/release/synapsis --tcp 7438 --addr 0.0.0.0# Connect to TCP server
./target/release/synapsis-mcp --tcp-addr localhost:7438
# Connect with secure mode
./target/release/synapsis-mcp --tcp-addr localhost:7438 --secure| Command | Description | Example |
|---|---|---|
--tcp <port> |
Start TCP server | synapsis --tcp 7438 |
--secure |
Enable PQC security | synapsis --tcp 7438 --secure |
--addr <ip> |
Bind address | synapsis --tcp 7438 --addr 0.0.0.0 |
--help |
Show help | synapsis --help |
--version |
Show version | synapsis --version |
| Command | Description | Example |
|---|---|---|
--tcp-addr <addr> |
Connect to TCP server | synapsis-mcp --tcp-addr localhost:7438 |
--secure |
Use PQC secure connection | synapsis-mcp --tcp-addr :7438 --secure |
--help |
Show help | synapsis-mcp --help |
| Variable | Description | Default |
|---|---|---|
SYNAPSIS_DATA_DIR |
Data directory | ~/.local/share/synapsis |
SYNAPSIS_LOG_LEVEL |
Log level (debug, info, warn, error) | info |
SYNAPSIS_TCP_PORT |
Default TCP port | 7438 |
SYNAPSIS_SECURE_MODE |
Enable secure mode | false |
XDG_DATA_HOME |
XDG data directory | ~/.local/share |
~/.local/share/synapsis/
├── synapsis.db # SQLite database
├── synapsis.db-shm # SQLite shared memory
├── synapsis.db-wal # SQLite write-ahead log
├── sessions.json # Active sessions
├── skills.json # Agent skills
├── resource_limits.json # Resource management
├── vault/ # Encrypted vault
│ └── ...
└── logs/ # Application logs
└── synapsis.log
Create ~/.local/share/synapsis/resource_limits.json:
{
"global": {
"max_total_tasks": 20,
"max_cpu_percent": 70.0,
"max_memory_percent": 80.0,
"high_load_threshold": 3.5,
"enable_adaptive_throttling": true
},
"agent_limits": {
"opencode": {
"max_concurrent_tasks": 3,
"max_cpu_percent": 50.0,
"max_memory_mb": 2048,
"priority": 8
},
"qwen": {
"max_concurrent_tasks": 2,
"max_cpu_percent": 40.0,
"max_memory_mb": 1536,
"priority": 9
},
"claude": {
"max_concurrent_tasks": 2,
"max_cpu_percent": 40.0,
"max_memory_mb": 1536,
"priority": 9
}
}
}# Start MCP server locally
./target/release/synapsis-mcpTerminal 1 - Start Server:
./target/release/synapsis --tcp 7438Terminal 2 - Agent 1 (Qwen):
./target/release/synapsis-mcp --tcp-addr localhost:7438Terminal 3 - Agent 2 (OpenCode):
./target/release/synapsis-mcp --tcp-addr localhost:7438Terminal 1 - Start Secure Server:
./target/release/synapsis --tcp 7438 --secureTerminal 2 - Secure Agent:
./target/release/synapsis-mcp --tcp-addr localhost:7438 --secure{
"method": "mem_save",
"params": {
"arguments": {
"title": "Security Vulnerability Found",
"content": "SQL injection vulnerability in user login endpoint",
"project": "web-audit",
"observation_type": 1
}
}
}{
"method": "mem_search",
"params": {
"arguments": {
"query": "SQL injection",
"project": "web-audit",
"limit": 10
}
}
}{
"method": "mem_context",
"params": {
"arguments": {
"query": "authentication bypass",
"limit": 5
}
}
}{
"method": "task_create",
"params": {
"arguments": {
"title": "Review authentication module",
"description": "Check for vulnerabilities in auth flow"
}
}
}{
"method": "task_claim",
"params": {
"arguments": {
"session_id": "qwen-abc123-1234567890"
}
}
}{
"method": "mem_lock_acquire",
"params": {
"arguments": {
"resource": "database-migration",
"timeout": 300
}
}
}{
"method": "mem_lock_release",
"params": {
"arguments": {
"resource": "database-migration"
}
}
}{
"method": "web_research",
"params": {
"arguments": {
"query": "CVE-2026 latest vulnerabilities"
}
}
}{
"method": "cve_search",
"params": {
"arguments": {
"cve_id": "CVE-2026-12345"
}
}
}{
"method": "security_classify",
"params": {
"arguments": {
"text": "Buffer overflow in parse_header function",
"context": "security"
}
}
}cargo test# Database tests
cargo test --test synapsis_database_tests
# PQC tests
cargo test --test synapsis_pqc_integration
# Stress tests
cargo test --test stress_tests
# MCP integration tests
cargo test --test mcp_integration_tests# Install tarpaulin
cargo install cargo-tarpaulin
# Run coverage
cargo tarpaulin --out Html# Kill process on port 7438
lsof -ti:7438 | xargs kill -9
# Or use different port
synapsis --tcp 7439# Remove SQLite WAL files
rm ~/.local/share/synapsis/synapsis.db-*
# Restart server# Rebuild with security feature
cargo build --release --features security
# Check dependencies
cargo audit# Check resource limits
cat ~/.local/share/synapsis/resource_limits.json
# Enable adaptive throttling
# Edit resource_limits.json and set:
# "enable_adaptive_throttling": true# Via MCP tool
{
"method": "mem_stats",
"params": {}
}{
"method": "mem_timeline",
"params": {
"arguments": {
"limit": 20
}
}
}{
"method": "agent_heartbeat",
"params": {
"arguments": {
"session_id": "qwen-abc123-1234567890",
"status": "busy",
"task": "code-review"
}
}
}-
Always use secure mode in production:
synapsis --tcp 7438 --secure
-
Restrict bind address for local-only:
synapsis --tcp 7438 --addr 127.0.0.1
-
Set strong SQLCipher key:
export SYNAPSIS_DB_KEY="your-strong-password-here"
-
Regular security audits:
cargo audit cargo clippy --features security -- -D warnings
Last Updated: 2026-03-26 Version: 0.1.0