#!/usr/bin/env node // iapl — the IAPL command line (also installed as `ipal-kit`, its name before 1.17.0, which `pnpm dlx @intecion/ipal-kit` runs). // pnpm dlx @intecion/ipal-kit@ create intecion.com → a new client site (docs/project-starter.md) // pnpm exec iapl create intecion.com --dir ../intecioncom-web --answers answers.json // `pnpm dlx ` runs the bin named after the package, so every subcommand lives here. // The other tools keep their own bins: iapl-skills, iapl-blocks, iapl-tokens, iapl-doctor. import { dirname, join } from 'node:path' import { fileURLToPath, pathToFileURL } from 'node:url' const USAGE = `Usage: iapl [options] create a new client site from the reference site (iapl create --help) Other tools: iapl-skills, iapl-blocks, iapl-tokens, iapl-doctor` const [command, ...args] = process.argv.slice(2) if (command !== 'create') { console.log(USAGE) process.exit(command === undefined || command === '--help' || command === '-h' ? 0 : 1) } const pkgRoot = join(dirname(fileURLToPath(import.meta.url)), '..') const { runCreateCli } = await import(pathToFileURL(join(pkgRoot, 'dist', 'modules', 'starter', 'cli.js')).href) process.exit(await runCreateCli(args))