CLI Reference
The synapses CLI is a single binary for project setup, indexing, daemon management, configuration, and diagnostics.
synapses <command> [flags]Commands
synapses init
Set up a project: index the codebase, start the daemon, connect AI agents. This is the main entry point for new projects.
synapses init [--path <dir>] [--yes] [--agents <list>] [--no-agents]| Flag | Description |
|---|---|
--path <dir> | Project directory (default: current directory) |
--yes / -y | Accept all defaults non-interactively |
--agents <list> | Comma-separated agents: claude,cursor,windsurf,zed,antigravity |
--no-agents | Skip agent connection step |
synapses start
Start MCP server for a project. This is called by AI agents (via their MCP config), not directly by users.
synapses start [--path <dir>]| Flag | Description |
|---|---|
--path <dir> | Project directory (default: current directory) |
Internally, this starts the daemon if needed, registers the project, and bridges stdio to the daemon’s per-project Unix socket.
synapses stop
Stop the daemon.
synapses stopNo flags. Sends SIGTERM to the daemon process and waits for graceful shutdown.
synapses status
Full health check showing the state of every component, or list all indexed projects.
synapses status [--path <dir>] [--all]| Flag | Description |
|---|---|
--path <dir> | Project directory (default: current directory) |
--all | List all indexed projects with file/node/edge counts |
Default output shows: App, CLI Binary, CLI in PATH, Global Config, Graph Index, Daemon, Brain, Doc Cache, Pulse.
synapses index
Build the code graph or reset cached indexes.
synapses index [--path <dir>] [--reindex] [--reset] [--all]| Flag | Description |
|---|---|
--path <dir> | Project directory (default: current directory) |
--reindex | Force full re-index even if cache is fresh |
--reset | Remove cached index for this project |
--all | With --reset: remove ALL project indexes |
synapses config
Read or write configuration. Supports both global defaults (~/.synapses/config.json) and per-project overrides (synapses.json).
synapses config [--show] [--global] [--path <dir>] [key] [value]| Flag | Description |
|---|---|
--show | Show full merged config with source annotations |
--show <key> | Show a single key’s value and where it comes from |
--global | Target the global config (~/.synapses/config.json) |
--path <dir> | Project directory (default: current directory) |
<key> <value> | Set a config value (e.g., brain.enabled true) |
Examples:
synapses config --show # Full merged configsynapses config --show brain.enabled # Single key with sourcesynapses config --global brain.enabled true # Set global defaultsynapses config brain.enabled false # Set project overrideMerge order: built-in defaults → ~/.synapses/config.json → <project>/synapses.json. Project always wins.
See Configuration Reference for all available config keys.
synapses connect
Write MCP configuration for an AI agent so it can use Synapses.
synapses connect [--agent <name>] [--path <dir>]| Flag | Description |
|---|---|
--agent <name> | Agent: claude, cursor, windsurf, zed, antigravity |
--path <dir> | Project directory (default: current directory) |
synapses update
Self-update the Synapses binary or rollback to the previous version.
synapses update [--check] [--rollback]| Flag | Description |
|---|---|
--check | Check for updates only, don’t download |
--rollback | Restore the previous binary version from backup |
If running from the desktop app, updates are handled automatically by the app.
synapses remove
Remove Synapses from a project. The inverse of init. Cleans agent configs, project config, and cached index. Source code is never modified.
synapses remove [--path <dir>] [--yes] [--keep-data]| Flag | Description |
|---|---|
--path <dir> | Project directory (default: current directory) |
--yes / -y | Non-interactive, skip confirmation prompt |
--keep-data | Preserve cached index (only remove agent configs) |
synapses uninstall
Remove Synapses from the entire system. Stops daemon, removes services, deletes ~/.synapses, removes the binary.
synapses uninstall [--yes] [--keep-data] [--keep-binary]| Flag | Description |
|---|---|
--yes / -y | Non-interactive, skip confirmation |
--keep-data | Preserve cached indexes |
--keep-binary | Preserve the binary (allows reinstall via synapses init) |
synapses version
Print the version.
synapses versionsynapses completion
Generate shell completion scripts.
synapses completion <bash|zsh|fish>Setup:
# Basheval "$(synapses completion bash)"
# Zsheval "$(synapses completion zsh)"
# Fishsynapses completion fish > ~/.config/fish/completions/synapses.fishSubcommands
synapses dev
Developer tools for swapping the CLI binary (useful when building from source).
synapses dev <link|unlink|status>| Subcommand | Description |
|---|---|
link <path> | Use a custom binary (e.g., ./build/synapses) |
unlink | Restore the app-bundled binary |
status | Show which binary is active |
State is stored in ~/.synapses/dev_link.json. When linked, the desktop app won’t overwrite your custom binary on updates.
synapses daemon
Low-level daemon control. Most users never need these — the daemon is auto-managed by synapses start.
synapses daemon <serve|install|uninstall|logs>| Subcommand | Description |
|---|---|
serve | Run the daemon in foreground (used by launchd/systemd) |
install | Register as login service (auto-start on boot) |
uninstall | Remove login service registration |
logs | Tail daemon log |