Synaptic documentation

Configuration

Source: GitHub Wiki · Published · Updated Edit this article

Synaptic is configured through three things: build-time feature flags, runtime environment variables, and on-disk config / output files. There is no dotenv loading; environment variables are read directly from the process environment.

Feature flags (build time)

The integration features below are off by default; enable them at build time (see Installation). The language extractors, cross-language, and cache-binary are on by default.

FeatureEnablesUsed by
pgPostgres schema introspectionsynaptic ingest pg
pushLive Neo4j/FalkorDB exportsynaptic export neo4j|falkordb --push
officeSpreadsheet ingestsynaptic ingest office
gwsGoogle-Workspace ingestsynaptic ingest gws
mediaAudio/video transcription and YouTube URL ingestsynaptic ingest media
live-explainLive database EXPLAIN for sequential-scan detectionsynaptic sql audit --explain

Two non-language features are on by default and can be turned off with --no-default-features (then re-list the lang-* features you want):

Feature (default on)Effect
cross-languagePost-extraction passes that infer cross-language edges (FFI, subprocess, HTTP/RPC, WebSocket, message queue, IPC/event bus, code->SQL).
cache-binaryStores the per-file AST cache as MessagePack instead of JSON — faster to decode and smaller, which helps most on column-heavy SQL schemas.

Language support is controlled by 38 lang-* features, all on by default. To compile a single language (used in CI), build with --no-default-features --features lang-<name>. See Languages and Development.

Environment variables

LLM backend selection (semantic pass)

The semantic pass auto-detects a backend by checking these in order: Gemini, Kimi, Anthropic, OpenAI, DeepSeek, Azure OpenAI, Bedrock, Ollama. Set SYNAPTIC_BACKEND to force one. See Semantic Analysis.

VariablePurpose
SYNAPTIC_BACKENDForce a specific backend (the only way to select claude-cli)
SYNAPTIC_LLM_TEMPERATURETemperature override; none/omit/default omits the parameter
OPENAI_API_KEY, OPENAI_MODEL, OPENAI_BASE_URLOpenAI-compatible backend
GEMINI_API_KEY / GOOGLE_API_KEY, GEMINI_MODELGemini
MOONSHOT_API_KEY, MOONSHOT_MODELKimi (Moonshot)
DEEPSEEK_API_KEY, DEEPSEEK_MODELDeepSeek
ANTHROPIC_API_KEY, ANTHROPIC_MODEL, ANTHROPIC_BASE_URLNative Anthropic
AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_DEPLOYMENT, AZURE_OPENAI_API_VERSIONAzure OpenAI
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, AWS_REGION / AWS_DEFAULT_REGION, BEDROCK_MODELAWS Bedrock
OLLAMA_BASE_URL, OLLAMA_API_KEY, OLLAMA_MODELOllama (local; presence opts in)
CLAUDE_CLI_MODELModel for the claude CLI backend

Server, ingestion, and database push

VariablePurpose
SYNAPTIC_API_KEYBearer token for the HTTP MCP server (fallback for --api-key)
SYNAPTIC_CONCISEToken-lean output: lower the default list/budget sizes so tool results return less to the model (same as serve --concise). An explicit per-call argument always wins. Truthy unless 0/false/no/off
SYNAPTIC_QUERY_LOGPath to write the server query log
SYNAPTIC_QUERY_LOG_DISABLEDisable the query log (1/true/yes)
SYNAPTIC_CHANGEDNewline-delimited changed-file list read by update (used by the git hook)
NEO4J_PASSWORD, FALKORDB_PASSWORDCredentials for export --push
SYNAPTIC_GWS_CMDGoogle-Workspace CLI name (default gws)
SYNAPTIC_TRANSCRIBE_CMDTranscription CLI (default whisper)
SYNAPTIC_WHISPER_MODELWhisper model (default base)

Other

VariablePurpose
HOME / USERPROFILELocate the global store ~/.synaptic (falls back to .synaptic in the working directory)
SYNAPTIC_STOREGraph backend: redb (the per-repo sharded store under synaptic-out/store/ — the value name is historical; shards are compressed flat containers), json, or unset = auto (prefer a store that is at least as fresh as graph.json). The store is written by default by extract/workspace build (--no-store opts out) and refreshed by update
SYNAPTIC_CROSS_REPOCross-repo bridge traversal on unscoped federated queries: unset = auto (follow bridge edges whenever the store has them), 0 = per-repo isolation, 1 = force on
SYNAPTIC_SHARD_LRUMax shards kept materialized in RAM by a federated serve (default 8); bounds the working set
SYNAPTIC_MAX_SHARD_MBByte cap (MiB) per store shard (default 2048; 0 disables). A DoS guard per repo, not an aggregate cap
SYNAPTIC_MAX_SHARD_NODESNode cap per store shard (default 5000000; 0 disables)
SYNAPTIC_MAX_GRAPH_MBByte cap (in MiB) on graph.json/export-surface.json files loaded by the merge driver, federation, the global store, and remote subgraph fetches. Default 50; 0 disables the cap. extract/update warn when they write a file over the cap
SYNAPTIC_MAX_NODESNode cap on loaded or merged graphs on the same paths. Default 100000; 0 disables the cap
SYNAPTIC_SKIP_HOOKSkip the installed git hook for one invocation (1)
SYNAPTIC_UPDATE_CHECKSet to 0 to force the opt-in background update notice off, regardless of config. See Updating
GITHUB_TOKENOptional. Raises the GitHub API rate limit for the self-update release lookup

Config and output files

PathRead/WrittenRole
.synapticignorereadExtra ignore rules, layered per directory; takes precedence over .gitignore on conflicts
.gitignorereadHonored during discovery
synaptic-workspace.tomlread/writtenWorkspace manifest ([workspace] members, [[repos]]); written by workspace init. See Workspaces and Federation
synaptic-out/writtenAll output: graph.json, GRAPH_REPORT.md, visualizations, exports, ingested/, surfaces/
synaptic-out/cache/ast/writtenPer-file AST cache, keyed by content; auto-invalidated when extractor logic or enabled languages change. Clear with synaptic cache clear
synaptic-out/cache/semantic/writtenSemantic-pass response cache
~/.synaptic/read/writtenGlobal cross-repo store (global-graph.json, global-manifest.json)
~/.synaptic/update.tomlread/writtenOpt-in self-update state: enabled (background notice) and last_check (24h throttle). Written by synaptic self-update --enable/--disable. See Updating
~/.synaptic/skills.tomlread/writtenRegistry of installed agent skills (repo, host, version, content hashes). Written by synaptic install/uninstall; read by self-update / install --refresh to re-render skills to the current version. See Assistant Integration
.claude/settings.jsonread/writtenPreToolUse hooks installed by synaptic install (Claude). See Assistant Integration
CLAUDE.md / AGENTS.md / GEMINI.md and per-platform skill fileswrittenAssistant instruction sections written by install
.codex/config.toml / .codex/hooks.json (+ ~/.codex/config.toml)read/writtenCodex MCP server + SessionStart hook from synaptic install codex (project, or global with --global). See Assistant Integration

Notes

  • A code-only extract never reads any of the LLM variables and never makes a network call. They matter only for extract --semantic and ingest.
  • The AST cache lives under synaptic-out/, so deleting that directory resets everything.