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

@kyma-api/cli

v1.3.0

Published

Terminal interface for 21+ AI models. Chat, code, and manage your account.

Downloads

21

Readme

Kyma CLI

Ψ Terminal interface for 21+ AI models. One command to chat, code, and manage your account.

npm license node

Kyma is an LLM API gateway with 21+ open-source models (Qwen, DeepSeek, Llama, Gemma, Kimi, and more) at transparent pricing. This CLI brings it to your terminal—interactive chat, code agents with tool use, git diff review, and session persistence.

Quick Start

npm install -g @kyma-api/cli
kyma login
kyma "What is a Merkle tree?"

Login opens your browser. Create a free account, get $0.50 starting credits.

Examples

Interactive chat:

kyma
> Ask me anything...

One-shot prompt:

kyma "Optimize this SQL query for 100M rows"

Code agent with tools (read, edit, search, bash):

kyma code "Add error handling to auth.ts"

AI-powered git diff review:

kyma diff
kyma diff --staged
kyma diff main

Pipe files into the agent:

cat src/server.ts | kyma "Refactor this for readability"

Resume a conversation:

kyma history
kyma --continue

Modes

| Mode | Model | Cost | Best For | |------|-------|------|----------| | fast | Qwen 3-32B | ~$0.10/M | Quick answers, low latency | | cheap | Gemma 4 31B | ~$0.00/M | Free/near-free inference | | deep | Kimi K2.5 | ~$0.50/M | Complex reasoning, best quality | | auto | Kyma picks | varies | Default—best model for your task |

Set mode with -M or --mode:

kyma -M deep "Analyze this algorithm complexity"
kyma --mode cheap "Draft an email"

Or use a specific model:

kyma -m deepseek-r1 "Prove this theorem"
kyma -m gemini-3-flash "Extract data from HTML"

Commands

kyma [prompt]                 Chat (interactive or one-shot)
kyma code [task]              Code agent with tool use
kyma diff [target]            Review git changes with AI
kyma history                  List & manage past sessions
kyma models                   Browse available models
kyma balance                  Show credits and tier
kyma keys                     Manage API keys
kyma status                   Account overview
kyma config                   View/set defaults
kyma login                    Authenticate
kyma logout                   Clear saved credentials

Configuration

Config is stored in ~/.kyma/config.json:

{
  "api_key": "ky_xxx",
  "default_mode": "auto",
  "default_model": "deepseek-v3",
  "base_url": "https://kymaapi.com"
}

View and set config:

kyma config
kyma config default_mode deep

Flags

| Flag | Purpose | |------|---------| | -m, --model <id> | Use a specific model (overrides mode) | | -M, --mode <mode> | Set mode: fast, cheap, deep, auto | | --api-key <key> | Use a specific API key | | --continue [id] | Resume a session (use last if no ID given) | | --staged | For diff—review only staged changes | | --json | Machine-readable JSON output | | --quiet | Suppress decorative output | | --version | Show version | | --help | Show help |

Real-Time Metrics

Every response shows token count and cost:

⚡ 1,234 tokens in 2.4s (512 cached at 90% discount)
💰 Cost: $0.024 | Saved: $0.216 with prompt caching

Sessions persist in ~/.kyma/sessions/ and auto-resume where you left off.

Code Agent Tools

When you run kyma code, you get tools that the agent can use:

  • read — Read file contents
  • edit — Modify files
  • search — Grep + glob for patterns
  • bash — Execute shell commands

The agent runs in an approval-required loop: each tool use is shown before executing.

Architecture

Kyma CLI is built on 5 core equations:

  • INPUT — Parse user intent, collect context
  • ROUTE — Choose the right model (by mode or explicit selection)
  • OUTPUT — Stream or display the response
  • SETTLE — Track tokens, cost, and cache hits
  • OBSERVE — Save sessions, provide metrics

Each maps to a core module. Sessions maintain message history and can be resumed.

Supported Models

21 models across 5 quality tiers:

  • Tier 1 (best): Qwen 3.6, DeepSeek V3/R1, Kimi K2.5, Gemma 4, Qwen 3-Coder, Llama 3.3, MiniMax
  • Tier 2 (high): Kimi K2, Gemma 4 MoE, Nemotron, Gemini 2.5 Flash, Qwen 3-Coder
  • Tier 3 (fast): Llama Scout, Gemini 2.5 Flash Lite, Step 3.5, GLM 4.5

Prices vary by model. Use kyma models to see all options and current pricing.

Billing

  • Free plan: $0.50 starting credits, no card required
  • Pay-as-you-go: $0.00–$0.50 per million tokens (varies by model)
  • Auto top-up: Set a threshold and amount, charges your saved card

Check your balance:

kyma balance

Purchase credits at https://kymaapi.com/dashboard/billing or via the CLI.

Environment Variables

Optional overrides (flags take precedence):

KYMA_API_KEY="ky_xxx"          # API key
KYMA_MODE="deep"               # Default mode
KYMA_MODEL="deepseek-r1"       # Default model
KYMA_BASE_URL="https://..."    # Custom endpoint (dev/self-hosted)

Scripting & Automation

For scripting, combine --json and --quiet:

kyma "Summarize this" --json --quiet | jq '.cost'

Pipe stdin into prompts:

find . -name "*.ts" | kyma "Find security issues in these files"

What Makes Kyma Different

  • Simple routing: 21 models, no account juggling. Set a mode, we pick the best.
  • Transparent pricing: See exact token count and cost on every response.
  • Prompt caching: Repeated context costs 90% less (10% of input price).
  • Tool use: Code agent with read/edit/search/bash for agentic workflows.
  • Session persistence: Conversations saved locally, resume anytime.
  • Open source: MIT licensed. Self-host if you prefer—use KYMA_BASE_URL to point to your own server.

Docs

  • Full API reference: https://docs.kymaapi.com
  • Models & pricing: https://kymaapi.com/models
  • Dashboard: https://kymaapi.com/dashboard

Development

Clone the repo and build:

git clone https://github.com/kyma-api/cli
cd kyma-cli
npm install
npm run build
./dist/cli.js --version

Tech stack:

  • Runtime: Bun (compile to Node.js)
  • CLI framework: Clack (for prompts), Chalk (for colors)
  • Size: 99KB minified
  • Dependencies: 2 runtime (chalk, @clack/prompts)

Contributing

Contributions welcome. Start with issues marked good first issue.

License

MIT. See LICENSE.

Need Help?

  • Docs: https://docs.kymaapi.com
  • Status: https://kymaapi.com/status
  • GitHub Issues: https://github.com/kyma-api/cli/issues