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:
--config <path>when providedtaserjs.config.ts/.js/.mjs/.cjsin the working directory- Built-in defaults (
serverDir: "src",routesDir: "routes",outputDir: ".taserjs",app: "taser.ts")
import { defineConfig } from "@taserjs/cli";
export default defineConfig({
serverDir: "src",
routesDir: "routes",
outputDir: ".taserjs",
app: "taser.ts",
});CI Typecheck Pattern
{
"scripts": {
"typecheck": "taser generate && tsc --noEmit -p tsconfig.json"
}
}