Install the CLI from npm and run it directly. irgen requires Node.js >= 18 because it registers the tsx loader to execute .dsl.ts and its imports.

1npm install -g irgen
2irgen --version
3irgen examples/app.dsl.ts --targets=backend

Local vs Global

Global install is convenient for CLI usage. You can also use npx if you prefer not to install globally.

1npx irgen examples/app.dsl.ts --targets=backend

TypeScript DSL Support

The CLI registers the tsx loader, so .dsl.ts can import other .ts modules without extra tooling.