Skip to main content

generate shell commands from scripts

Project description

Installation

$ [sudo] pip install commands-generator

Features

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

How it works

scripts (shebang #! required):

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

generated commands:

namespace:script
namespace:subnamespace:script

Config

~/.bashrc:

export PATH=path/to/commands:$PATH

CLI

usage: commands-generator scripts_dir commands_dir

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 projects

readme-generator

Project details


Release history Release notifications

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
commands_generator-2019.3.9-py2.py3-none-any.whl (2.0 kB) Copy SHA256 hash SHA256 Wheel py2.py3
commands-generator-2019.3.9.tar.gz (1.9 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page