Init and Dev Workflow
Two commands get a local KalamDB app running: kalam init scaffolds the project, then kalam dev starts the database, applies schema.sql, and supervises your app.
Non-interactive equivalent:
While kalam dev is running, open http://localhost:2900/ui and sign in as root / kalamdb123.
What kalam init writes
| Artifact | Purpose |
|---|---|
kalam.toml | Environments, schema path, and [dev.processes] |
schema.sql | Schema source for the migration pipeline |
kalam/server/server.toml | Local server config, including auth.root_password |
.env / .env.example | KALAM_USER=root and KALAM_PASSWORD=kalamdb123 for local mode |
| TypeScript starter | simple-live by default, with dotenv so npm run dev loads .env |
kalam.toml stores URLs and toolchain choices only — no secrets. Local root credentials live in kalam/server/server.toml and .env.
What kalam dev does
- Resolves the URL and namespace from
kalam.toml(defaulthttp://localhost:2900) - Starts
kalamdb-serverwhen nothing is listening, or warns and reuses whatever is already on that URL - Logs in as local root and saves credentials under
~/.kalam/ - Diffs
schema.sql, applies migrations, and regenerates SDK types - Injects the project
.envinto[dev.processes](for examplepnpm dev) soKALAM_PASSWORDreaches Node even if the app does not load dotenv itself - Watches
schema.sqland multiplexes[cli],[server], and[app]logs
Press Ctrl+C to shut down processes that this session started.
Port already in use
If another kalamdb-server or cargo run is already bound to port 2900, kalam dev reuses it instead of starting kalam/server for this project. The warning is explicit: that listener may not be this project’s managed server.
Stop the other process if you expected a fresh local instance, or scaffold against a free port:
App credentials
kalam init writes KALAM_PASSWORD=kalamdb123 into .env. kalam dev injects those values into child processes when they are not already set in the parent environment. New TypeScript starters also import 'dotenv/config' so npm run dev outside kalam dev still sees the password.
If the app logs KALAM_PASSWORD is required, confirm .env exists in the project root and that you rebuilt a CLI that injects it.
Next
- Project Init — flags, templates, and
kalam.tomlshape - Local Development — prechecks, watch, draft prompt, and troubleshooting
- Getting started — Docker, CLI, and binary install paths