Skip to main content
The Kyma CLI gives you instant access to 21 models from your terminal. Interactive chat, model switching, piping — no browser needed.

Install

npm install -g kyma-api
This gives you the kyma command globally. Or use without installing:
npx kyma-api

Login

kyma login
This opens your browser automatically. Sign in with email/password or Google, and the CLI stores your credentials locally. Alternative: API key directly
kyma login --api-key kyma-xxxx
Alternative: environment variable
export KYMA_API_KEY=kyma-xxxx

Chat

Quick prompt

kyma "What is Rust?"
kyma -m deepseek-r1 "Prove P≠NP"

Interactive mode

Just type kyma with no arguments to enter interactive chat — like Claude Code or Pi.
kyma
You’ll see the Kyma banner, then a prompt. Type your message and get a streaming response with token count, cost, and speed. Type /model to open an interactive picker — browse all 21 models with arrow keys. Or /model deepseek-r1 to switch instantly.

Slash commands

CommandDescription
/modelPick a model with arrow keys (↑↓)
/model <id>Switch model instantly
/modelsList all available models
/balanceCheck your credits
/clearReset conversation history
/helpShow all commands
/exitQuit

Pipe mode

echo "Summarize this README" | kyma
cat error.log | kyma "fix this"
git diff | kyma "review this diff"

All Commands

CommandDescription
kymaInteractive chat
kyma "prompt"Quick answer
kyma loginAuthenticate
kyma logoutRemove credentials
kyma modelsList all models
kyma balanceCredit balance and tier
kyma keysList API keys
kyma keys create --name ciCreate a new API key
kyma statusAccount overview

Options

FlagDescription
-m, --model <id>Select model (default: best)
--api-key <key>Use a specific API key
--jsonMachine-readable JSON output
--quietSuppress banners and decorative output
--non-interactiveFail instead of prompting
--versionShow version
--helpShow help

Model Aliases

Use aliases instead of full model IDs:
kyma -m best "hello"       # qwen-3.6-plus
kyma -m fast "hello"       # llama-3.3-70b
kyma -m code "hello"       # kimi-k2.5
kyma -m reasoning "hello"  # deepseek-r1
See Model Aliases for the full list.

CI / Agent Mode

The CLI auto-detects non-TTY environments (pipes, CI) and switches to quiet + non-interactive mode.
# JSON output for scripts
kyma models --json

# Use in CI with env var
KYMA_API_KEY=kyma-xxxx kyma chat --quiet "hello"

# Pipe input → JSON output
cat prompt.txt | kyma --json

Config

Credentials are stored in ~/.kyma/config.json (permissions 600).
{
  "api_key": "kyma-xxxx",
  "user_id": "abc123",
  "email": "you@example.com"
}
Override the API endpoint:
export KYMA_BASE_URL=https://staging.kymaapi.com

Requirements

  • Node.js 18+