CLI

The Keel CLI is your primary tool for developing, testing, and deploying Keel applications. It handles everything from project initialization to local development, testing, and self-hosted deployments.

Installing Keel CLI

The Keel CLI can be installed from NPM:

npm install -g keel

To verify the installation and check your version:

keel --version

Global flags

These flags are available on all commands:

FlagShortDescription
--dir-dDirectory containing a Keel project (defaults to current directory)
--version-vPrint the Keel CLI version

Commands overview

CommandDescription
keel initInitialize a new Keel project
keel runStart a local development server
keel generateGenerate SDK and scaffold functions
keel validateValidate your schema and config
keel testRun your test suite
keel clientGenerate a TypeScript client SDK
keel dbManage your development database
keel secretsManage local development secrets

keel init

Initialize a new Keel project with an interactive setup wizard.

keel init

The init command guides you through:

  1. Directory — Choose where to create your project
  2. Template — Start with a blank project or a starter template
  3. Package Manager — Select npm or pnpm
  4. Version Control — Optionally initialize a Git repository

What gets created

For a blank project, keel init creates:

my-keel-app/
├── schema.keel        # Your Keel schema
├── keelconfig.yaml    # Project configuration
├── .gitignore         # Git ignore rules
├── package.json       # Node.js dependencies
└── node_modules/      # Installed packages

The command also runs keel generate automatically to create the @teamkeel/sdk and @teamkeel/testing packages.

Starter templates

When you select "Starter template", the CLI downloads templates from the teamkeel/starter-templates (opens in a new tab) repository and lets you choose from available options.


keel run

Start a local development server for your Keel project.

keel run