Command-line interface for the Helvetium web framework. It provides the helvet executable and coordinates Helvetium Boilerplate, Boot, DOM, and Alps workflows from one command surface.
npm install -g @newfoundcodes/helvetium-cliVerify:
helvet --version
helvet listThe CLI uses Node's native process APIs, so project scripts and package-manager commands work on Linux, macOS, Windows Command Prompt, and PowerShell. On PowerShell, enable completion with:
helvet completion powershell | Invoke-Expressionhelvet create my-app
cd my-app
helvet migrate up
helvet devProject generation is delegated to @newfoundcodes/helvetium-boilerplate. The CLI bundles the compatible Boilerplate release in its npm publication artifact so helvet create has a deterministic template implementation.
When run interactively, helvet create asks whether to initialize a Git repository after generating the project. Use --git to initialize it without prompting or --no-git to skip initialization.
Generate without installing project dependencies:
helvet create my-app --no-installOther options:
helvet create my-app \
--name "My Application" \
--package @acme/my-app \
--port 4000 \
--pm npm \
--gitPlaywright browser tests, Prettier formatting, and ESLint linting are optional. Select them in the interactive module prompt, or enable them directly:
helvet create my-app --playwright
cd my-app
npx playwright install chromium
npm run test:e2ehelvet create my-app --prettier --eslint
cd my-app
npm run format:check
npm run linthelvet new:page AboutPage
helvet new:page LegalPage --path /legal --title "Legal"This creates the page component and registers it in src/app/routes.ts for both Boot SSR and DOM browser routing.
helvet new:component AlertCreates src/app/components/AlertComponent.tsx.
helvet new:path orders --method post --path /api/ordersThis creates a handler in src/routes/handlers/orders.ts and registers the Boot route with basic OpenAPI metadata in src/routes/paths.ts.
helvet new:handler ordershelvet new:middleware authenticatedCreates middleware under src/middlewares/. Middleware remains explicitly imported/registered by the application.
helvet new:migration create_posts --create posts
helvet new:migration add_slug_to_posts --table posts
helvet new:migration custom_changeMigration filenames use the local machine time:
09052026_153324_create_posts.ts
The generator also updates scripts/migrations.ts, so the migration is immediately visible to the application's Alps migrator.
helvet new:table posts
helvet new:repository PostOr generate the common model set:
helvet new:model Post
helvet new:model Post --migrationhelvet new:service Billing
helvet new:test billing-flowhelvet new:command reports:dailyThis creates a command module below .helvetium/commands/.
helvet migrate up
helvet migrate down
helvet migrate statusAliases:
helvet migrate:status
helvet migrate:rollback
helvet rollbackThe CLI runs the generated project's migration scripts. Database configuration and durable migration-state storage remain application-owned.
Generated Apiary projects expose worker controls through the CLI:
helvet worker list
helvet worker jobs
helvet worker trigger example '{"id":"manual"}'
helvet worker run example '{"id":"offline"}'
helvet worker work
helvet worker cancel JOB_ID
helvet worker retry JOB_IDtrigger uses the running project's /internal/apiary endpoint when reachable and otherwise queues the job in the local file-backed store. run executes one job offline; work starts a local worker process. Use --queue NAME for a named queue and HELVETIUM_APIARY_URL for a non-default running-server URL.
helvet route:listExample:
GET /api/health
GET /api/users
GET /api/users/:id
POST /api/users
GET /openapi.json
Machine-readable output:
helvet route:list --jsonhelvet env:check
helvet doctor
helvet project:infoenv:check compares .env.example with the process environment and .env. doctor checks the Node runtime, expected project layout, and core Helvetium dependencies.
helvet dev
helvet build
helvet serve # builds first, then starts the production server
helvet test
helvet typecheck
helvet checkThese commands delegate to the current project's package-manager scripts. Arguments after -- are forwarded when supported:
helvet test -- --watchGenerated projects discover test files recursively, including both .test.ts and .test.tsx files.
helvet list
helvet help new:pageThe command interface follows the same useful CLI conventions as Artisan: a discoverable command list, per-command help, generators, and migration lifecycle operations.
Create .helvetium/commands/hello.mjs:
export default {
name: 'hello',
description: 'Say hello',
async run(context) {
context.io.write('Hello from this project');
return 0;
},
};Then:
helvet helloProjects may register commands or plugins:
export default {
commands: [
{
name: 'app:info',
description: 'Show application information',
run(context) {
context.io.write(`Project: ${context.projectRoot}`);
},
},
],
plugins: ['./tools/cli-plugin.mjs'],
};A plugin exports a register(registry) function:
export default {
name: 'my-plugin',
register(registry) {
registry.command({
name: 'plugin:hello',
description: 'Plugin command',
run(context) {
context.io.write('hello');
},
});
},
};Project-local CLI modules are executable JavaScript. Only run Helvetium CLI inside repositories you trust.
import { createRegistry, defineCommand, runCLI } from '@newfoundcodes/helvetium-cli';Generators are also exported:
import {
generateMigration,
generatePage,
generatePath,
} from '@newfoundcodes/helvetium-cli/generators';This is intended for the future wider Helvetium CLI/plugin ecosystem as well as test harnesses and automation.
helvet completion bash
helvet completion zsh
helvet completion fishFor Bash, for example:
source <(helvet completion bash)npm run docs:setup
npm run docs:build
npm run docs:serveThe repository uses Material for MkDocs through a project-local Python virtual environment.
Generators refuse existing target files unless --force is explicitly supplied. --dry-run is available on generator commands to calculate changes without writing files.
helvetium.config.mjs, project-local commands, plugins, migrations, and package scripts are executable project code. Do not use the CLI in an untrusted repository.
- Node.js 22 or newer.
- A supported package manager for project lifecycle operations.
- Python 3 only when building/serving the MkDocs documentation locally.
This project is licensed under the AGPL-3.0-only License.
