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 embx-cli

For local development from source:

pip install -e ".[dev]"

Quick start

# One-command guided flow: connect, pick model, run embedding
embx quickstart

# One-command non-interactive flow
embx quickstart "semantic retrieval" --provider openrouter --connect --api-key "$EMBX_OPENROUTER_API_KEY" --non-interactive --format json

# 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

# Configure HuggingFace and default to local cached model discovery
embx connect --provider huggingface --api-key "$EMBX_HUGGINGFACE_API_KEY" --model-source local --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
embx models --provider huggingface --source all

# 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, roadmap, and release workflow.

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.2.tar.gz (28.0 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.2-py3-none-any.whl (42.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: embx_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 28.0 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.2.tar.gz
Algorithm Hash digest
SHA256 1e28674d76c68dd0469ea14b262061a53f89b0d1bfb52f2a96e9cb2ed6c8d48f
MD5 8954958e8dcab2bb367e4750d77799e3
BLAKE2b-256 41d8a11d3ca1f6598f1232cc89f61bfae748e60e6ea31c2c983cf28258013f72

See more details on using hashes here.

Provenance

The following attestation bundles were made for embx_cli-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: embx_cli-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 42.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f7919b04951cf975940c86b010492c470e421f1259baacc1cd87e9337cac0ace
MD5 01f6f4ee8545b70714b05eec78ab36d5
BLAKE2b-256 7da2eed218a45b9a9a305094a6846796348d40681b0e52dbd8d64b063da925c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for embx_cli-0.1.2-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