Skip to main content

Spine

Turn any repository into a queryable Program Knowledge Graph — symbols, calls, imports, database schema, and documentation, as universal facts that carry provenance back to the line they came from.

Extraction is deterministic and model-free. The same commit in always yields the same facts out, so the output is diffable, cacheable, and safe to gate CI on.

pip install spine-pkg
spine extract .

Commands

spine extract [path] Scan a repo, print a summary. --query <symbol> shows callers and blast radius; --json dumps facts.
spine verify [path] Check graph invariants — dangling edges, unresolvable provenance, unjoined imports. Exits non-zero on error, so it can stand guard in CI.
spine export [path] Export the whole graph as sqlite, graphml, dot, or json. Writes spine-facts.<ext> unless you pass --out. Never truncated.
spine docs [path] -d FILE Reconcile documentation claims against the code graph and report drift.
spine languages Show which language front-ends are active in this install.
spine media extract PATHS OCR images and transcribe audio/video into reviewable artifacts. Opt-in; see below.

Languages

Python works out of the box with no extra dependencies. Every other front-end lazy-imports its parser, so the base install stays small and you pay only for what you use:

pip install 'spine-pkg[java]'        # or typescript, csharp, c, cpp, go, sql
pip install 'spine-pkg[all]'         # every front-end at once

If a language's extra isn't installed, its files are invisible to the graph rather than an error — so spine extract counts them and tells you what to install:

Scanned . — 0 grounded nodes, 0 external, 0 edges.

  ! 103 Go file(s) found but NOT extracted — install the front-end:  pip install 'spine-pkg[go]'

spine languages shows the same thing ahead of time. Both warnings go to stderr, so extract --json and export stay pipe-safe.

Documents and media

Markdown, reStructuredText, plain text, and HTML parse with the standard library. PDF needs [docs]; Word and Excel need [office].

spine media extract is deliberately separate from the graph build. It MAY run a model and be slow, so it is explicit and opt-in: it creates a .spine-media directory on first run, writes reviewable artifacts there for you to commit, and the deterministic extractor only ever reads those. Image OCR ([media], plus a system tesseract binary) and --asr local ([asr]) run entirely on your machine. --asr api uploads audio and video off-machine and refuses to run without an explicit --allow-remote.

Caching

Facts are cached per commit under ~/.cache/spine/, and the cache is trusted only on a clean working tree — a dirty tree always re-extracts, because a stale graph is worse than a slow one.

Design notes

  • The graph is the source of truth. Consumers render facts; they never re-derive them from paths or filenames. A new fact means extending facts.py and the front-ends, not the renderer.
  • Bounded output is honest output. Aggregations cap their results and record what was elided. Exports are the exception — they are always complete, because the point of handing the graph to another tool is that its filtering is better than ours.
  • Local paths only. spine scans a checkout on disk and never clones for you.
  • Calls resolve where the source states a type. A method called on a variable binds when that variable has a parameter or assignment annotation, or comes from a constructor for a class in the same module. A union of two real types, a rebound variable, or a with target resolves to nothing — a fabricated edge is worse than a missing one. Annotating a local is what makes its calls visible, which is a good reason to annotate it.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spine_pkg-0.2.0.tar.gz (159.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spine_pkg-0.2.0-py3-none-any.whl (130.1 kB view details)

Uploaded Python 3

File details

Details for the file spine_pkg-0.2.0.tar.gz.

File metadata

  • Download URL: spine_pkg-0.2.0.tar.gz
  • Upload date:
  • Size: 159.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for spine_pkg-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c0487dfb5537892653617c1b79087ee04d3c1d0572a269070c1a5d9a54f1095e
MD5 4ba7d88c67810c3042b0e8f2438c4cfb
BLAKE2b-256 043de6b635e9d020e9e8750e7794daaf30e518af88c417aeff9361da38ab8659

See more details on using hashes here.

Provenance

The following attestation bundles were made for spine_pkg-0.2.0.tar.gz:

Publisher: release.yml on synaptixs/spine-pkg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spine_pkg-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: spine_pkg-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 130.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for spine_pkg-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7df0da328283a1c3eaea8e77e6ab5d3797e31c5515a81c10e884c57cc49b05c5
MD5 55a07fb868f5a885617d9c70f1bd0c4c
BLAKE2b-256 7343be4002510f52c15cf53d356de5b5ed0820cc871f9d964dd80c82faa52320

See more details on using hashes here.

Provenance

The following attestation bundles were made for spine_pkg-0.2.0-py3-none-any.whl:

Publisher: release.yml on synaptixs/spine-pkg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.3.0

2 files

This release

0.2.0 This release

2 files

0.1.0

2 files

0.0.1

2 files

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