API Reference

@taserjs/cli

CLI reference for taser generate, taserjs.config.ts, and src/.taserjs/routes.gen.ts output.

The @taserjs/cli package ships the taser binary for route scanning, scaffolding, and manifest generation.


Commands

taser generate

Writes ${serverDir}/.taserjs/routes.gen.ts (defaults to src/.taserjs/routes.gen.ts).

taser generate [--config <path>] [--watch]
npx @taserjs/cli generate [--config <path>] [--watch]

Prop

Type


Configuration

Config resolution order:

  1. --config <path> when provided
  2. taserjs.config.ts / .js / .mjs / .cjs in the working directory
  3. Built-in defaults (serverDir: "src", routesDir: "routes", outputDir: ".taserjs", app: "taser.ts")
taserjs.config.ts
import { defineConfig } from "@taserjs/cli";

export default defineConfig({
  serverDir: "src",
  routesDir: "routes",
  outputDir: ".taserjs",
  app: "taser.ts",
});

CI Typecheck Pattern

package.json
{
  "scripts": {
    "typecheck": "taser generate && tsc --noEmit -p tsconfig.json"
  }
}