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 keelTo verify the installation and check your version:
keel --versionGlobal flags
These flags are available on all commands:
| Flag | Short | Description |
|---|---|---|
--dir | -d | Directory containing a Keel project (defaults to current directory) |
--version | -v | Print the Keel CLI version |
Commands overview
| Command | Description |
|---|---|
keel init | Initialize a new Keel project |
keel run | Start a local development server |
keel generate | Generate SDK and scaffold functions |
keel validate | Validate your schema and config |
keel test | Run your test suite |
keel client | Generate a TypeScript client SDK |
keel db | Manage your development database |
keel secrets | Manage local development secrets |
keel init
Initialize a new Keel project with an interactive setup wizard.
keel initThe init command guides you through:
- Directory — Choose where to create your project
- Template — Start with a blank project or a starter template
- Package Manager — Select npm or pnpm
- 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 packagesThe 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