Askr
Getting Started

Getting Started

Install Askr, choose a starter, and ship a first route.

  • @askrjs/askr0.0.59

How to use getting started

Create a readable starter, run it unchanged, and make one small production build after the first route works.

  1. Choose startkit for the recommended product baseline; choose spa, ssr, ssg, or full-stack only when that delivery boundary is already known.
  2. Run the generated application and read its route registry, scripts, and route-tree test before editing them.
  3. 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 build

Overview

Askr is an actor-backed UI runtime for TypeScript: components are plain functions, state is read and written through explicit getter/setter pairs, and rendering is deterministic enough to run identically on the server and in the browser. This page gets you from zero to a running route in a few minutes using the `askr` CLI. Everything here uses the published `@askrjs/askr` and `@askrjs/cli` packages, not a local checkout.

Prerequisites

You need a recent Node.js (18+) and npm on your PATH; the CLI is published as a global binary, `askr`, from `@askrjs/cli`. No other tooling is required to get a project running — the generated project brings its own dev server and build scripts. If you plan to deploy with SSR or SSG, make sure your host can run a Node process or serve static files, respectively.

The shortest path

Install the CLI globally with `npm install -g @askrjs/cli`, then run `askr create startkit my-app`. `cd my-app && npm run dev` gets a live app in the browser. If you'd rather describe what you're building, `askr create --prompt "..."` picks a template for you and writes `.askr/blueprint.json` plus a `builder-brief.md` explaining the choice.

Where to go next

Read Core Concepts for the mental model — functions, explicit state, and deterministic rendering — before you start wiring up routes. If you're choosing between SPA, SSR, SSG, or the full-stack/startkit templates, see Choosing an Application Mode. Once you have a route rendering, First Application walks through adding state and a second route.