Skip to content

cli-sh/cli-sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cli-sh

            /$$ /$$                   /$$
           | $$|__/                  | $$
   /$$$$$$$| $$ /$$          /$$$$$$$| $$$$$$$
  /$$_____/| $$| $$ /$$$$$$ /$$_____/| $$__  $$
 | $$      | $$| $$|______/|  $$$$$$ | $$  \ $$
 | $$      | $$| $$         \____  $$| $$  | $$
 |  $$$$$$$| $$| $$         /$$$$$$$/| $$  | $$
  \_______/|__/|__/        |_______/ |__/  |__/

  A minimal, customizable CLI written in shell
              cli-sh.dev | v0.5.0

Installation

  1. Copy the cli script to your project root and make it executable.

    chmod +x ./cli

Usage

  1. Create a run directory in your project.

    mkdir run
  2. Create a script for your command in the run directory.

    echo '#!/bin/sh' >> run/hello
    echo 'echo hello world!' >> run/hello
    chmod +x run/hello
  3. Run your command.

    ./cli run/hello

Convention over Configuration

This minimal cli uses a convention over configuration approach. This means that you can use it without any configuration, but you can also customize it to your needs.

Features

Filesystem routing

Use transparent filesystem routing for cli command structures.

Example

Directory commands

Use commands with the same name as the directory to implement directory commands.

Example

Wildcard commands

Use wildcard paths to execute all matching commands.

Example

Flexible commands

Use any executable or script as building blocks for your cli commands.

Example

Pass command arguments

Pass any arguments to the executed command.

Example

Shell autocompletion

Use out-of-the-box autocompletion in all shell environments.

Example

Display available commands

Use the default command to display all available commands.

Example

Hooks

Use hooks to intercept, extend and alter command execution.

Example

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages