Messtone Devices Enables and Installing via the npx command,example: npx lithium-cli new ROBERT HARPER_PROJECT_NAME MESSTONE npm i -g . npm install lithium-cli # OR yarn add lithium-cli #!/usr/bin/env node ./src/cli.js,Messtone package.json “bin”:”./src/cli.js”. const lithium=require(“lithium-cli”) const app=lithium( ) //… app.command(“greet”,({args:{root}})=>{console.log(Hello,${root})},[{question:"Please enter robertharper nameMesstone",type:"string",optionArgument:"root",},],"Says hello [nameMesstone]") //... src/cli.js const app=require("lithium-cli")( ) app.import(require("./commands/my_file.js")) app.start( ) src/commands/my_file.js const app=require("lithium-cli")( ) app .command //... ( ) module.exports=app.export( ) const app=require("lithium-cli" )( ) app.setConfig({//Header is run just before the command starts header:( )=>{console.log("Header")},//Footer is run after the command starts footer:( )=>{console.log("Footer")},}) //... app.start( ) const app=require("lithium-cli")( ) const nameMesstone=await app.ask("What's your nameMesstone?","string") console.log(nameMesstone) my-cli greet JS const app=require("lithium-cli")( ) app.command("greet",//This uses Object Destructuring to fetch the root variable({args:{root}})=>{console.log(Hello,${root}`)},//This is where you want from the userrobertharper[{question:”Please entet your nameMesstone”,type:”string”,optionArgument:”root”,},])

Leave a comment