@korajs/cli
v0.4.0
Published
Kora.js CLI tooling and project scaffolding
Readme
@korajs/cli
CLI tooling for Kora.js. Scaffold new apps, run the development server, manage schema migrations, and generate TypeScript types.
Install
pnpm add -g @korajs/cliOr use directly with npx:
npx create-kora-app my-appCommands
create-kora-app
Scaffold a new Kora.js project:
npx create-kora-app my-app
# Interactive prompts:
# Select a template: React (basic) | React (with sync)
# Package manager: pnpm | npm | yarn | bunkora dev
Start the development environment:
kora devThis runs:
- Vite dev server for your application
- Kora sync server (if configured)
- Schema file watcher with auto type generation
- Embedded DevTools (toggle with
Ctrl+Shift+K)
kora migrate
Detect schema changes and generate migrations:
kora migrate
# Detects changes, generates migration file, prompts to applykora deploy
Deploy your Kora app to a cloud platform with a single command:
kora deploySupported platforms: Fly.io, Railway (Render, Docker, Kora Cloud coming soon).
Options
| Flag | Description |
|------|-------------|
| --platform | Target platform: fly, railway, render, docker, kora-cloud |
| --app | Application name on the platform |
| --region | Deployment region (e.g., iad, lhr, syd) |
| --prod | Deploy to production environment (default: preview) |
| --confirm | Non-interactive mode — fail fast if required data is missing |
| --reset | Delete .kora/deploy/ state and generated artifacts |
Subcommands
kora deploy status # Show deployment health, URLs, and metadata
kora deploy logs # View recent deployment logs
kora deploy rollback # Revert to the previous deploymentNon-interactive (CI/CD)
kora deploy --platform=fly --app=my-app --region=iad --confirmWhat it does
- Generates a
Dockerfileand.dockerignorein.kora/deploy/ - Bundles your server entry (
server.ts) with esbuild into a single file - Builds your client with Vite
- Generates platform config (
fly.tomlorrailway.json) - Provisions the app on the platform (creates it if new)
- Deploys and returns your live URL and sync WebSocket endpoint
Prerequisites
- Fly.io: Install flyctl and run
fly auth login - Railway: Install @railway/cli and run
railway login
kora generate types
Generate TypeScript types from your schema:
kora generate types
# Output: kora/generated/types.tsQuick Start
npx create-kora-app my-app
cd my-app
pnpm devYou'll have a working offline-first app in under 2 minutes.
License
MIT
See the full documentation for guides, API reference, and examples.
