Skip to main content

dirsql-plugin-embeddings

A first-party dirsql plugin for semantic search over files.

Installing the plugin loads the sqlite-vec extension (for vec_distance_cosine() and friends) and declares an embed() SQL scalar function that turns TEXT or BLOB values into embedding vectors:

uvx --with dirsql-plugin-embeddings dirsql "
  SELECT path
  FROM (SELECT path, embed(content ->> 'abstract') AS emb
        FROM 'arxiv-firehose/data/**/metadata.json')
  ORDER BY vec_distance_cosine(emb, embed('local private models'))
  LIMIT 10"

embed() is inert until a query calls it: no worker process is spawned and no model is loaded for queries that never use it. On the first call, dirsql spawns the plugin's worker process (dirsql-plugin-embeddings worker), which serves every call of the invocation over stdin/stdout.

Model

Embeddings come from model2vec (static embeddings — numpy + tokenizers, no torch), defaulting to minishlab/potion-retrieval-32M. The model downloads to the standard Hugging Face cache on the first ever run, with progress on stderr when stderr is a TTY.

An optional second argument overrides the model per call — the id must be model2vec-loadable (sentence-transformers/torch models are out of scope):

SELECT embed('some text', 'minishlab/potion-base-8M')

Vector cache

Computed vectors are cached at ~/.cache/dirsql/embeddings/ (or $XDG_CACHE_HOME/dirsql/embeddings/ when XDG_CACHE_HOME is set), keyed by the SHA-256 of the value bytes plus the model identifier — changing either recomputes; switching models never serves stale vectors. There is no eviction: the directory is safe to wipe at any time; the only cost is re-embedding. The cache never lives inside a queried tree — the worker receives values, not paths, and writes nothing anywhere else.

Metadata

Release files for dirsql-plugin-embeddings 0.1.12

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

Source distribution (sdist)

Source distribution for dirsql-plugin-embeddings 0.1.12
File Size Uploaded Provenance Actions
dirsql_plugin_embeddings-0.1.12.tar.gz 10.6 kB With provenance Details for dirsql_plugin_embeddings-0.1.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dirsql-plugin-embeddings 0.1.12
File Interpreter ABI Platform Actions
dirsql_plugin_embeddings-0.1.12-py3-none-any.whl Python 3 none any Details for dirsql_plugin_embeddings-0.1.12-py3-none-any.whl

Total release size: 20.4 kB

Release files / dirsql_plugin_embeddings-0.1.12.tar.gz

Download URL dirsql_plugin_embeddings-0.1.12.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ea83424a6ff614e82b4013ca61f0f4132d0947b19f25fe31ec6380a79d8d558c
BLAKE2b-256 checksum
How to use checksums
d4f2772327dd9c029349a2f1e1c2ec574d6326f094baa9426880281605fbb76a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 11, 2026.

Transparency log

Release files / dirsql_plugin_embeddings-0.1.12-py3-none-any.whl

Download URL dirsql_plugin_embeddings-0.1.12-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fba5a12f3f9b06e607d13600aa9470fb77143f4fbfc153958e611c17909590cb
BLAKE2b-256 checksum
How to use checksums
8329f2f499f9d762cc43b97464935f19676dfc581adc761487de5f13d341e60f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 11, 2026.

Transparency log

Security for dirsql-plugin-embeddings 0.1.12

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 dirsql_plugin_embeddings-0.1.12.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 Aug 11, 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