cli-boilerplate

npx @greenarmor/cli-boilerplate

@greenarmor/cli-boilerplate

GitHub Pages

Use the prebuilt cli inside an existing web application, or rebrand this boilerplate to create your own CLI with extra automation tools. Rebranding aims to boost automation for web app development and is perfect for DevOps workflows.


Features


Generators

Built-in scaffolding for:

Framework-Aware Templates

Generators automatically select templates based on your project’s framework. The CLI inspects package.json for dependencies like React, Vue, or Angular and loads files from templates/<framework>. Override detection with the --framework flag:

cli generate:component Button --framework vue

If no framework is detected, the generators fall back to templates/default.


CLI Tooling

Version Bump

cli-bump

Supports:


GitHub Release Automation

To create a release on GitHub:

export GITHUB_TOKEN=ghp_YourTokenHere
node scripts/release-to-github.js

Semantic Release via CI

This project includes semantic-release support out of the box:

Requirements:


License

MIT — Customize and distribute freely under your own CLI brand.


Quick Start

Choose the workflow that fits your needs.

Use cli in an existing project

npm install -g @greenarmor/cli-boilerplate
cd path/to/your-existing-project
cli generate:component Button

The generators detect your framework and drop files into your project automatically.

Rebrand and extend your own CLI

  1. Set Git identity (optional but recommended):
git config --global user.name "your_github_username"
git config --global user.email "your_email@example.com"
  1. Scaffold a new CLI, ready to receive more automation tools:
npx @greenarmor/cli-boilerplate my-cli
  1. (Optional) Include extras during creation:
npx @greenarmor/cli-boilerplate my-cli --with-emoji --full-stack
  1. Link and try your branded CLI:
cd my-cli
npm install
npm link
my-cli --help

Built by @greenarmor