CLAUDE.mdpoints to this file so Claude Code picks it up automatically. Other agents (Cursor, Windsurf, etc.) readAGENTS.mdnatively.
A CLI installer tool for dAppBooster projects. It supports two modes:
- Interactive (default): React + Ink TUI that walks users through project naming, repo cloning, installation mode selection, optional packages, and post-install steps.
- Non-interactive: Flag-driven mode (
--nior auto-detected when not a TTY) for AI agents and CI. Outputs JSON to stdout. Run--infofor feature discovery, then--name+--mode[+--features] to install.
| Category | Technology | Notes |
|---|---|---|
| Language | TypeScript (strict mode) | Extends @sindresorhus/tsconfig |
| Framework | React + Ink | Terminal UI framework |
| Arg parsing | meow | CLI flag parsing for non-interactive mode |
| Package manager | pnpm | Never npm or yarn |
| Linting/formatting | Biome | Run pnpm lint before committing |
| Testing | Vitest + @vitest/coverage-v8 | |
| Node | v20+ | See .nvmrc |
| Naming | camelCase vars/functions, PascalCase components/types |
- Semicolons: as needed (Biome
asNeeded— omitted unless required by ASI) - Quotes: single
- Print width: 100
- Trailing commas: all (Biome default)
- Indent: spaces, width 2
- Imports: explicit
.jsextensions (ESM,"type": "module")
- Use pnpm only (never npm or yarn)
- Treat
dist/as build output — never edit directly - User input (
projectName) must never be interpolated into shell command strings — useexecFile(args array) instead source/constants/config.tsis the single source of truth for feature metadata — all programmatic consumers read from it (CLI--helptext maintains its own copy)- Components are presentation-only — business logic lives in
source/operations/
See architecture.md for the full architecture guide, including data flow, how to add features, and security patterns.
Entry: source/cli.tsx — parses args with meow, routes between interactive and non-interactive paths.
- Interactive path:
source/app.tsx— step-based state machine that renders each installer step in sequence via React + Ink - Non-interactive path:
source/nonInteractive.ts— validates flags, runs operations sequentially, outputs JSON
Key directories:
source/operations/— business logic as plain async functions, shared by both pathssource/components/steps/— TUI step components, presentation-onlysource/components/— reusable UI components (Ask, Divider, MainTitle, Multiselect)source/__tests__/— vitest test suite
- Framework: Vitest + V8 coverage
- Run tests:
pnpm test/pnpm test:coverage - Structure:
source/__tests__/mirrorssource/layout. Operations tests live insource/__tests__/operations/ - What to test: Non-interactive agentic flow (validation, JSON output), operations (correct shell commands), config, utils
- What not to test: React/Ink components
- Mocking pattern: Operations tests mock
exec/execFilefromsource/operations/exec.js.exec.test.tsmockschild_process.spawndirectly to test the helpers themselves. Non-interactive tests mock the entire operations layer - Coverage: Focus on the agentic interface. Test files and
source/components/are excluded from coverage
- Do not commit secrets, API keys, or credentials
- Do not modify CI/CD pipelines without team review
- Do not skip tests or linting to make a build pass
- When in doubt, ask — don't assume
- Prefer small, focused diffs over broad refactors
- Preserve existing UX unless the task explicitly changes it
- Avoid introducing new patterns when a project pattern already exists
- Update docs only when behavior or workflow changes
pnpm buildpnpm lintpnpm test
GitHub Actions workflow (.github/workflows/release.yml) triggers on GitHub release events. Pre-releases do a dry-run; full releases publish to npm.