Skip to main content

Synapse

Fast, local, zero-cost structural context engine for AI coding agents.

CI Status Version Python Version License


⚡ 5-Second Quickstart

Install Synapse and automatically configure your IDE (Cursor, Claude Code, Cline, Windsurf):

pip install synap-git
synap install

Done. Synapse indexes your repository with Tree-sitter, installs zero-daemon Git hooks for automatic reindexing, and registers MCP server endpoints.


Why Synapse?

Feature Synapse Repomix Aider Cursor / Cline Default
API Cost 100% Free (Zero) 100% Free Burns Tokens Cloud Token Usage
Graph Intelligence AST Symbol & Edge Graph None (Flat Dump) Repo Map (CTags) Vector Embeddings
Code Skeletonization 85% Token Reduction None (Raw Code) Line Truncation Chunk Slicing
Git Blast Radius Instant Callers & Tests None Diff Only None
Architectural Hubs Personalized PageRank None Static Frequency None
Working Memory Persistent Checkpoints None Ephemeral Chat Ephemeral Session
Runtime Footprint Zero-Daemon Hook Mode CLI Only CLI Process Background Indexer

Architecture

flowchart TD
    A[AI Coding Agent / IDE<br>Cursor · Claude Code · Cline · Aider] -->|MCP stdio / CLI| B[Synapse Engine]
    B --> C[AST Skeletonizer<br>85% Token Reduction]
    B --> D[Git State & Blast Radius<br>Diff Line -> Callers -> Tests]
    B --> E[Graph Engine & PageRank<br>Architectural Hubs]
    B --> F[Working Memory & Lessons<br>Checkpoints & Anti-Regressions]
    C & D & E & F --> G[(Local SQLite WAL DB<br>.synap/synap.db)]

For database schemas and CTE traversal queries, see Architecture Internals.


Essential CLI Commands

# Print token-bounded startup context (< 750 tokens)
synap context

# Check modified symbols, direct callers, and impacted tests
synap blast

# Run only tests impacted by dirty git blast radius
synap test

# Deep structural symbol inspection (callers, dependencies, tests)
synap explain my_function

# Export token-budgeted prompt pack with AST skeletons (< 8k tokens)
synap pack

# Inspect structural AST skeleton of any file (strips bodies, keeps types/docstrings)
synap skeleton src/my_module.py

# Discover top architectural hubs via PageRank
synap hubs

# Search repository with hybrid structural ranking
synap search "authentication flow"

# Verify environment and system health
synap doctor

Shorthand aliases supported: synap ctx, synap blast, synap t, synap ex <sym>, synap sk <file>, synap hubs, synap doc.


MCP Tools for AI Agents

When registered via synap install, AI agents gain direct access to these MCP tools:

MCP Tool Purpose
get_session_preamble() Token-optimized session startup context (< 750 tokens: active branch, dirty files, blast radius, hubs, lessons).
get_skeleton(file_path) Extracts function signatures, types, and docstrings without function bodies (85% token savings).
get_blast_radius() Computes impact radius of uncommitted git changes down to callers and test files.
get_callers(symbol) Finds all functions and modules that call or depend upon a symbol.
get_callees(symbol) Finds all functions and symbols called by a given symbol.
read_symbol(symbol) Reads exact lines and code of a specific function or class without reading the entire file.
get_diff() Unified git diff of uncommitted or staged changes.
get_test_recommendations() Discovers impacted test suites and provides recommended pytest commands.
create_checkpoint(doing) Saves thought process and dirty working state before complex refactors.
restore_checkpoint(id) Restores past checkpoint context after agent context compaction or memory wipes.
remember(key, content) Stores operational observations and environment facts in persistent memory.

License

MIT © Saahil Pal

Metadata

Release files for synap-git 2.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for synap-git 2.6.0
File Size Uploaded Provenance Actions
synap_git-2.6.0.tar.gz 134.1 kB With provenance Details for synap_git-2.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for synap-git 2.6.0
File Interpreter ABI Platform Actions
synap_git-2.6.0-py3-none-any.whl Python 3 none any Details for synap_git-2.6.0-py3-none-any.whl

Total release size: 272.2 kB

Release files / synap_git-2.6.0.tar.gz

Download URL synap_git-2.6.0.tar.gz
Size 134.1 kB
Tags Source
SHA-256 checksum
How to use checksums
250d244ab6f322062c0e3f88b71f6881ae5ff5cb7a0bf337a0380ba782ce117c
BLAKE2b-256 checksum
How to use checksums
0a35f00c61bdd3c95268551b79921c1f737284fc77054c9fa9eea40ac38f654f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / synap_git-2.6.0-py3-none-any.whl

Download URL synap_git-2.6.0-py3-none-any.whl
Size 138.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43594b0ed998fcb6db310920950b489f1d354fff078e188dfda90f2adcf2d059
BLAKE2b-256 checksum
How to use checksums
81cfc266a6b078ff632e99b0dc3b43106af473df4b1f8f996279f4c2ccf9b392
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Security for synap-git 2.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for synap_git-2.6.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page