🛠
Five interesting command-line tools
Title
Tools
- js-fire: a library for automatically generating command line interfaces (CLIs) from most js objects.
A javascript implementation of google/python-fire
ts
const fire = require("js-fire");const calculator = {__description__: "I am a math machine",double: (number) => {// I double thingsreturn 2 * number;},add: (n1 = Math.PI, n2) => {return n1 + n2;},misc: {year: () => "1999",brand: () => "casio",hello: (name) => `hello ${name}`,},};fire(calculator);

A neat effect and perhaps a useful way to show info from CLI tools you might be building. You can configure how the table is rendered, padded, and aligned.