8000 GitHub - soanvig/cli-file: Tool for easy and programming language-agnostic command-line interfaces for executing commands.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Tool for easy and programming language-agnostic command-line interfaces for executing commands.

Notifications You must be signed in to change notification settings

soanvig/cli-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cli-file

Alpha version, API subjected to change

Tool for easy and programming language-agnostic command-line interfaces for executing commands. It's built to provide accessible and extensible interface to building projects, running tests, managing deployments and so on, without relying on poor tools like npm scripts.

It offers domain-specific language - configuration file containing lines with commands like:

myEcho :: value = "World" -> echo Hello $value

that can be executed using

cli-file myEcho resulting in Hello World

or

cli-file myEcho John resulting in Hello John

Any shell command can be called that way.

How to use

By default cli-file looks for a file commands.cli in current directory. That is the file containing configured commands.

Syntax:

  1. Command without any arguments: myEcho -> echo Hello World
  2. Command with required argument: myEcho :: value -> echo Hello $value
  3. Command with optional argument: myEcho :: value = "World" -> echo Hello $value
  4. Command with multiple arguments: myEcho :: first, second = "World" -> echo $first $second
  5. Comment (only on newline): # This is comment

At this point cli-file doesn't support default values longer than one word (on TODO list).

cli-file substitutes only known $param names, therefore if there is any conflict between a parameter name, and shell variable, just use different name for the parameter.

Switches

  1. -c <file location> or --commands <file location> - change default commands file location (e.g. cli-file -c /tmp/commands myEcho John)
  2. -h or --help - (needs to be first) show help
  3. -v or --version - (needs to be first) print version

About

Tool for easy and programming language-agnostic command-line interfaces for executing commands.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0