Skip to content

About

🧰 Scaffold a zero-dependency Node.js CLI in seconds β€” flags or git-style subcommands, colours, node:test tests, README, MIT LICENSE, CI on 3 OS Γ— Node 18/20/22, git init. The template behind every Prism CLI. By Prism Protocol

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Prism Create CLI

Typing SVG

CI Node.js Zero dependencies License

Prism Create CLI screenshot

⚑ Overview

Prism Create CLI (create-prism-cli) is the starter behind the Prism CLIs. Answer four questions (or pass flags) and you get a working, tested, zero-dependency Node.js command-line tool: argument parsing with node:util parseArgs, colours that respect NO_COLOR, proper exit codes, node:test tests that already pass, a README, an MIT license and a GitHub Actions matrix. Pick basic for a single command with flags or commands for git-style subcommands.

✨ Features

  • Two templates: basic (flags, positional args, JSON output) and commands (add / list subcommands with per-command help)
  • Zero dependencies in the generated project β€” only Node built-ins
  • Tests included with node:test, passing out of the box (--test verifies)
  • CI matrix: Ubuntu, Windows, macOS Γ— Node 18 / 20 / 22
  • README, MIT LICENSE (author from git), .editorconfig, .gitignore, git init + first commit
  • Interactive prompts, or fully scripted with -y and flags

πŸš€ Quick Start

# run without installing
npx github:krishyaa06/prism-create-cli my-cli

# or install globally
npm install -g github:krishyaa06/prism-create-cli
create-prism-cli my-cli -t commands

Requires Node.js 18.17+. No dependencies.

πŸ› οΈ Usage

create-prism-cli [dir] [options]      asks for anything missing (unless -y)

  -n, --name <pkg>        package name (default: folder name)
  -b, --bin <cmd>         command name
  -d, --desc <text>       one-line description
  -t, --template <t>      basic | commands
  -a, --author <name>     author (default: git user.name)
  -r, --repo <owner/repo> GitHub repo for package.json + README
      --no-git            skip git init + first commit
      --test              run the generated tests
  -y, --yes               accept defaults, no prompts
  -f, --force             write into a non-empty folder

What you get (basic)

my-cli/
β”œβ”€β”€ .github/workflows/ci.yml
β”œβ”€β”€ bin/my-cli.js        parseArgs, help, exit codes
β”œβ”€β”€ src/index.js         your logic (pure, testable)
β”œβ”€β”€ src/colors.js        NO_COLOR-aware colours
β”œβ”€β”€ test/my-cli.test.js  node:test
β”œβ”€β”€ README.md  LICENSE  package.json  .editorconfig  .gitignore

πŸ“ Project Structure

prism-create-cli/
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ logo.png
β”‚   └── logo.svg
β”œβ”€β”€ bin/
β”‚   └── create-prism-cli.js   # CLI entry
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.js   # scaffold + git init
β”‚   β”œβ”€β”€ templates.js   # generated files (basic / commands)
β”‚   └── ui.js   # colours, tables
β”œβ”€β”€ test/
β”‚   └── create.test.js
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE
└── package.json

πŸ§ͺ Tests

npm test

Tests use the built-in node:test runner, so there is nothing to install. CI runs them on Node 20 and 22.

🀝 Contributing

  1. Fork the repo and create a branch: git checkout -b feature/my-idea
  2. Make your change and add a test in test/
  3. Run npm test and open a Pull Request

πŸ”· Part of Prism Protocol

Prism Create CLI is one of the open-source tools built by Prism Protocol, a tech community where young builders learn, ship and compete together.

πŸ‘€ Author

Soumya Bhandare
Soumya Bhandare

Founder @ Prism Protocol
Discord
Instagram
X

πŸ“„ License

Released under the MIT License.

If you like this project, consider giving it a ⭐
"Build. Create. Compete." · Made with ⚑ by Prism Protocol

About

🧰 Scaffold a zero-dependency Node.js CLI in seconds β€” flags or git-style subcommands, colours, node:test tests, README, MIT LICENSE, CI on 3 OS Γ— Node 18/20/22, git init. The template behind every Prism CLI. By Prism Protocol

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages