Quick Start
Quick Start
cnos initcnos value set app.name democnos value set server.port 3000cnos value set api.default_query_params '["ab", "bc"]'cnos read value.app.namecnos build env --profile local --to .env.localcnos run -- node server.jsIn app code:
import cnos from '@kitsy/cnos';
await cnos.ready();console.log(cnos('value.app.name'));For explicit creation:
import { createCnos } from '@kitsy/cnos/configure';
const runtime = await createCnos();console.log(runtime.value('app.name'));console.log(runtime.read<string[]>('value.api.default_query_params'));If your repo still expects env files, keep .cnos as the source of truth and generate them:
cnos build env --profile local --to .env.localcnos dev env --profile local --to .env.local -- pnpm devFor frontend builds:
- Vite:
@kitsy/cnos-vite - Webpack/static bundles:
@kitsy/cnos-webpack - Next.js:
@kitsy/cnos-next
For webpack/static bundles, build-time settings can come from CNOS too:
cnos set value dev.server.port 8800npm run dev