Skip to main content

httpie for embeddings. Embed anything from the command line.

Project description

vemb

httpie for embeddings. Embed text, images, audio, video, and PDFs from the command line.

vemb demo

pipx install vemb
export GEMINI_API_KEY=your_key
vemb text "hello world"

Powered by Gemini Embedding 2, the first natively multimodal embedding model. One model, one vector space for everything.

Install

pipx install vemb
# or
pip install vemb

Get a free API key at https://aistudio.google.com/apikey

export GEMINI_API_KEY=your_key

Commands

vemb text "hello world"                    # embed text
vemb embed photo.jpg                       # embed any file (auto-detects type)
vemb embed *.jpg --jsonl                   # batch embed, one JSON per line
vemb image photo.jpg                       # embed image (PNG, JPEG)
vemb audio clip.mp3                        # embed audio (MP3, WAV)
vemb video clip.mp4                        # embed video (MP4, MOV)
vemb pdf doc.pdf                           # embed PDF
vemb similar photo1.jpg photo2.jpg         # cosine similarity between two files
vemb search ./photos "sunset at beach"     # search a directory

Pipe from stdin:

echo "hello world" | vemb text -
cat document.txt | vemb text -

Output

Default output is JSON:

{
  "model": "gemini-embedding-2-preview",
  "dimensions": 768,
  "values": [0.012, -0.034, ...]
}

Options:

vemb text "hello" --compact                # just the vector array
vemb text "hello" --numpy                  # numpy format
vemb text "hello" --dim 768                # set dimensions (128-3072)
vemb text "hello" --task RETRIEVAL_QUERY   # set task type

Batch mode outputs JSONL (one embedding per line):

vemb embed *.jpg --jsonl > embeddings.jsonl

Search

Search indexes a directory and finds files similar to your query:

vemb search ./photos "sunset at beach" --top 5

Embeddings are cached in .vemb/cache.json inside the searched directory. Unchanged files won't be re-embedded on subsequent searches.

Supported formats

Type Formats
Text any string, stdin
Image PNG, JPEG
Audio MP3, WAV (up to 80s)
Video MP4, MOV (up to 128s)
PDF up to 6 pages

License

MIT

Project details


Download files

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

Source Distribution

vemb-0.3.0.tar.gz (600.8 kB view details)

Uploaded Source

Built Distribution

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

vemb-0.3.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file vemb-0.3.0.tar.gz.

File metadata

  • Download URL: vemb-0.3.0.tar.gz
  • Upload date:
  • Size: 600.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vemb-0.3.0.tar.gz
Algorithm Hash digest
SHA256 aede506af5c3bb881e8f4882ce472febda25f6a3b5d3d50729d93a73a80350d3
MD5 f582afaae326efb3a2b1dd22ac13e8a9
BLAKE2b-256 e405168d660efbd04de161a6bd9cc1660d02f6ccdd7eebd3a0d0a61907c931bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for vemb-0.3.0.tar.gz:

Publisher: publish.yml on yuvrajangadsingh/vemb

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

File details

Details for the file vemb-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: vemb-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vemb-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 85c2aad6da4bd99c94b268ddb1ec491bf22c381fd47e2850cb454805f79ac35b
MD5 2ef12ee68ecd5b8a2ddf2d3f9abe7661
BLAKE2b-256 6f7a6f5da33ad0ea3ef2ffc460db60d376609809e53932132eeef58f4541245d

See more details on using hashes here.

Provenance

The following attestation bundles were made for vemb-0.3.0-py3-none-any.whl:

Publisher: publish.yml on yuvrajangadsingh/vemb

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page