Skip to content

foysavas/cli-calls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cli-calls

npm i cli-calls

Quickly turn a JavaScript file into a CLI.

Step 1: add a function that takes in a single object of args, for example:

function main({name}) {
  console.log(`hello ${name}!`);
}

Step 2: add cli-calls to your file:

import cliCalls from 'cli-calls';
await cliCalls(import.meta, main);

Step 3: run the file from your cli

node ./main.mjs --name world
hello world!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors