Installation
Use installation with the current published Askr packages.
@askrjs/cli0.0.5
How to use installation
Create a readable starter, run it unchanged, and make one small production build after the first route works.
- Choose startkit for the recommended product baseline; choose spa, ssr, ssg, or full-stack only when that delivery boundary is already known.
- Run the generated application and read its route registry, scripts, and route-tree test before editing them.
- Add one page, update the expected route set, then build and preview the real output.
npx @askrjs/cli@0.0.5 create startkit my-app
cd my-app
npm run dev
npm run buildRuntime requirements
You need Node.js 18 or later and npm to install and run Askr projects; the CLI's `dist/cli.js` is a Node binary invoked as `askr`. Generated projects are ES modules (`"type": "module"`) and expect a modern bundler-driven dev workflow, which the CLI templates already wire up for you.
Create with the CLI
Install `@askrjs/cli` globally (`npm install -g @askrjs/cli`) and run `askr create <template> <name>`, where template is one of `spa`, `ssr`, `ssg`, `full-stack`, or `startkit`. This scaffolds the project, installs bundled agent skills into `skills/` unless you pass `--no-skills`, and runs the install for you unless you pass `--no-install`.
Install packages directly
If you're adding Askr to an existing project instead of scaffolding a new one, install `@askrjs/askr` directly with `npm install @askrjs/askr` and import from its subpaths as needed — `@askrjs/askr` for state and JSX, `@askrjs/askr/boot` for startup, `@askrjs/askr/router` for routing. The CLI itself has no subpath exports beyond `package.json`; it's consumed only as the `askr` binary, not imported into application code.
Verify the install
Run `npm run dev` from a scaffolded project and confirm the dev server starts and the starter route renders in the browser. For a manual install, a quick sanity check is importing `state` from `@askrjs/askr` and calling it inside a component — if the getter and setter behave as expected, the runtime is wired correctly.