npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@blankeos/modelcli

v0.0.2

Published

Call any LLM from the command line via models.dev

Readme

███╗░░░███╗░█████╗░██████╗░███████╗██╗░░░░░░█████╗░██╗░░░░░██╗
████╗░████║██╔══██╗██╔══██╗██╔════╝██║░░░░░██╔══██╗██║░░░░░██║
██╔████╔██║██║░░██║██║░░██║█████╗░░██║░░░░░██║░░╚═╝██║░░░░░██║
██║╚██╔╝██║██║░░██║██║░░██║██╔══╝░░██║░░░░░██║░░██╗██║░░░░░██║
██║░╚═╝░██║╚█████╔╝██████╔╝███████╗███████╗╚█████╔╝███████╗██║
╚═╝░░░░░╚═╝░╚════╝░╚═════╝░╚══════╝╚══════╝░╚════╝░╚══════╝╚═╝

modelcli

Call any LLM from the command line via models.dev.

Install

npm install -g @blankeos/modelcli # npm
bun install -g @blankeos/modelcli # or bun
cargo install --path . # or cargo

Quick Start

# 1. Connect to a provider (Any known provider thanks to models.dev)
modelcli connect

# 2. Browse models and set a default
modelcli models

# 3. Send a prompt
modelcli "What is the meaning of life?"

Usage

modelcli [OPTIONS] [PROMPT]

Commands

| Command | Description | | --------- | ----------------------------------- | | connect | Connect to a provider (add API key) | | models | Browse and manage models |

Options

| Flag | Description | | ----------------------------- | ---------------------------------------------- | | --model <provider/model-id> | Model to use (overrides default) | | --stream | Stream tokens as they arrive | | --thinking | Show thinking/reasoning tokens | | --reasoning-effort <level> | Reasoning effort: low, medium, or high | | --format json | Output raw JSON instead of human-readable text |

Examples

# Use a specific model
modelcli --model openai/gpt-4o "Explain quicksort"

# Stream the response
modelcli --stream "Write a haiku about Rust"

# Enable reasoning
modelcli --thinking --reasoning-effort high "Prove that √2 is irrational"

# JSON output
modelcli --format json "Hello"

Custom Providers

You can add any OpenAI-compatible provider not listed on models.dev.

1. Add a credential:

modelcli connect
# Select "Other (custom provider)" → enter a provider ID and API key

2. Configure the provider in ~/.config/modelcli.jsonc:

{
  "provider": {
    "myprovider": {
      "name": "My AI Provider",
      "baseURL": "https://api.myprovider.com/v1",
      "models": {
        "my-model": {
          "name": "My Model", // optional display name
          "reasoning": false, // optional, default false
          "context": 200000, // optional context window
          "output": 65536, // optional max output tokens
        },
      },
    },
  },
}

Then use it like any other model:

modelcli --model myprovider/my-model "Hello!"

The config file is auto-created the first time you add a custom provider. Both .jsonc and .json are supported, but not both at the same time.

Data Storage

  • Credentials and app data: ~/.local/share/modelcli/
  • Custom provider config: ~/.config/modelcli.jsonc

Motivation

modelcli enables piping LLM calls directly from your terminal—perfect for generating commit messages in lazygit (see PR #5389), or powering any other CLI app with AI capabilities. Quickly ask questions or pipe stdout from other tools to get instant AI-powered responses.

Inspired by OpenCode's seamless multi-provider experience and built on models.dev's unified LLM API.

🦀 Made w/ Rust. A fast, minimal but intuitive CLI made with Rust.