Skip to content

Add --dry-run flag to setup-project.sh #8

@PAMulligan

Description

@PAMulligan

Description

Add a --dry-run flag to scripts/setup-project.sh that prints what would be created without actually creating any files or installing dependencies.

Why

Contributors and users evaluating Nerva want to preview the project structure before committing to the setup. A dry-run flag is a standard UX pattern for scaffolding tools that builds confidence.

Current Behavior

Running ./scripts/setup-project.sh my-api --node immediately creates directories and installs packages with no preview option.

Acceptance Criteria

  • Add --dry-run flag parsing to the argument handling loop
  • In dry-run mode, print all directories that would be created
  • Print all files that would be copied/generated
  • Print the pnpm commands that would be run (without executing them)
  • Print the summary output as normal
  • Add --dry-run to the usage message
  • No files are created or modified in dry-run mode

Example Output

$ ./scripts/setup-project.sh my-api --node --dry-run
[DRY RUN] Would create: my-api/api/src/routes/
[DRY RUN] Would create: my-api/api/src/db/migrations/
[DRY RUN] Would copy: templates/shared/tsconfig.json → my-api/api/tsconfig.json
[DRY RUN] Would generate: my-api/api/package.json
[DRY RUN] Would run: pnpm add hono drizzle-orm postgres zod @hono/zod-validator
[DRY RUN] Would run: pnpm add -D vitest typescript eslint prettier drizzle-kit ...
...

Metadata

Metadata

Assignees

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions