Skip to main content

generate shell commands from scripts

Project description

Installation

$ [sudo] pip install commands-generator
$ [sudo] npm i -g commands-generator

How it works

scripts (shebang #! required):

namespace/script.py
namespace/subnamespace/script.sh

generated commands:

namespace:script
namespace:subnamespace:script

Features

  • generate shell commands from scripts
  • shell namespaces - namespace:command. folder names as namespaces

Config

~/.bashrc:

export PATH=path/to/commands:$PATH

Examples

generate ~/.local/share/bin from dotfiles/scripts:

dotfiles/scripts/git/commit.sh
dotfiles/scripts/files/python/setup.cfg/create.sh
dotfiles/scripts/web/github.com/push.sh
$ cd path/to/dotfiles
$ commands-generator scripts ~/.local/share/bin

generated commands:

~/.local/share/bin/git:commit
~/.local/share/bin/files:python:setup.cfg:create
~/.local/share/bin/web:github.com:push

usage:

$ files:python:requirements.txt:create
$ git:commit
$ web:github.com:push

Related

readme42.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for commands-generator, version 2020.12.3
Filename, size File type Python version Upload date Hashes
Filename, size commands-generator-2020.12.3.tar.gz (2.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page