@melcher/mmm-cli
v1.0.2
Published
A hello world TypeScript CLI demonstrating subcommands, interactive prompts, config persistence, colored output, and error handling.
Downloads
254
Readme
mmm-cli
A hello world TypeScript CLI demonstrating subcommands, interactive prompts, config persistence, colored output, and error handling.
Installation
npm install -g @melcher/mmm-cliOnce installed, the mmm command will be available globally.
Commands
mmm hello
Greets you by name. Uses your saved config if set up, otherwise defaults to "World".
mmm hello
# Hello, Max! 👋
mmm hello --name Alice
# Hello, Alice! 👋mmm goodbye
Says goodbye. Defaults to "World" if no name is provided.
mmm goodbye --name Alicemmm setup
Interactive setup that saves your name and favorite color to ~/.mmm/config.json.
mmm setupmmm fetch
Simulates an API call with a spinner and colored output.
mmm fetchmmm fail
Demos clean error handling and exit codes.
mmm fail
# ✖ Error: Something went wrong!
echo $?
# 1Development
# Clone the repo
git clone https://github.com/melchermaxwell/mmm-cli.git
cd mmm-cli
# Install dependencies
npm install
# Run without building
npm run dev -- hello
# Build
npm run build
# Run built output
npm start