Developer Setup
For contributors building Synapses from source.
Prerequisites
- Go 1.22+
- Git
- (Optional) The Synapses desktop app installed
Build from Source
git clone https://github.com/SynapsesOS/synapsescd synapsesgo build -o ./build/synapses ./cmd/synapsesThe binary at ./build/synapses is fully functional as a standalone CLI.
Connect to Desktop App
If you have the Synapses app installed and want it to use your custom binary:
# Point CLI to your custom binarysynapses dev link ./build/synapses
# Check which binary is activesynapses dev status
# Restore the app-bundled binarysynapses dev unlinkWhen dev-linked:
- The app won’t overwrite your custom binary on updates
- The app UI shows “Using custom binary” warning
synapses dev statusshows the linked source path
Running Tests
# All testsgo test ./...
# With race detectiongo test -race ./...
# Specific packagego test ./internal/config/Project Structure
synapses/ cmd/synapses/ CLI entry point and commands internal/ config/ Config loading and validation graph/ Code graph types and operations parser/ Language parsers (49+ languages) store/ SQLite index storage server/ MCP server implementation brain/ Ollama-powered AI enrichmentRebuilding After Changes
go build -o ./build/synapses ./cmd/synapses# If dev-linked, the app picks up changes immediately