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

heyllm

v0.1.0

Published

Talk to an LLM from your terminal. A tiny, dependency-light CLI for any OpenAI-compatible API.

Readme

heyllm

Talk to an LLM from your terminal. heyllm is a tiny, dependency-light CLI that streams answers from any OpenAI-compatible Chat Completions API straight to stdout — built for daily use and pipelines.

$ heyllm "explain monads simply"
A monad is a way to wrap a value along with a recipe for chaining...

It reads piped input as context, so it slots naturally into shell workflows:

$ git diff | heyllm "write a conventional commit message"
feat(parser): handle SSE frames split across network chunks

Install

npm install -g heyllm
# or
pnpm add -g heyllm

Requires Node.js ≥ 18 (it uses the built-in global fetch).

Setup

Set your API key once:

export OPENAI_API_KEY="sk-..."

If no key is found (and --api-key isn't passed), heyllm prints a clear error to stderr and exits with code 2.

Usage

heyllm [options] "your prompt"
command | heyllm [options] "instruction"

Options
  -m, --model <name>     Model to use (default: gpt-4o-mini)
      --system <text>    System prompt
      --base-url <url>   API base URL (default: https://api.openai.com/v1)
      --api-key <key>    API key (defaults to $OPENAI_API_KEY)
      --no-stream        Wait for the full response instead of streaming
      --json             Print the raw JSON response
  -h, --help             Show help
  -v, --version          Show version

Examples

# Stream an answer
heyllm "explain monads simply"

# Pipe context in; the prompt is the instruction, stdin is the context
git diff | heyllm "write a conventional commit message"

# Pick a model and add a system prompt
heyllm -m gpt-4o --system "You are terse" "summarize REST in 3 bullets"

# Get the raw API response for scripting
heyllm --json "ping" | jq '.usage'

# Disable streaming (single request, full response at once)
heyllm --no-stream "what is 2+2"

OpenAI-compatible endpoints

heyllm speaks the OpenAI Chat Completions wire format, so --base-url lets it talk to anything that implements it:

# OpenRouter
heyllm --base-url https://openrouter.ai/api/v1 \
    --api-key "$OPENROUTER_API_KEY" \
    -m openai/gpt-4o-mini "hi"

# Local Ollama
heyllm --base-url http://localhost:11434/v1 -m llama3 "hi"

Streaming is parsed from server-sent events (data: lines, ignoring [DONE]), and tokens are printed as they arrive.

Honestly

This is a deliberately tiny alternative to bigger tools like llm or vendor CLIs. No plugins, no config files, no chat history — just one command that pipes well. If you want a small, auditable binary that does the obvious thing, that's the whole pitch.

Development

pnpm install
pnpm run typecheck   # tsc --noEmit
pnpm run test        # vitest run (no network — fetch is mocked)
pnpm run build       # tsup -> dist/

The network call is isolated in src/request.ts; the message builder, SSE parser, and arg parser in src/index.ts are pure and unit-tested.

License

MIT © 2026 Abdulmunim Jemal