@digitalunicorn/create-du-app
v0.7.1
Published
CLI generator: pick templates (Mobile/FE/BE) and scaffold a product monorepo
Downloads
82
Readme
@digitalunicorn/create-du-app
Scaffold a standalone product monorepo from company templates — in one command.
Run it, answer a few prompts (project name, which stacks, and optionally which AI/dev workflow tooling), and you get a ready-to-run pnpm monorepo with only what you picked.
Quick start
No install needed. In a real terminal (Terminal.app / iTerm):
npx @digitalunicorn/create-du-appYou'll be asked:
- Project name? → e.g.
my-shop - Select the groups → press
Spaceto tick Mobile / Frontend / Admin / Backend, thenEnter - Pick one technology per group → ↑ / ↓ then
Enter - Dev workflow tooling? → optionally tick Claude skills / Agent OS / OpenSpec, or just press
Enterto skip
◇ Dev workflow tooling? (optional — Enter to skip)
│ ◼ Claude skills (Jira + GitLab) ◼ Agent OS ◼ OpenSpecStep 4 is optional and off by default — press Enter and you get the plain
monorepo. See Dev workflow tooling for what each one adds.
Then bootstrap it — one command installs deps, builds @repo/shared, and
verifies every app can import it:
cd my-shop
pnpm bootstrap
pnpm devDone. 🎉
If you ticked anything in step 4, the generated repo has its own
GETTING-STARTED.md with the setup steps and the daily workflow — read that next.
Non-interactive (CI / IDE terminals)
Pass everything as flags — no prompts, works anywhere:
npx @digitalunicorn/create-du-app --name my-shop --mobile expo --fe nextjs --admin nextjs --be nestjs --workflow allOmit --workflow and you get the plain monorepo — the add-ons are opt-in.
| Flag | Values | Required |
|------|--------|----------|
| --name | your project name | ✅ |
| --mobile | rn · expo · flutter | optional |
| --fe | nextjs · reactjs | optional |
| --admin | nextjs | optional |
| --be | nodejs · nestjs · php · supabase | optional |
| --workflow | skills · agent-os · openspec · all · none | optional |
Dev workflow tooling
Optional scaffolding for how the repo is worked on, rather than what the product
is. Off by default — skip the prompt (or omit --workflow) and nothing extra is
generated.
| Add-on | Generates | What it is |
|--------|-----------|------------|
| skills | .claude/ | The DU workflow skill suite — /start-work, /review-mine, /commit, /push, /create-mr, /logwork. Cloned at generate time, so you get the current version. |
| agent-os | agent-os/ | Long-term standards the AI reads before coding: tech stack, architecture, code style, testing, security. |
| openspec | openspec/ | Proposal → spec → tasks → archive, so behaviour changes are agreed before they get coded. |
Tick any of them and you also get three root entry points, each referencing only what was actually installed:
| File | For | Contains |
|------|-----|----------|
| GETTING-STARTED.md | people | Setup, credentials, the daily loop, your first change |
| CLAUDE.md | Claude Code | Operating rules — when a spec is required, what to report |
| AGENTS.md | other AI tools | A pointer to the two above |
# everything
npx @digitalunicorn/create-du-app --name my-shop --be nestjs --workflow all
# docs only, no Jira/GitLab skills
npx @digitalunicorn/create-du-app --name my-shop --be nestjs --workflow agent-os,openspecNotes:
agent-os/standards/tech-stack.mdis filled in from the stacks you actually picked and cites the file that proves each row. What the CLI cannot know is markedTO_BE_CONFIRMEDrather than guessed.skillsis the only step needing network, and it clones from a private repo — you need agit.volcanly.meaccount and git credentials for that host. Sign in once (any clone from that host stores the credential) and it works from then on. A failed clone warns and continues; the monorepo is still complete apart from.claude/. Generation never aborts, and it never stops to ask for a password.- The skills need per-developer Jira/GitLab credentials: copy
.claude/config.env.exampleto.claude/config.envand fill it in.PROJECT_NAME,PROJECT_STACKandPROJECT_SRC_PATHare already set.config.envis gitignored.
Install globally (optional)
Scaffold often? Install once so you don't re-download it each time:
npm install -g @digitalunicorn/create-du-app # or: pnpm add -g @digitalunicorn/create-du-app
create-du-app # same as npx @digitalunicorn/create-du-appAvailable stacks
| Group | Technologies | Output folder |
|----------|-------------------------------|----------------|
| Mobile | React Native · Expo · Flutter | apps/mobile |
| Frontend | Next.js · ReactJS | apps/web |
| Admin | Next.js | apps/admin |
| Backend | Node.js · NestJS · PHP · Supabase | apps/backend |
| Workflow (optional) | Claude skills · Agent OS · OpenSpec | .claude · agent-os · openspec |
packages/shared (@repo/shared — shared data contracts, built with tsup) is added
automatically when you pick ≥ 2 JS/TS stacks, and every JS/TS app is wired to it
as a workspace:* dependency.
For maintainers
Working on the CLI source or the templates? See the repository README and CONTRIBUTING.md.
| File | Responsibility |
|---------------|----------------|
| src/index.js | Entry point. Parses flags, runs interactive or non-interactive, then generates. |
| src/registry.js | Data declaration of groups, technologies, templatePath, and lang. Edit this to add/remove a stack. |
| src/prompts.js | Interactive prompts (@clack/prompts). |
| src/generate.js | Copies templates, renames _package.json → package.json, substitutes {{PROJECT_NAME}}, emits the root config (package.json, pnpm-workspace.yaml, turbo.json, tsconfig.base.json, .gitignore, .npmrc, scripts/bootstrap.mjs), and wires JS/TS apps to @repo/shared. |
| src/workflow.js | The --workflow add-ons: clones the Claude skills, generates Agent OS and OpenSpec, and writes GETTING-STARTED.md / CLAUDE.md / AGENTS.md. Content is derived from the plan (never guessed) and failures degrade to warnings. |
| scripts/validate-templates.mjs | Validates every registered template (gates prepack/publish). Run with pnpm validate. |
Before publishing, prepack runs template validation automatically. Run the full
check (validate + generate smoke test) from the repo root with pnpm test.
Release a new version: pnpm release (see scripts/release.mjs).
