Skip to content

What is cbf?

Joshua Vernon edited this page Jan 3, 2020 · 1 revision

cbf 🦥 is a bit meta 🤦‍♂️. It's basically a CLI for CLIs. It allows you to define a CLI with a yml or json file. Then you can save that in your project's repo or just run it in your daily activities.

Why?

I love working in the terminal and I love CLIs. So I write a lot of them and it gets tiring. So I decided to make a tool that would make it easier and I figured it'd be nice to have a generic format for a CLI I could commit to my projects repositories

What is cbf?

cbf is a tool that runs cbf scripts. cbf scripts are yml or json files that define the behavior a CLI.

cbf scripts can be simple or advanced.

Simple scripts

Simple scripts are made up of options and commands.

  1. The first tag is required and is the scripts name
  2. options are stored as keys
  3. commands are stored as values

Advanced scripts

Advanced scripts are made up of option's, command's, variables, message's and directory's

  1. The first tag is required and is the scripts name
  2. option tags are used to store lists of more options or command's
  3. command tags are used to store one or many strings containing shell commands
  4. variables tags are used to prompt the user for variables to be replaced in a command
  5. message tags are used to store messages that are printed to stdout when an option or command is selected
  6. directory tags are used to set where a command should be run. When a command is run, CBF recursively searches for the commands set directory or closest set parent directory tag

Check out cbf's 🦥 site to get started!

Clone this wiki locally