Commands

The Bash Tools Framework provides several command-line tools for linting, building, and managing bash projects.

1. Compile command

The framework works with bash-compiler, a GoLang implementation that generates standalone executables from YAML definitions.

1.1. Usage

Using bash-compiler binary:

export PATH=$PATH:/home/wsl/fchastanet/bash-compiler/bin
FRAMEWORK_ROOT_DIR=$(pwd) bash-compiler \
  src/_binaries/shellcheckLint/shellcheckLint-binary.yaml

Using Go interpreter (must be executed from bash-compiler folder):

export FRAMEWORK_ROOT_DIR=/home/wsl/fchastanet/bash-dev-env/vendor/bash-tools-framework
go run ./cmd/bash-compiler "${FRAMEWORK_ROOT_DIR}/src/_binaries/shellcheckLint/shellcheckLint-binary.yaml"

Compile all *-binary.yaml files at once:

export FRAMEWORK_ROOT_DIR=/home/wsl/fchastanet/bash-dev-env/vendor/bash-tools-framework
go run ./cmd/bash-compiler $(find "${FRAMEWORK_ROOT_DIR}/src/_binaries" -name '*-binary.yaml' -print)

See Bash Compiler documentation for more information.

1.2. Example: Creating a Command

To create a new command using the framework:

  1. Create a YAML definition in src/_binaries/myCommand/myCommand-binary.yaml
  2. Define the command’s options and main script
  3. Compile using bash-compiler
  4. The generated binary will be placed in bin/myCommand

See the framework command template for a starting point.

2. Build Tools

2.1. bin/installRequirements

bin/installRequirements script will install the following libraries inside vendor folder:

bin/doc script will install:

Dependencies are automatically installed when first used. To avoid checking for libraries update and have an impact on performance, a file is created in vendor dir.

  • vendor/.shdocInstalled
  • vendor/.batsInstalled

You can remove these files to force the update of the libraries, or just wait 24 hours for the timeout to expire 😉

SYNOPSIS:
    Installs requirements.

USAGE: installRequirements [OPTIONS]
USAGE: installRequirements [--help|-h] [--config]
  [--bash-framework-config <bash-framework-config>] [--verbose|-v] [-vv] [-vvv]
  [--log-level <log-level>] [--log-file <log-file>]
  [--display-level <display-level>] [--no-color] [--theme <theme>] [--version]
  [--quiet|-q]

GLOBAL OPTIONS:
  --help, -h {single}
    Displays this command help
  --config {single}
    Displays configuration
  --bash-framework-config <bash-framework-config> {single}
    Use alternate bash framework configuration.
  --verbose, -v {single}
    Info level verbose mode (alias of --display-level INFO)
  -vv {single}
    Debug level verbose mode (alias of --display-level DEBUG)
  -vvv {single}
    Trace level verbose mode (alias of --display-level TRACE)
  --log-level <log-level> {single}
    Set log level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: OFF
  --log-file <log-file> {single}
    Set log file
    Default value: /bash/bin/logs/installRequirements.log
  --display-level <display-level> {single}
    Set display level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: INFO
  --no-color {single}
    Produce monochrome output. alias of --theme noColor.
  --theme <theme> {single}
    Choose color theme - default-force means colors will be produced even if
    command is piped.
    Possible values: 
      - default
      - default-force
      - noColor
    Default value: default
  --version {single}
    Print version information and quit.
  --quiet, -q {single}
    Quiet mode, doesn't display any output.


DESCRIPTION:
Installs requirements:

- bats
- hadolint
- shellcheck

VERSION: 3.0

