Skip to Content
Overview

Kalam CLI

The Kalam CLI (kalam) is the SQL-first terminal client for KalamDB. It ships as a native Rust binary and as the npm package @kalamdb/cli.

Use it for:

  • project workflowskalam init, kalam dev, migrations, and schema codegen
  • one-shot SQL and interactive shells
  • named instance profiles (dev, staging, prod)
  • live query subscriptions and topic consumers
  • cluster and storage meta-commands

June 17 v0.5.3-rc.1 CLI Workflow

The June 17 v0.5.3-rc.1 pre-release makes kalam init and kalam dev the main local project workflow. Read the release note, then start with Project Init and Local Development.

Project workflow

  1. Setup & Install
  2. Project Init
  3. kalam.toml Reference
  4. Local Development — includes schema file watch
  5. Migrations

SQL client

  1. Authentication
  2. Querying & SQL
  3. Live Subscriptions
  4. Topic Consumers
  5. Interactive Commands
  6. SQL Workflows
  7. Options & Timeouts

Execution modes

When you run kalam without a subcommand, these modes apply (in precedence order):

  1. --subscribe / --list-subscriptions — subscription management
  2. --consume --topic ... — topic consumer mode
  3. SQL execution:
    • --file <path> — execute file and exit
    • --command <sql> — execute one statement and exit
    • no flags — interactive shell

Project commands (init, dev, migration, db, schema, status, deploy) are always top-level subcommands.

Quick command map

BASH
# Project workflowkalam initkalam init --yes --name my-app --languages typescript --package-manager pnpmkalam devkalam migration statuskalam migration seal && kalam db migratekalam db resetkalam schema genkalam status # Interactive SQL shellkalam # One-shot SQLkalam -c "SELECT * FROM system.tables LIMIT 5;" # Live subscriptionkalam --subscribe "SELECT * FROM app.messages" # Topic consumerkalam --consume --topic blog.summarizer --group summarizer-agent --from latest # Login and doctorkalam login --instance prod --url https://db.example.com --user admin --passwordkalam doctor -v
Last updated on