Synapse CLI
The synapse CLI (synapse-client package) provides command-line management for Synapse instances.
Installation
# From the monorepo
pnpm exec nx run synapse-client:build
# Or install globally
npm install -g @atlascrew/synapse-clientGlobal Options
| Option | Description |
|---|---|
--url <url> | Synapse admin API URL (default: http://localhost:6191) |
--json | Output as JSON |
--debug | Enable debug logging |
--timeout <ms> | Request timeout in milliseconds (default: 30000) |
Environment Variables
| Variable | Description |
|---|---|
SYNAPSE_URL | Default URL for the Synapse admin API |
SYNAPSE_JSON | Enable JSON output mode |
SYNAPSE_DEBUG | Enable debug logging |
SYNAPSE_TIMEOUT | Default request timeout (ms) |
Health & Status
synapse health
Check if the Synapse instance is reachable and healthy.
synapse health --url http://localhost:6191synapse status
Get detailed runtime status.
synapse statusStatus: healthy
Uptime: 3h 42m
Workers: 4
Rules: 237
Entities: 1,523
Requests: 458,201synapse metrics
Fetch Prometheus metrics.
synapse metrics --jsonEntity Management
synapse entities
List tracked entities with risk scores.
synapse entitiessynapse blocks
List currently blocked entities.
synapse blockssynapse release <ip>
Release a blocked IP or fingerprint.
synapse release 192.168.1.100synapse release-all
Release all blocked entities.
synapse release-allDestructive action
release-all removes all blocks immediately. Use with caution in production.
Configuration
synapse config
Get the current runtime configuration.
synapse config --jsonsynapse config-set <key> <value>
Update a runtime configuration value.
synapse config-set detection.action log
synapse config-set rate_limit.rps 5000WAF Rules
synapse rules
List loaded WAF rules.
synapse rulessynapse rule-add
Add a custom WAF rule.
synapse rule-add --name "custom-sqli" \
--pattern "WAITFOR\s+DELAY" \
--score 80 \
--category sqlisynapse rule-remove <id>
Remove a rule by ID.
synapse rule-remove 200200synapse rules-clear
Remove all custom rules (built-in rules are not affected).
synapse rules-clearsynapse reload
Trigger a configuration hot-reload.
synapse reloadsynapse evaluate
Test a request against the rule engine without sending real traffic.
synapse evaluate --path "/api/users?id=1' OR '1'='1" --method GETRisk Score: 85
Matched Rules: 200200
Action: block
Detection Time: 25 μsActor Tracking
synapse actors
List tracked actors.
synapse actorssynapse actor-stats
Actor statistics summary.
synapse actor-statssynapse actor-fingerprint <id>
Get fingerprint details for a specific actor.
synapse actor-fingerprint actor-abc123Usage Patterns
Monitor mode (log without blocking)
synapse config-set detection.action log
synapse reloadEmergency block
synapse release-all # Clear existing blocks
synapse config-set rate_limit.rps 100 # Aggressive rate limit
synapse reloadExport metrics to a file
synapse metrics --json > metrics-$(date +%Y%m%d).json