Skip to main content

Multi-provider embeddings CLI

Project description

embx

embx is a multi-provider embeddings CLI for quick experimentation and automation.

Why this exists

  • Use one command surface across OpenAI, OpenRouter, Voyage, and Ollama.
  • Keep output script-friendly (json, jsonl) but readable by default.
  • Add cache and config layering so provider switching is painless.

Install

pip install -e .

Quick start

# Show providers
embx providers

# Interactive setup flow
embx connect

# Configure multiple providers in one run and test connectivity
embx connect --all --test

# Test one provider in non-interactive mode
embx connect --provider openrouter --api-key "$EMBX_OPENROUTER_API_KEY" --non-interactive --test

# Configure HuggingFace provider
embx connect --provider huggingface --api-key "$EMBX_HUGGINGFACE_API_KEY" --non-interactive

# List available embedding models
embx models --provider openrouter
embx models --provider openrouter --format json

# HuggingFace model discovery (remote/local/all)
embx models --provider huggingface --source remote --search mini --limit 10
embx models --provider huggingface --source local

# Select one model id for shell pipelines
embx models --provider openrouter --pick 1
embx models --provider openrouter --choose

# Interactive model browsing
embx models --interactive

# Interactive config editing
embx config set
embx config set --key default_provider --value huggingface --non-interactive

# Check provider configuration and readiness
embx doctor
embx doctor --only-configured --check-network
embx doctor --only-configured --check-auth

# Optional: initialize config manually
embx config init

# Embed a single text (argument)
embx embed "vector databases are useful"

# Embed from stdin
printf "semantic search" | embx embed --format json

# Embed as CSV
embx embed "semantic search" --format csv

# Batch embed line-delimited file
embx batch inputs.txt --format jsonl --output outputs.jsonl

# Compare providers for the same input
embx compare "semantic retrieval" --providers openai,openrouter,voyage,ollama

# Compare in machine-readable mode
embx compare "semantic retrieval" --format json --output compare.json

# Rank providers by latency or cost
embx compare "semantic retrieval" --providers openai,voyage --rank-by latency

# Rank providers by embedding agreement quality
embx compare "semantic retrieval" --providers openai,voyage,ollama --rank-by quality

# Emit CSV for spreadsheets or BI tools
embx compare "semantic retrieval" --providers openai,voyage --format csv
embx batch inputs.txt --format csv --output embeddings.csv

# Skip providers without configured credentials
embx compare "semantic retrieval" --providers openai,voyage,ollama --only-configured

# Show top 2 ranked providers and hide failed rows
embx compare "semantic retrieval" --rank-by quality --top 2 --hide-errors

# Markdown table output
embx compare "semantic retrieval" --format md

# Retries with backoff for transient provider failures
embx embed "semantic retrieval" --provider openrouter --retries 2 --retry-backoff 0.2

# HuggingFace embeddings inference
embx embed "semantic retrieval" --provider huggingface --model sentence-transformers/all-MiniLM-L6-v2

Config precedence

  1. CLI flags
  2. Environment variables (EMBX_*)
  3. Config file (~/.config/embx/config.json)
  4. Built-in defaults

Shell completions

Typer provides completion out of the box:

embx --install-completion
embx --show-completion

Current status

  • Core command scaffolding is implemented.
  • Provider integrations are intentionally minimal and extensible.
  • compare command is available for side-by-side provider checks.
  • Docs in docs/ explain architecture and roadmap.

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

embx_cli-0.1.0.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

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

embx_cli-0.1.0-py3-none-any.whl (38.3 kB view details)

Uploaded Python 3

File details

Details for the file embx_cli-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for embx_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 230d1ce2f3645bee92f58d187a0126f53a2453ae7447e188ffc6428caa993cff
MD5 3a0ab26e52c955a012d6270d32064dee
BLAKE2b-256 f4dc316f72123f5616ddee1ceac83a2a3e2eab74e51e17f60683a9f3fbc51901

See more details on using hashes here.

Provenance

The following attestation bundles were made for embx_cli-0.1.0.tar.gz:

Publisher: publish.yml on vicmcorrea/embx

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

File details

Details for the file embx_cli-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for embx_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49fc651a1078e419efedf826b979ed66cf59f4d17575effe6fb25a0367df48b5
MD5 713a6a285714f763045470f625379ea5
BLAKE2b-256 3bac31a5de6011a6df05c6e8aa56829d97e778d85bd8669da5eddda63de30831

See more details on using hashes here.

Provenance

The following attestation bundles were made for embx_cli-0.1.0-py3-none-any.whl:

Publisher: publish.yml on vicmcorrea/embx

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