A tool to automatically generate CLIs from a folder of command scripts.
npm install -g @mckinleymedia/cli-makercli-maker <name> [options]-c, --commands <path>- Path to commands directory (default:./commands)-t, --typescript- Generate TypeScript CLI (default: false)-h, --help- Show help-V, --version- Show version
# Generate a CLI called "mycli" from the example-commands folder
cli-maker mycli -c ./example-commands
# The CLI is immediately ready to use!
mycli --help
mycli hello World- Command Discovery: cli-maker scans your commands directory for scripts (
.sh,.js,.ts,.py) - Description Extraction: It extracts descriptions from comments in your scripts (format:
# Description: Your description here) - CLI Generation: Creates a fully functional Node.js CLI with:
- Command routing
- Interactive mode with arrow key navigation
- Colored output
- Automatic argument detection
- Help menu
- Support for multiple script types
- Automatic Installation: The CLI is installed globally with no manual steps required
Your command scripts should include a description comment:
#!/usr/bin/env bash
# Description: This is what my command does
# Your script logic here
echo "Hello from my command!"The generated CLI includes:
- Direct command execution:
mycli <command> [args] - Interactive mode: Just run
mycliwithout arguments- Arrow key navigation
- Colored command list
- Automatic argument prompting for commands that need them
- Help menu:
mycli --help - Automatic script type detection (bash, node, ts-node, python3)
- Smart argument detection - knows which commands accept arguments
MIT