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.

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.2.0.tar.gz (6.2 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.2.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for vemb-0.2.0.tar.gz
Algorithm Hash digest
SHA256 236b783b4a4b40b63e820a71beb9b8798769b08feedba8c9b33a5f0e8cee37bd
MD5 e030e568951207a22111c307cd2e5bd2
BLAKE2b-256 52136bc0fd1d694020274b764f67e321689154b3690a1acba23fa43a6fc0d922

See more details on using hashes here.

Provenance

The following attestation bundles were made for vemb-0.2.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.2.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for vemb-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eeb40494cff076bbbca7c7b1cc6a74246443c6c87afafd8ab62594da1bedbd4c
MD5 bd2f8156f6426d525a3bb2f6ae790093
BLAKE2b-256 06531da474629cfb7c1daa6d7748591dc0b35079fa7259769bd2b7a095f26977

See more details on using hashes here.

Provenance

The following attestation bundles were made for vemb-0.2.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