AUTHOR: [François Chastanet](https://github.com/fchastanet)

SOURCE FILE: https://github.com/fchastanet/bash-tools-framework/tree/master/src/_binaries/installRequirements/installRequirements-binary.yaml

LICENSE: MIT License
Copyright (c) 2024-now François Chastanet

2.2. bin/findShebangFiles

Find files with shebang in a directory.

SYNOPSIS:
    find all shebang files of this repository

USAGE: findShebangFiles [OPTIONS]
USAGE: findShebangFiles [--help|-h] [--config]
  [--bash-framework-config <bash-framework-config>] [--verbose|-v] [-vv] [-vvv]
  [--log-level <log-level>] [--log-file <log-file>]
  [--display-level <display-level>] [--no-color] [--theme <theme>] [--version]
  [--quiet|-q]

GLOBAL OPTIONS:
  --help, -h {single}
    Displays this command help
  --config {single}
    Displays configuration
  --bash-framework-config <bash-framework-config> {single}
    Use alternate bash framework configuration.
  --verbose, -v {single}
    Info level verbose mode (alias of --display-level INFO)
  -vv {single}
    Debug level verbose mode (alias of --display-level DEBUG)
  -vvv {single}
    Trace level verbose mode (alias of --display-level TRACE)
  --log-level <log-level> {single}
    Set log level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: OFF
  --log-file <log-file> {single}
    Set log file
    Default value: /bash/bin/logs/findShebangFiles.log
  --display-level <display-level> {single}
    Set display level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: INFO
  --no-color {single}
    Produce monochrome output. alias of --theme noColor.
  --theme <theme> {single}
    Choose color theme - default-force means colors will be produced even if
    command is piped.
    Possible values: 
      - default
      - default-force
      - noColor
    Default value: default
  --version {single}
    Print version information and quit.
  --quiet, -q {single}
    Quiet mode, doesn't display any output.


DESCRIPTION:
Display list of all files having a bash shebang in the current repository.

You can apply a command to all these files by providing arguments

Example: Add execution bit to all files with a bash shebang
findShebangFiles chmod +x

VERSION: 3.0

AUTHOR: [François Chastanet](https://github.com/fchastanet)

SOURCE FILE: https://github.com/fchastanet/bash-tools-framework/tree/master/src/_binaries/findShebangFiles/findShebangFiles-binary.yaml

LICENSE: MIT License
Copyright (c) 2023-now François Chastanet

2.3. bin/buildPushDockerImage

Build and push Docker images with proper tagging and caching.

SYNOPSIS:
    Lint bash files using shellcheck.

USAGE: buildPushDockerImage [OPTIONS]
USAGE: buildPushDockerImage [--help|-h] [--config]
  [--bash-framework-config <bash-framework-config>] [--verbose|-v] [-vv] [-vvv]
  [--log-level <log-level>] [--log-file <log-file>]
  [--display-level <display-level>] [--no-color] [--theme <theme>] [--version]
  [--quiet|-q] [--push] [--vendor <vendor>] [--bash-version <bash-version>]
  [--bash-base-image <bash-base-image>]

GLOBAL OPTIONS:
  --help, -h {single}
    Displays this command help
  --config {single}
    Displays configuration
  --bash-framework-config <bash-framework-config> {single}
    Use alternate bash framework configuration.
  --verbose, -v {single}
    Info level verbose mode (alias of --display-level INFO)
  -vv {single}
    Debug level verbose mode (alias of --display-level DEBUG)
  -vvv {single}
    Trace level verbose mode (alias of --display-level TRACE)
  --log-level <log-level> {single}
    Set log level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: OFF
  --log-file <log-file> {single}
    Set log file
    Default value: /bash/bin/logs/buildPushDockerImage.log
  --display-level <display-level> {single}
    Set display level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: INFO
  --no-color {single}
    Produce monochrome output. alias of --theme noColor.
  --theme <theme> {single}
    Choose color theme - default-force means colors will be produced even if
    command is piped.
    Possible values: 
      - default
      - default-force
      - noColor
    Default value: default
  --version {single}
    Print version information and quit.
  --quiet, -q {single}
    Quiet mode, doesn't display any output.

OPTIONS:
  --push {single}
    if provided, push the image to the registry
  --vendor <vendor> {single}
    vendor image to use
    Possible values: 
      - alpine: alpine based docker image
      - ubuntu: ubuntu based docker image
    Default value: ubuntu
  --bash-version <bash-version> {single}
    version of bash to use
    Possible values: 
      - 4.4
      - 5.0
      - 5.1
      - 5.2
    Default value: 5.2
  --bash-base-image <bash-base-image> {single}
    bash bash image to use (eg: ubuntu:20.04, amd64/bash:4.4-alpine3.18)
    Default value: ubuntu:20.04


DESCRIPTION:
Pull, build and push docker image:
- pull previous docker image from docker hub if exists
- build new image using previous image as cache
- tag built image
- push it to docker registry

additional docker build options can be passed
  via DOCKER_BUILD_OPTIONS env variable

INTERNAL

VERSION: 3.0

AUTHOR: [François Chastanet](https://github.com/fchastanet)

SOURCE FILE: https://github.com/fchastanet/bash-tools-framework/tree/master/src/_binaries/buildPushDockerImage/buildPushDockerImage-binary.yaml

LICENSE: MIT License
Copyright (c) 2023-now François Chastanet

2.4. bin/doc

Generate markdown documentation for the framework from source code comments. This command:

  • Extracts shdoc annotations from .sh files
  • Generates comprehensive documentation
  • Creates function reference pages
SYNOPSIS:
    Generate markdown documentation.

USAGE: doc [OPTIONS]
USAGE: doc [--ci] [--help|-h] [--config]
  [--bash-framework-config <bash-framework-config>] [--verbose|-v] [-vv] [-vvv]
  [--log-level <log-level>] [--log-file <log-file>]
  [--display-level <display-level>] [--no-color] [--theme <theme>] [--version]
  [--quiet|-q]

OPTIONS:
  --ci {single}
    Activate continuous integration mode (tmp folder not shared with host)


GLOBAL OPTIONS:
  --help, -h {single}
    Displays this command help
  --config {single}
    Displays configuration
  --bash-framework-config <bash-framework-config> {single}
    Use alternate bash framework configuration.
  --verbose, -v {single}
    Info level verbose mode (alias of --display-level INFO)
  -vv {single}
    Debug level verbose mode (alias of --display-level DEBUG)
  -vvv {single}
    Trace level verbose mode (alias of --display-level TRACE)
  --log-level <log-level> {single}
    Set log level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: OFF
  --log-file <log-file> {single}
    Set log file
    Default value: /bash/bin/logs/doc.log
  --display-level <display-level> {single}
    Set display level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: INFO
  --no-color {single}
    Produce monochrome output. alias of --theme noColor.
  --theme <theme> {single}
    Choose color theme - default-force means colors will be produced even if
    command is piped.
    Possible values: 
      - default
      - default-force
      - noColor
    Default value: default
  --version {single}
    Print version information and quit.
  --quiet, -q {single}
    Quiet mode, doesn't display any output.


DESCRIPTION:
INTERNAL TOOL

VERSION: 3.0

AUTHOR: [François Chastanet](https://github.com/fchastanet)

SOURCE FILE: https://github.com/fchastanet/bash-tools-framework/tree/master/src/_binaries/doc/doc-binary.yaml

LICENSE: MIT License
Copyright (c) 2022-now François Chastanet

2.5. test.sh

Run unit tests using bats inside Docker container with needed dependencies.

# Run all tests on Ubuntu Bash 5.3
./test.sh scrasnups/build:bash-tools-ubuntu-5.3 -r src -j 30

# Run specific test file
./test.sh scrasnups/build:bash-tools-ubuntu-5.3 src/Array/contains.bats

# Run on different environments
./test.sh scrasnups/build:bash-tools-ubuntu-4.4 -r src -j 30
./test.sh scrasnups/build:bash-tools-ubuntu-5.0 -r src -j 30
./test.sh scrasnups/build:bash-tools-ubuntu-5.3 -r src -j 30
./test.sh scrasnups/build:bash-tools-alpine-4.4 -r src -j 30
./test.sh scrasnups/build:bash-tools-alpine-5.0 -r src -j 30
./test.sh scrasnups/build:bash-tools-alpine-5.3 -r src -j 30

3. Linters

3.1. bin/frameworkLint

Lint files of the current repository to ensure framework conventions are followed.

This linter is used in pre-commit hooks. See .pre-commit-config.yaml.

SYNOPSIS:
    Lint files of the current repository to ensure framework conventions
    are followed.


USAGE: frameworkLint [OPTIONS]
USAGE: frameworkLint [--help|-h] [--config]
  [--bash-framework-config <bash-framework-config>] [--verbose|-v] [-vv] [-vvv]
  [--log-level <log-level>] [--log-file <log-file>]
  [--display-level <display-level>] [--no-color] [--theme <theme>] [--version]
  [--quiet|-q] [--format <format>]
  [--expected-warnings-count <expected-warnings-count>]

GLOBAL OPTIONS:
  --help, -h {single}
    Displays this command help
  --config {single}
    Displays configuration
  --bash-framework-config <bash-framework-config> {single}
    Use alternate bash framework configuration.
  --verbose, -v {single}
    Info level verbose mode (alias of --display-level INFO)
  -vv {single}
    Debug level verbose mode (alias of --display-level DEBUG)
  -vvv {single}
    Trace level verbose mode (alias of --display-level TRACE)
  --log-level <log-level> {single}
    Set log level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: OFF
  --log-file <log-file> {single}
    Set log file
    Default value: /bash/bin/logs/frameworkLint.log
  --display-level <display-level> {single}
    Set display level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: INFO
  --no-color {single}
    Produce monochrome output. alias of --theme noColor.
  --theme <theme> {single}
    Choose color theme - default-force means colors will be produced even if
    command is piped.
    Possible values: 
      - default
      - default-force
      - noColor
    Default value: default
  --version {single}
    Print version information and quit.
  --quiet, -q {single}
    Quiet mode, doesn't display any output.

OPTIONS:
  --format <format> {single}
    Define output format of this command.
    Possible values: 
      - plain
      - checkstyle
    Default value: plain
  --expected-warnings-count <expected-warnings-count> {single}
    Specify expected warning count (default: 0)


DESCRIPTION:
Lint files of the current repository
  - check if all Namespace::functions are existing in the framework
  - check that function defined in a .sh is correctly named
  - check each function has a bats file associated

  - shdoc     - check that shdoc valid annotations are used
    - check that @require function matches naming convention and exists
    - check that at least @description is provided

VERSION: 3.0

AUTHOR: [François Chastanet](https://github.com/fchastanet)

SOURCE FILE: https://github.com/fchastanet/bash-tools-framework/tree/master/src/_binaries/frameworkLint/frameworkLint-binary.yaml

LICENSE: MIT License
Copyright (c) 2023-now François Chastanet

3.2. bin/dockerLint

Hadolint wrapper with automatic installation of hadolint.

SYNOPSIS:
    Lint docker files of the given directory using hadolint.

USAGE: dockerLint [OPTIONS] [ARGUMENTS]
USAGE: dockerLint [--help|-h] [--config]
  [--bash-framework-config <bash-framework-config>] [--verbose|-v] [-vv] [-vvv]
  [--log-level <log-level>] [--log-file <log-file>]
  [--display-level <display-level>] [--no-color] [--theme <theme>] [--version]
  [--quiet|-q]

ARGUMENTS:
  [hadolintArguments {list} (optional)]    hadolint arguments

GLOBAL OPTIONS:
  --help, -h {single}
    Displays this command help
  --config {single}
    Displays configuration
  --bash-framework-config <bash-framework-config> {single}
    Use alternate bash framework configuration.
  --verbose, -v {single}
    Info level verbose mode (alias of --display-level INFO)
  -vv {single}
    Debug level verbose mode (alias of --display-level DEBUG)
  -vvv {single}
    Trace level verbose mode (alias of --display-level TRACE)
  --log-level <log-level> {single}
    Set log level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: OFF
  --log-file <log-file> {single}
    Set log file
    Default value: /bash/bin/logs/dockerLint.log
  --display-level <display-level> {single}
    Set display level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: INFO
  --no-color {single}
    Produce monochrome output. alias of --theme noColor.
  --theme <theme> {single}
    Choose color theme - default-force means colors will be produced even if
    command is piped.
    Possible values: 
      - default
      - default-force
      - noColor
    Default value: default
  --version {single}
    Print version information and quit.
  --quiet, -q {single}
    Quiet mode, doesn't display any output.


DESCRIPTION:
- installs new hadolint version(>2.12.0) automatically
- lint this project files using default files filter

HADOLINT HELP:

hadolint - Dockerfile Linter written in Haskell

Usage: hadolint [-v|--version] [-c|--config FILENAME] [DOCKERFILE...] 
                [--file-path-in-report FILEPATHINREPORT] [--no-fail] 
                [--no-color] [-V|--verbose] [-f|--format ARG] [--error RULECODE]
                [--warning RULECODE] [--info RULECODE] [--style RULECODE] 
                [--ignore RULECODE] 
                [--trusted-registry REGISTRY (e.g. docker.io)] 
                [--require-label LABELSCHEMA (e.g. maintainer:text)] 
                [--strict-labels] [--disable-ignore-pragma] 
                [-t|--failure-threshold THRESHOLD]

  Lint Dockerfile for errors and best practices

Available options:
  -h,--help                Show this help text
  -v,--version             Show version
  -c,--config FILENAME     Path to the configuration file
  --file-path-in-report FILEPATHINREPORT
                           The file path referenced in the generated report.
                           This only applies for the 'checkstyle' format and is
                           useful when running Hadolint with Docker to set the
                           correct file path.
  --no-fail                Don't exit with a failure status code when any rule
                           is violated
  --no-color               Don't colorize output
  -V,--verbose             Enables verbose logging of hadolint's output to
                           stderr
  -f,--format ARG          The output format for the results [tty | json |
                           checkstyle | codeclimate | gitlab_codeclimate | gnu |
                           codacy | sonarqube | sarif] (default: tty)
  --error RULECODE         Make the rule `RULECODE` have the level `error`
  --warning RULECODE       Make the rule `RULECODE` have the level `warning`
  --info RULECODE          Make the rule `RULECODE` have the level `info`
  --style RULECODE         Make the rule `RULECODE` have the level `style`
  --ignore RULECODE        A rule to ignore. If present, the ignore list in the
                           config file is ignored
  --trusted-registry REGISTRY (e.g. docker.io)
                           A docker registry to allow to appear in FROM
                           instructions
  --require-label LABELSCHEMA (e.g. maintainer:text)
                           The option --require-label=label:format makes
                           Hadolint check that the label `label` conforms to
                           format requirement `format`
  --strict-labels          Do not permit labels other than specified in
                           `label-schema`
  --disable-ignore-pragma  Disable inline ignore pragmas `# hadolint
                           ignore=DLxxxx`
  -t,--failure-threshold THRESHOLD
                           Exit with failure code only when rules with a
                           severity equal to or above THRESHOLD are violated.
                           Accepted values: [error | warning | info | style |
                           ignore | none] (default: info)

VERSION: 3.0

AUTHOR: [François Chastanet](https://github.com/fchastanet)

SOURCE FILE: https://github.com/fchastanet/bash-tools-framework/tree/master/src/_binaries/dockerLint/dockerLint-binary.yaml

LICENSE: MIT License
Copyright (c) 2022-now François Chastanet

3.3. bin/shellcheckLint

ShellCheck wrapper with automatic installation of ShellCheck.

SYNOPSIS:
    Lint bash files using shellcheck.

USAGE: shellcheckLint [OPTIONS] [ARGUMENTS]
USAGE: shellcheckLint [--help|-h] [--config]
  [--bash-framework-config <bash-framework-config>] [--verbose|-v] [-vv] [-vvv]
  [--log-level <log-level>] [--log-file <log-file>]
  [--display-level <display-level>] [--no-color] [--theme <theme>] [--version]
  [--quiet|-q] [--format|-f <format>] [--staged] [--xargs]

ARGUMENTS:
  [shellcheckFiles {list} (optional)]    files to validate with shellcheck.
    If not provided, all files from git repository which are beginning
    with a bash shebang, unless --staged option is provided.


GLOBAL OPTIONS:
  --help, -h {single}
    Displays this command help
  --config {single}
    Displays configuration
  --bash-framework-config <bash-framework-config> {single}
    Use alternate bash framework configuration.
  --verbose, -v {single}
    Info level verbose mode (alias of --display-level INFO)
  -vv {single}
    Debug level verbose mode (alias of --display-level DEBUG)
  -vvv {single}
    Trace level verbose mode (alias of --display-level TRACE)
  --log-level <log-level> {single}
    Set log level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: OFF
  --log-file <log-file> {single}
    Set log file
    Default value: /bash/bin/logs/shellcheckLint.log
  --display-level <display-level> {single}
    Set display level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: INFO
  --no-color {single}
    Produce monochrome output. alias of --theme noColor.
  --theme <theme> {single}
    Choose color theme - default-force means colors will be produced even if
    command is piped.
    Possible values: 
      - default
      - default-force
      - noColor
    Default value: default
  --version {single}
    Print version information and quit.
  --quiet, -q {single}
    Quiet mode, doesn't display any output.

SPECIFIC OPTIONS:
  --format, -f <format> {single}
    define output format of this command
    Possible values: 
      - checkstyle
      - diff
      - gcc
      - json
      - json1
      - quiet
      - tty
    Default value: tty
  --staged {single}
    lint only staged git files(files added to file list to be committed)
    and which are beginning with a bash shebang.

  --xargs {single}
    uses parallelization(using xargs command) only if tty format


DESCRIPTION:
shellcheck wrapper that will:

- install new shellcheck version(0.9.0) automatically

- by default, lint all git files of this project
    which are beginning with a bash shebang
    except if the option --staged is passed

Special configuration .shellcheckrc:
  use the following line in your .shellcheckrc file to exclude
  some files from being checked (use grep -E syntax)   exclude=^bin/compile$

SHELLCHECK HELP
Usage: shellcheck [OPTIONS...] FILES...
  -a                  --check-sourced            Include warnings from sourced files
  -C[WHEN]            --color[=WHEN]             Use color (auto, always, never)
  -i CODE1,CODE2..    --include=CODE1,CODE2..    Consider only given types of warnings
  -e CODE1,CODE2..    --exclude=CODE1,CODE2..    Exclude types of warnings
                      --extended-analysis=bool   Perform dataflow analysis (default true)
  -f FORMAT           --format=FORMAT            Output format (checkstyle, diff, gcc, json, json1, quiet, tty)
                      --list-optional            List checks disabled by default
                      --norc                     Don't look for .shellcheckrc files
                      --rcfile=RCFILE            Prefer the specified configuration file over searching for one
  -o check1,check2..  --enable=check1,check2..   List of optional checks to enable (or 'all')
  -P SOURCEPATHS      --source-path=SOURCEPATHS  Specify path when looking for sourced files ("SCRIPTDIR" for script's dir)
  -s SHELLNAME        --shell=SHELLNAME          Specify dialect (sh, bash, dash, ksh, busybox)
  -S SEVERITY         --severity=SEVERITY        Minimum severity of errors to consider (error, warning, info, style)
  -V                  --version                  Print version information
  -W NUM              --wiki-link-count=NUM      The number of wiki links to show, when applicable
  -x                  --external-sources         Allow 'source' outside of FILES
                      --help                     Show this usage summary and exit


VERSION: 3.0

AUTHOR: [François Chastanet](https://github.com/fchastanet)

SOURCE FILE: https://github.com/fchastanet/bash-tools-framework/tree/master/src/_binaries/shellcheckLint/shellcheckLint-binary.yaml

LICENSE: MIT License
Copyright (c) 2022-now François Chastanet

3.4. bin/awkLint

Lint all files with .awk extension in specified folder.

SYNOPSIS:
    lint awk files

USAGE: awkLint [OPTIONS]
USAGE: awkLint [--help|-h] [--config]
  [--bash-framework-config <bash-framework-config>] [--verbose|-v] [-vv] [-vvv]
  [--log-level <log-level>] [--log-file <log-file>]
  [--display-level <display-level>] [--no-color] [--theme <theme>] [--version]
  [--quiet|-q]

GLOBAL OPTIONS:
  --help, -h {single}
    Displays this command help
  --config {single}
    Displays configuration
  --bash-framework-config <bash-framework-config> {single}
    Use alternate bash framework configuration.
  --verbose, -v {single}
    Info level verbose mode (alias of --display-level INFO)
  -vv {single}
    Debug level verbose mode (alias of --display-level DEBUG)
  -vvv {single}
    Trace level verbose mode (alias of --display-level TRACE)
  --log-level <log-level> {single}
    Set log level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: OFF
  --log-file <log-file> {single}
    Set log file
    Default value: /bash/bin/logs/awkLint.log
  --display-level <display-level> {single}
    Set display level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: INFO
  --no-color {single}
    Produce monochrome output. alias of --theme noColor.
  --theme <theme> {single}
    Choose color theme - default-force means colors will be produced even if
    command is piped.
    Possible values: 
      - default
      - default-force
      - noColor
    Default value: default
  --version {single}
    Print version information and quit.
  --quiet, -q {single}
    Quiet mode, doesn't display any output.


DESCRIPTION:
Lint awk files

Lint all files with .awk extension in current git folder.
Result in checkstyle format.

VERSION: 3.0

AUTHOR: [François Chastanet](https://github.com/fchastanet)

SOURCE FILE: https://github.com/fchastanet/bash-tools-framework/tree/master/src/_binaries/awkLint/awkLint-binary.yaml

LICENSE: MIT License
Copyright (c) 2022-now François Chastanet

3.5. bin/definitionLint

Lint binary definition files (YAML).

SYNOPSIS:
    Lint files of the given directory.

USAGE: definitionLint [OPTIONS] [ARGUMENTS]
USAGE: definitionLint [--format <format>] [--help|-h] [--config]
  [--bash-framework-config <bash-framework-config>] [--verbose|-v] [-vv] [-vvv]
  [--log-level <log-level>] [--log-file <log-file>]
  [--display-level <display-level>] [--no-color] [--theme <theme>] [--version]
  [--quiet|-q]

ARGUMENTS:
  folder {single} (mandatory)    the folder to recursively lint

OPTIONS:
  --format <format> {single}
    Define output format of this command.
    Possible values: 
      - plain
      - checkstyle
    Default value: plain

GLOBAL OPTIONS:
  --help, -h {single}
    Displays this command help
  --config {single}
    Displays configuration
  --bash-framework-config <bash-framework-config> {single}
    Use alternate bash framework configuration.
  --verbose, -v {single}
    Info level verbose mode (alias of --display-level INFO)
  -vv {single}
    Debug level verbose mode (alias of --display-level DEBUG)
  -vvv {single}
    Trace level verbose mode (alias of --display-level TRACE)
  --log-level <log-level> {single}
    Set log level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: OFF
  --log-file <log-file> {single}
    Set log file
    Default value: /bash/bin/logs/definitionLint.log
  --display-level <display-level> {single}
    Set display level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: INFO
  --no-color {single}
    Produce monochrome output. alias of --theme noColor.
  --theme <theme> {single}
    Choose color theme - default-force means colors will be produced even if
    command is piped.
    Possible values: 
      - default
      - default-force
      - noColor
    Default value: default
  --version {single}
    Print version information and quit.
  --quiet, -q {single}
    Quiet mode, doesn't display any output.


DESCRIPTION:

For each definition file:

- check that all mandatory methods are existing
  installScripts_<fileName>_helpDescription
  installScripts_<fileName>_helpVariables
  installScripts_<fileName>_listVariables
  installScripts_<fileName>_defaultVariables
  installScripts_<fileName>_checkVariables
  installScripts_<fileName>_fortunes
  installScripts_<fileName>_dependencies
  installScripts_<fileName>_breakOnConfigFailure
  installScripts_<fileName>_breakOnTestFailure
  installScripts_<fileName>_install
  installScripts_<fileName>_configure
  installScripts_<fileName>_test

- check if other definitions files functions are defined by currently
  linted definition file it would mean that another file has defined
  the same methods

- check if each dependency exists

INTERNAL

VERSION: 3.0

AUTHOR: [François Chastanet](https://github.com/fchastanet)

SOURCE FILE: https://github.com/fchastanet/bash-tools-framework/tree/master/src/_binaries/definitionLint/definitionLint-binary.yaml

LICENSE: MIT License
Copyright (c) 2023-now François Chastanet

3.6. bin/megalinter

Run MegaLinter for comprehensive code quality checks.

SYNOPSIS:
    Run megalinter over this repository.

USAGE: megalinter [OPTIONS]
USAGE: megalinter [--help|-h] [--config]
  [--bash-framework-config <bash-framework-config>] [--verbose|-v] [-vv] [-vvv]
  [--log-level <log-level>] [--log-file <log-file>]
  [--display-level <display-level>] [--no-color] [--theme <theme>] [--version]
  [--quiet|-q] [--format <<Format>>] [--fix] [--filesOnly] [--incremental|-i]
  [--image <<ImageName>>] [--config-file <<ConfigFile>>]
  [--check-megalinter-version]

GLOBAL OPTIONS:
  --help, -h {single}
    Displays this command help
  --config {single}
    Displays configuration
  --bash-framework-config <bash-framework-config> {single}
    Use alternate bash framework configuration.
  --verbose, -v {single}
    Info level verbose mode (alias of --display-level INFO)
  -vv {single}
    Debug level verbose mode (alias of --display-level DEBUG)
  -vvv {single}
    Trace level verbose mode (alias of --display-level TRACE)
  --log-level <log-level> {single}
    Set log level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: OFF
  --log-file <log-file> {single}
    Set log file
    Default value: /bash/bin/logs/megalinter.log
  --display-level <display-level> {single}
    Set display level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: INFO
  --no-color {single}
    Produce monochrome output. alias of --theme noColor.
  --theme <theme> {single}
    Choose color theme - default-force means colors will be produced even if
    command is piped.
    Possible values: 
      - default
      - default-force
      - noColor
    Default value: default
  --version {single}
    Print version information and quit.
  --quiet, -q {single}
    Quiet mode, doesn't display any output.

OPTIONS:
  --format <<Format>> {single}
    Define output format of this command.
    Possible values: 
      - plain
      - json
    Default value: plain
  --fix {single}
    Apply linters fixes automatically.
  --filesOnly {single}
    Skip linters that run in project mode.
  --incremental, -i {single}
    Run megalinter only on files that are git staged.
  --image <<ImageName>> {single}
    Specify docker megalinter image name to use.
    Default value: oxsecurity/megalinter-terraform:v9
  --config-file <<ConfigFile>> {single}
    Specify megalinter config filename to use.
    Default value: .mega-linter.yml
  --check-megalinter-version {single}
    Check if new version of megalinter is available (compared to default ima
    ge). Exits 1 if yes and displays new version number.



DESCRIPTION:
megalinter image  will be used.
<files> optionally you can provide a list of files to run megalinter on
this mode is incompatible with --incremental option.

VERSION: 3.0

AUTHOR: [François Chastanet](https://github.com/fchastanet)

SOURCE FILE: https://github.com/fchastanet/bash-tools-framework/tree/master/src/_binaries/megalinter/megalinter-binary.yaml

LICENSE: MIT License
Copyright (c) 2023-now François Chastanet

4. Converter and Generator tools

4.1. bin/plantuml

Generate PlantUML diagrams.

SYNOPSIS:
    Generates plantuml diagrams from puml files.

USAGE: plantuml [OPTIONS] [ARGUMENTS]
USAGE: plantuml [--help|-h] [--config]
  [--bash-framework-config <bash-framework-config>] [--verbose|-v] [-vv] [-vvv]
  [--log-level <log-level>] [--log-file <log-file>]
  [--display-level <display-level>] [--no-color] [--theme <theme>] [--version]
  [--quiet|-q] [--ci] [--format|-f <Format>] [--limit-size|-l <LimitSize>]
  [--same-dir] [--output-dir|-o <OutputDir>] [--include-path <IncludePath>]

ARGUMENTS:
  [PlantumlFiles {list} (optional)]    Plantuml files (if not provided, deduce files
    from git repository with .puml extension)


GLOBAL OPTIONS:
  --help, -h {single}
    Displays this command help
  --config {single}
    Displays configuration
  --bash-framework-config <bash-framework-config> {single}
    Use alternate bash framework configuration.
  --verbose, -v {single}
    Info level verbose mode (alias of --display-level INFO)
  -vv {single}
    Debug level verbose mode (alias of --display-level DEBUG)
  -vvv {single}
    Trace level verbose mode (alias of --display-level TRACE)
  --log-level <log-level> {single}
    Set log level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: OFF
  --log-file <log-file> {single}
    Set log file
    Default value: /bash/bin/logs/plantuml.log
  --display-level <display-level> {single}
    Set display level
    Possible values: 
      - OFF
      - ERR
      - ERROR
      - WARN
      - WARNING
      - INFO
      - DEBUG
      - TRACE
    Default value: INFO
  --no-color {single}
    Produce monochrome output. alias of --theme noColor.
  --theme <theme> {single}
    Choose color theme - default-force means colors will be produced even if
    command is piped.
    Possible values: 
      - default
      - default-force
      - noColor
    Default value: default
  --version {single}
    Print version information and quit.
  --quiet, -q {single}
    Quiet mode, doesn't display any output.

OPTIONS:
  --ci {single}
    Activate continuous integration mode (tmp folder not shared with host)

  --format, -f <Format> {list} (optional)
    Defines output format of this command
    Possible values: 
      - svg
      - png
  --limit-size, -l <LimitSize> {single}
    Define PLANTUML_LIMIT_SIZE
    use plantuml software default size if not provided

    Default value: 0
  --same-dir {single}
    Write image file in same directory as source file
    and with the same base name (except extension)
    Incompatible with the option --output-dir

  --output-dir, -o <OutputDir> {single}
    Define output directory of this command (default: <currentDirectory>)
    Incompatible with the option --same-dir

  --include-path <IncludePath> {single}
    Make the path specified shared inside docker container
    so that !include directives in plantuml files can work
    relative to this path.

    If not provided, the current directory will be used as include path.

    Default value: -


DESCRIPTION:
Generates plantuml diagrams from puml files in formats provided

PLANTUML HELP
docker was not available while generating this documentation

VERSION: 3.0

AUTHOR: [François Chastanet](https://github.com/fchastanet)

SOURCE FILE: https://github.com/fchastanet/bash-tools-framework/tree/master/src/_binaries/plantuml/plantuml-binary.yaml

LICENSE: MIT License
Copyright (c) 2023-now François Chastanet
Or, if you want, you can alternatively use the GitHub discussion Q&A for feedback and questions.