A modern and elegant approach to
creating, managing and running
scripts with code.

npm install --save-dev bluecodex

Just plain code...

Loops, if-statements, async/await... everything you're used to is available to you.

const paths = await $.glob('src/**/*.tsx')

for (const path of paths) {
    const text = await $.readFile(path);
    if(...) // Do my thing
}

... and dockblocks

  • Documentation in the code

    Make it easy for your teammates to learn as they go.
  • Automatic input validation and collection

    The user can call the script as a single command, or interactively fill out the necessary data.
  • Use code if you need to

    If you have advanced use cases for collecting input that don't fit into a dockblock, just write code for it.
/**
 * @alias g component
 *
 * @description
 * Create files for a new UI component
 *
 * @argv name, string, required
 * 
 * @option module, string
 * :choice cms
 * :choice dashboard
 * 
 * Module where component will be placed 
 */
export const generate: ...

Interactive and discoverable

Easy to use for everyone on your team, specially the newcomers

Commands are discoverable and interactive out of the box, so there's no need to know everything beforehand.

You can even create tutorials to help people with onboarding.

npx bcx list

Delightful experience

Bluecodex offers, out of the box, a command to generate types for your scripts. This will help you both with type-safety and intellisense for consuming inputs and intellisense.

npx bcx gen types

Embedded toolkit

Bluecodex comes with several embedded commands to give you a head start.

Common tasks such as reading and saving files, consuming templates, downloading and uploading files are a breeze.

npx bcx kit

Adoption at your own pace

Whether you're starting a new project, or have a large codebase on your hands, we got you covered.

To get started, you can create commands to define inputs and documentation, then call your existing scripts.

npx bcx new cmd --shell
/**
 * @description
 * Add a description so your teammates
 * know what's up.
 * 
 * @argv action, string
 * 
 * @option color, string
 * 
 * @return string
 */
export const myScript = ({ bcxArgv }) =>
  $.shell(`path/to/_my-script_ ${bcxArgv}`)
---- // ----

Let me know what you think!

Bluecodex is in active development and I would love to hear from you.

📣 https://github.com/bluecodex/bluecodex
🐦 @bluecodex-dev
📧 contact [at] bluecodex.dev
npm install --save-dev bluecodex
---- // ----