Skip to content

Conversation

@valuecodes
Copy link
Owner

What

Introduce a new CLI scaffolding tool that simplifies the creation of new CLI projects. This feature includes a script for generating project templates, along with README and checklist files to guide users through the setup process. The changes affect the scripts/, templates/, and package.json files, enhancing the developer experience by providing a structured approach to project initialization.

  • Implemented a scaffolding script in scripts/scaffold-cli.ts.

  • Added templates for README and checklist in templates/cli-basic/.

  • Updated package.json to include a new command for scaffolding.

How to test

  • Run pnpm scaffold:cli -- --name=my-cli --description="What it does" to create a new CLI project.

  • Verify that the new project structure is created under src/cli/my-cli/.

  • Check that the generated files contain the correct placeholders and instructions.

Security review

  • Secrets / env vars: not changed.

  • Auth / session: not changed.

  • Network / API calls: not changed.

  • Data handling / PII: not changed.

  • Dependencies: not changed.

No security-impacting changes identified.

  • No new dependencies and no network calls.

  • No env var changes and no auth/session logic touched.

- Implement scaffolding script to create new CLI projects
- Add README and CHECKLIST templates for new CLIs
- Update package.json with new scaffold command
Copilot AI review requested due to automatic review settings January 24, 2026 12:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a CLI scaffolding workflow so new CLI entrypoints can be created consistently with shared patterns, documentation, and guidance.

Changes:

  • Update tsconfig.json to typecheck the new scripts/ scaffolding script and templates/ source files.
  • Add a cli-basic template (TypeScript entrypoint, README, checklist) that follows existing logger/parseArgs/Zod conventions.
  • Add a scaffold:cli package script and update AGENTS.md with instructions and a rule to standardize new CLI creation.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tsconfig.json Expands the TypeScript include set to cover scripts/ and templates/, ensuring the scaffold script and template entrypoint are typechecked.
templates/cli-basic/main.ts Provides a minimal CLI entrypoint template wired to Logger, parseArgs, and Zod, matching patterns used in existing CLIs.
templates/cli-basic/README.md Supplies a template README describing how to run the generated CLI, its arguments, and output location.
templates/cli-basic/CHECKLIST.md Adds a post-scaffold checklist guiding follow-up steps, structure, and pre-commit checks for new CLIs.
scripts/scaffold-cli.ts Implements the CLI scaffolding logic (name validation, target directory checks, placeholder substitution, and file generation) based on the cli-basic template.
package.json Registers the scaffold:cli script that runs the scaffolding tool via node:tsx.
AGENTS.md Documents how to use pnpm scaffold:cli and establishes a rule to use the scaffold for all new CLIs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Change placeholders from double underscores to single underscores
- Ensure consistency across scaffolded CLI files
@valuecodes valuecodes merged commit ef9b71d into main Jan 24, 2026
4 checks passed
@valuecodes valuecodes deleted the scaffold-cli branch January 24, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants