Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CLI JS Template

Cookiecutter template for creating TypeScript CLI packages with a small library API.

Use

cookiecutter gh:mintyPT/cli-js-template
cd my-cli
npm test
npm run build

Generated projects include:

  • TypeScript configured for ESM
  • Commander-based CLI entry point
  • tsup build output with declarations
  • Vitest tests
  • npm package dry-run verification
  • npm dependency installation and lockfile generation during project creation
  • GitHub Actions for CI and npm publish
  • Release checklist and first-time npm publishing instructions

Template Verification

The template repository includes a smoke test that renders a sample project and runs its generated checks:

node scripts/smoke-test.mjs

Template Variables

  • project_name: Human-readable project name.
  • project_slug: Folder and default repository name.
  • package_name: npm package name, scoped or unscoped.
  • cli_name: executable command exposed by npm.
  • source_dir: source folder, defaults to src.
  • description: package description.
  • author_name: package author.
  • github_owner: GitHub owner or organization.
  • github_repo: repository name.
  • license: package license.
  • node_version: minimum Node.js major version.
  • npm_access: npm publish access mode.

About

Cookiecutter template for TypeScript CLI packages.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages