Skip to main content

Fuzzy search LLM models from models.dev

Project description

llms

Fuzzy search LLM models from models.dev in your terminal.

日本語版 README はこちら

Demo

$ llms
Model> claude-sonnet-4.6

  anthropic/claude-sonnet-4-6          | Claude Sonnet 4.6
  opencode/claude-sonnet-4-6           |
  venice/claude-sonnet-4-6             | Provider:    Anthropic
  ...                                  | Model ID:    anthropic/claude-sonnet-4-6
                                       | Cost:        $3.00 / $15.00
                                       | Context:     200K

Copied: anthropic/claude-sonnet-4-6

Installation

Prerequisites

  • Python 3.13+
  • fzf (for interactive mode)

Install

# uv (recommended)
uv tool install -e .

# pipx
pipx install -e .

# pip
pip install -e .

Or run ./install.sh to auto-detect the best available installer.

Install from GitHub (without cloning)

uv tool install git+https://github.com/atsuya.sakata/llm-models.git
pipx install git+https://github.com/atsuya.sakata/llm-models.git

This makes the llms command available globally.

Usage

Interactive Mode (fzf)

llms                  # Fuzzy search → Enter to copy model ID to clipboard
llms --refresh        # Force refresh cache
llms --no-copy        # Print model ID to stdout (for piping)
llms --json           # Output selected model details as JSON
llms -p anthropic     # Filter by provider

Key Bindings

Key Action
Type Fuzzy search
Up/Down Navigate models
Enter Copy model ID to clipboard
Ctrl-C Exit

Programmatic Mode (for AI agents & scripts)

Non-interactive subcommands that output structured data — no fzf required.

# Get a model by ID
llms get anthropic/claude-sonnet-4-6 --json

# List models with filters
llms list --json
llms list --cap tool_call --min-context 128k --sort cost.input --limit 5 --json
llms list --cap reasoning --max-input-cost 5.0 --json

# Text search
llms search claude --json --limit 5
llms search llama -p meta --json

# List providers
llms providers --json

Filter Flags (for list and search)

Flag Description Example
-p, --provider Filter by provider -p anthropic
--cap Capability filter (repeatable) --cap tool_call --cap reasoning
--min-context Minimum context window --min-context 128k
--max-input-cost Max input cost ($/1M tokens) --max-input-cost 3.0
--sort Sort by field --sort cost.input
--limit Max number of results --limit 10

Output Formats

Flag Format
--json Pretty-printed JSON
--jsonl One JSON object per line
(none) One model ID per line

Python Library

from llms.client import Client
from llms.query import Query

client = Client()

# Get by ID
model = client.get("anthropic/claude-sonnet-4-6")

# List with filters
models = client.list(Query(
    caps=["tool_call"],
    min_context=128_000,
    sort="cost.input",
    limit=5,
))

# Text search
results = client.search("claude")

# Providers
providers = client.providers()

Data Source

Model data is fetched from the models.dev /api.json endpoint. Responses are cached locally for 1 hour at ~/Library/Caches/llms/.

Development

uv sync
uv run pytest -v
uv run ruff check . && uv run ruff format --check .

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

llms_dev-0.1.0.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

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

llms_dev-0.1.0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llms_dev-0.1.0.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for llms_dev-0.1.0.tar.gz
Algorithm Hash digest
SHA256 aaf7c047260ed817243ba0d7cb6e3beef5590696dddd0526e20591e2260cd6b3
MD5 6d36b8b4a141a7628e9cd0631a013bc1
BLAKE2b-256 d8822ffc772292b571028783562c1807d6ca1ecce7db56c072fd3fe3ab802ff6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llms_dev-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for llms_dev-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8f662155e6745aaa3e96c0bc74aacf2a7fda2d04015a67e052ec990201d0b5ae
MD5 fd1f84ac801d32202e0384d70de39bfb
BLAKE2b-256 f7694243b3d5fe8b9f21c8f96e70cd854871413191c1a4f5e8ad3b71bfb33530

See more details on using hashes here.

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