
Company News
AWS Security Hub Adds Socket for Supply Chain Security
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.
@kyma-api/cli
Advanced tools
Terminal interface for 21+ AI models. Chat, code, and manage your account.
Ψ Terminal interface for 21+ AI models. One command to chat, code, and manage your account.
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.
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.
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
| 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"
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
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
| 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 |
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.
When you run kyma code, you get tools that the agent can use:
The agent runs in an approval-required loop: each tool use is shown before executing.
Kyma CLI is built on 5 core equations:
Each maps to a core module. Sessions maintain message history and can be resumed.
21 models across 5 quality tiers:
Prices vary by model. Use kyma models to see all options and current pricing.
Check your balance:
kyma balance
Purchase credits at https://kymaapi.com/dashboard/billing or via the CLI.
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)
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"
KYMA_BASE_URL to point to your own server.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:
Contributions welcome. Start with issues marked good first issue.
MIT. See LICENSE.
FAQs
Terminal interface for 21+ AI models. Chat, code, and manage your account.
We found that @kyma-api/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.