DevTools AI

Installation

DevTools AI uses pnpm as its package manager.

pnpm install

Environment

Copy .env.example to .env.local and set OPENROUTER_API_KEY. See Configuration for the full list of variables.

cp .env.example .env.local

Scripts

CommandWhat it does
pnpm devStart the dev server with Turbopack
pnpm buildProduction build
pnpm startRun the production build
pnpm lint / lint:fixESLint, with autofix
pnpm format / format:checkPrettier, write or check only
pnpm typecheckTypeScript, no emit
pnpm test / test:watchVitest, once or in watch mode
pnpm cliRun the CLI without installing it globally, e.g. pnpm cli explain --file src/index.ts

The CLI

The same ten tools are available from the terminal, backed by the exact same prompts and validation as the web app.

pnpm cli explain --file src/index.ts

# or install the devtools-ai command globally
npm install -g github:HIMURAw/DevTools-AI
devtools-ai list

See CLI Reference for every install method, every command, and every flag.

Adding an 11th tool

Every tool is defined in one place: no new routes required.

  • Add a prompt builder and Zod schema in src/lib/ai/prompts/
  • Register the tool in src/config/tools.config.ts with its fields, example input, and output format

The shared route handler, form, output renderer, and CLI command all pick it up automatically.