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.
| Library | Description |
|---|---|
| args | :usage for subcommand routing, :args for flag/argument parsing |
| args.utils | Utilities for working with parsed arguments |
Types & Introspection
Type converters and variable inspection helpers used by the argument parser and available for your own scripts.
| Library | Description |
|---|---|
| to | Type converters: to::int, to::float, to::boolean, to::file, to::stdin |
| is | Variable introspection: is::array, is::set, is::uninitialized, is::tty |
| string | String manipulation: trim, indent, random, drop-index |
| array | Array utilities: contains, join, nth |
Terminal & Output
Helpers for terminal interaction and formatted output.
| Library | Description |
|---|---|
| fmt | Formatted output with colors and styles |
| binary | Binary/executable helpers |
Utilities
Error handling, version checking, and framework internals.
| Library | Description |
|---|---|
| error | Error handling, stack traces, and exit management |
| bash | Bash version verification (bash::version) |
| main | Manage argsh native builtins and run scripts via shebang (argsh::shebang) |
3rd Party Integrations
| Library | Description |
|---|---|
| github | GitHub API helpers |
| docker | Docker container user setup (docker::user) |
Was this section helpful?