/c

✍️ Write CLI scripts easily in Typescript

Primary LanguageTypeScript

c

A somewhat more sane method of writing CLI scripts in typescript.

  • 🤘 easily write scripts; just create basic js scripts with full commander.js support
  • 🛂 full typescript support, no extra config required!
  • ⌨️ supports shell autocomplete for commands
  • 🗄️ nest commands and subcommands, you control how everything is organized

Note that only zsh is currently supported - adding support for bash/fish/whatever should be relatively easy. Follow instructions on what to change and open a PR.

Installation

To install, run:

bash <(curl -s https://raw.githubusercontent.com/catc/c/master/scripts/init.sh ) install

This will git clone the repo, yarn/npm install, prompt you for the CLI bin name and add it to your path.

Getting started

Just run c new to create a new command. If you're using vscode (and your path supports code), you can also do c dev to open the commands/ dir for easy development.

Built in commands

c new

Creates new command and generates file, prompts for command name.

c implode

Removes from path and deletes repo.

c dev

Opens commands/ folder in vscode for development.