Skip to main content
Skip to main content

Libraries

argsh ships with a set of pure-Bash libraries that you can source into your scripts. Each library is a single .sh file — no dependencies beyond Bash itself.

Use the import function to load libraries into your scripts — see the Import System in the glossary for path resolution rules and caching behavior.

You can find the source code in the GitHub repository.

Argument Parsing

The core of argsh — parse flags, positional arguments, and subcommands with type checking and auto-generated help.

LibraryDescription
args:usage for subcommand routing, :args for flag/argument parsing
args.utilsUtilities for working with parsed arguments

Types & Introspection

Type converters and variable inspection helpers used by the argument parser and available for your own scripts.

LibraryDescription
toType converters: to::int, to::float, to::boolean, to::file, to::stdin
isVariable introspection: is::array, is::set, is::uninitialized, is::tty
stringString manipulation: trim, indent, random, drop-index
arrayArray utilities: contains, join, nth

Terminal & Output

Helpers for terminal interaction and formatted output.

LibraryDescription
fmtFormatted output with colors and styles
binaryBinary/executable helpers

Utilities

Error handling, version checking, and framework internals.

LibraryDescription
errorError handling, stack traces, and exit management
bashBash version verification (bash::version)
mainManage argsh native builtins and run scripts via shebang (argsh::shebang)

3rd Party Integrations

LibraryDescription
githubGitHub API helpers
dockerDocker container user setup (docker::user)
Was this section helpful?