Skip to content
nooh
Esc
↑↓navigate↵open⌘Jpreview
On this page

CLI

Command-line interface for compiling, watching, and running Nooh applications.

The Nooh CLI (@nooh-ts/cli) provides commands for building and developing your applications.

Installation

# pnpm
pnpm add -D @nooh-ts/cli

# npm
npm install -D @nooh-ts/cli

# bun
bun add -d @nooh-ts/cli

Commands

nooh build

Compiles your project routes and dependencies into .nooh/ and prepares the production app.

nooh build [options]

Options:

  • -c, --config <path>: Specify a custom configuration file path.

nooh watch

Starts the compiler in watch mode. It monitors your routes/ directory and re-generates router artifacts instantly whenever files are added, modified, or deleted.

nooh watch [options]

nooh dev

Runs the Nooh watch compiler alongside your backend runtime server.

nooh dev [options] -- <command> [args...]

Example in package.json:

{
  "scripts": {
    "dev": "nooh dev -- pnpm exec tsx --watch src/index.ts",
    "build": "nooh build"
  }
}

Configuration Resolution

The CLI automatically looks for configuration files in this order:

  1. nooh.config.ts (project root)
  2. src/nooh.config.ts
  3. src/config.ts

You can always override the config location explicitly using -c / --config.

Was this page helpful?