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

calcis

v1.0.4

Published

Estimate LLM API costs from the command line

Downloads

667

Readme

calcis

Estimate LLM API costs from the command line.

Live pricing for 25+ models, side-by-side comparisons, and a web estimator: https://calcis.dev

  • Full price index: https://calcis.dev/models
  • Compare models: https://calcis.dev/compare
  • API reference: https://calcis.dev/api-docs

Install

npm install -g calcis

Setup

Get your API key at calcis.dev/dashboard, then:

# Quickest: one command writes it to ~/.calcisrc
calcis config set-key calc_your_key_here

# Or write the file yourself
echo '{"apiKey":"calc_your_key_here"}' > ~/.calcisrc

# Or use an environment variable
export CALCIS_API_KEY=calc_your_key_here

Usage

# Estimate cost of a prompt file
calcis estimate prompt.txt --model claude-sonnet-4-6

# Estimate inline text
calcis estimate "Explain how transformers work" --model gpt-5-4

# Pipe from stdin
cat system-prompt.md | calcis estimate --stdin --model gpt-4o

# Compare two models
calcis compare claude-sonnet-4-6 gpt-4o --tokens 1000

# List all models and pricing
calcis models

# JSON output
calcis estimate prompt.txt --model gpt-5-4 --json

Commands

calcis estimate

Estimate the cost of a prompt against a specific model. The positional argument can be a file path (read as UTF-8) or literal text. Use --stdin to pipe prompts from another command.

Requires an API key (Pro tier or above). Get one at calcis.dev/dashboard.

calcis estimate <file-or-text> --model <id> [--effort <level>] [--key <api-key>] [--json]
calcis estimate --stdin --model <id>

Output:

[calcis] estimate · claude-sonnet-4-6

Input tokens     243
Output tokens    ~650 (predicted)
Input cost       $0.000729
Output cost      $0.009750
Total cost       $0.010479
At 1k req/mo     $10.48
Confidence       high

calcis models

Print every supported model with current pricing. Data ships with the package: no network call, no API key required. Browse the same dataset on the web at calcis.dev/models.

calcis models

calcis compare

Side-by-side per-request and at-scale cost comparison between two models. Uses the bundled pricing dataset: no API key required. For an interactive, multi-model version see calcis.dev/compare.

calcis compare <model-a> <model-b> --tokens <input> [--output <output>]

--output defaults to 500 if omitted.

calcis config set-key

Persist an API key to ~/.calcisrc (mode 0600) so subsequent runs don't need --key or CALCIS_API_KEY.

calcis config set-key <your-api-key>

Running an auth-required command without a configured key prints a welcome message that links back to calcis.dev/dashboard rather than a terse error.

API key resolution

In order:

  1. --key <value> CLI flag
  2. CALCIS_API_KEY environment variable
  3. ~/.calcisrc JSON file: { "apiKey": "calc_..." }

Links

License

MIT