<commit_before># NAME

rerun - a simple command runner because it's easy to forget 
standard operating procedure.

# SYNOPSYS

	rerun [-h][-v][-V] [-M <dir>] [-L <dir>] [--checklog <file>] [module:[command [command_args]]]

# DESCRIPTION

Rerun is a lightweight tool building framework useful for those that 
implement management procedure with shell scripts. Rerun will help you
organize your implementation into well defined modular interfaces.
Collections of management modules can be archived and delivered as
a single executable to facilitate team hand offs.

Rerun provides two interfaces:

1. Listing: `rerun` lists modules and commands. Listing
information includes name, description and command line usage syntax.
2. Execution: Rerun provides option processing (possibly defaulting
unspecified arguments) and executes the specified module command.

For the module developer, rerun is a trivial framework following
simple conventions that easily fit in a shell context.
Rerun includes a module development tool called "stubbs" that
helps create and evolve rerun modules. Stubbs contains
commands to automate option processing code and metadata definition.

Internally, rerun implements a simple dispatching mechanism to look up named
commands and execute them. *Commands* are logically named and
have a corresponding script.

Commands reside in a module and can have named command line 
parameters called *options*. Each option is named and 
described and also be defined to have a default value 
or whether it is required input.

Rerun modules can optionally declare metadata describing name, description
and other aspects of each command. Rerun makes use of this metadata
to support a listing mode, a feature where modules and command usage
are summarized for end users.

See the [project wiki](https://github.com/dtolabs/rerun/wiki)
for additional documentation including:

* [Getting started](https://github.com/dtolabs/rerun/wiki)
* [Installation](https://github.com/dtolabs/rerun/wiki/Installation)
* [stubbs module tool](https://github.com/dtolabs/rerun/tree/master/modules/stubbs)
* [Why rerun?](https://github.com/dtolabs/rerun/wiki/Why-rerun%3F)

# OPTIONS

`-h`
: Print help and usage then exit.

`--checklog *LOG*`
: Compare the results of an execution to those of a previous command log and show the diff

`-M` *DIRECTORY*
: Module library directory path.

`-L` *DIRECTORY*
: Log directory path.

`-v` 
: Execute command in verbose mode. 

`-V` 
: Execute command and rerun in verbose mode. 


# USING

## Listing

Without arguments, `rerun` will list existing modules:

    $ rerun
    [modules]
      freddy: "A dancer in a red beret and matching suspenders"
<commit_msg>added Help section<commit_after># NAME

rerun - a simple command runner because it's easy to forget 
standard operating procedure.

# SYNOPSYS

	rerun [-h][-v][-V] [-M <dir>] [-L <dir>] [--checklog <file>] [module:[command [command_args]]]

# DESCRIPTION

Rerun is a lightweight tool building framework useful for those  
implementing management procedure with shell scripts. Rerun will help you
organize your implementation into well defined modular interfaces.
Collections of management modules can be archived and delivered as
a single executable to facilitate team hand offs.
Using the "stubbs" module, rerun will even facilitate unit tests.

Rerun provides two interfaces:

1. Listing: Rerun lists modules and commands. Listing
information includes name, description and command line usage syntax.
2. Execution: Rerun provides option processing (possibly defaulting
unspecified arguments) and executes the specified module command.

For the module developer, rerun is a trivial framework following
simple conventions that easily fit in a shell context.
Rerun includes a module development tool called "stubbs" that
helps create and evolve rerun modules. Stubbs contains
commands to automate option processing code, metadata definition
and unit testing.

Internally, `rerun` implements a simple dispatching mechanism to look up named
commands and execute them. *Commands* are logically named and
have a corresponding script.

Commands reside in a module and can have named command line 
parameters called *options*. Each option is named and 
described and can also be defined to use a default value 
or whether it is required or not.

Rerun modules can optionally declare metadata describing name, description
and other aspects of each command. Rerun makes use of this metadata
to support a listing mode, a feature where modules and command usage
are summarized for end users.

See the [project wiki](https://github.com/dtolabs/rerun/wiki)
for additional documentation including:

* [Getting started](https://github.com/dtolabs/rerun/wiki)
* [Installation](https://github.com/dtolabs/rerun/wiki/Installation)
* [Stubbs module tool](https://github.com/dtolabs/rerun/tree/master/modules/stubbs)
* [Why rerun?](https://github.com/dtolabs/rerun/wiki/Why-rerun%3F)

# OPTIONS

`-h`
: Print help and usage then exit.

`--checklog *LOG*`
: Compare the results of an execution to those of a previous command log and show the diff

`-M` *DIRECTORY*
: Module library directory path.

`-L` *DIRECTORY*
: Log directory path.

`-v` 
: Execute command in verbose mode. 

`-V` 
: Execute command and rerun in verbose mode. 


# USING

## Help

For syntax and example usage execute `rerun` using the `-help` flag:

	$ ./rerun -help
	 _ __ ___ _ __ _   _ _ __
	| '__/ _ \ '__| | | | '_ \ 
	| | |  __/ |  | |_| | | | |
	|_|  \___|_|   \__,_|_| |_|
	Version: v0.1. License: Apache 2.0.

	Usage: rerun [-h][-v][-V] [-M <dir>] [-L <dir>] [--checklog <file>] [module:[command [command_args]]]

	Examples:
	| $ rerun 
	| => List all modules.
	| $ rerun freddy
	| => List all freddy commands.
	| $ rerun freddy:dance -jumps 3
	| => Execute the freddy dance command.


## Listing

Without arguments, `rerun` will list existing modules:

    $ rerun
    [modules]
      freddy: "A dancer in a red beret and matching suspenders"

{'fraction_non_alphanumeric': 0.08316666666666667, 'fraction_numerical': 0.0018333333333333333, 'mean_word_length': 4.287224669603524, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 15, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '845900', 'n_tokens_mistral': 1788, 'n_tokens_neox': 1697, 'n_words': 749}