Make Bash a structured language.
Quickstart · CLI Parser · Libraries · Styleguide · Docs
Bash is powerful and widely available, but easy to write in a way that is hard to read and maintain. argsh provides the building blocks to write Bash code that is structured, tested, and production-ready.
local -a args=(
'name|n:!' "Your name"
'age|a:~int' "Your age"
'verbose|v:+' "Verbose output"
)
:args "Greet someone" "${@}"Flags, types, defaults, validation, and --help — from a plain array.
local -a usage=(
'deploy|d' "Deploy the app"
'status|s' "Show status"
)
:usage "App manager" "${@}"Convention-based routing with fuzzy typo suggestions.
Optional loadable builtins compiled from Rust run natively inside the Bash process — zero fork overhead, zero subshell cost.
- 10 flags — Pure Bash 5405 ms → Builtin 4 ms (1351x)
- 50 flags — Pure Bash 29603 ms → Builtin 20 ms (1480x)
./myscript mcp # MCP server (stdio)
./myscript docgen llm claude # Anthropic tool schema
./myscript docgen llm openai # OpenAI function callingEvery argsh script is an MCP server and LLM tool — no glue code.
argsh test— Run.batstests with auto-discoveryargsh lint— shellcheck + argsh-specific checks (AG001–AG013)argsh coverage— Coverage reports with minimum thresholdargsh docs— Generate Markdown, man, RST, YAML from commentsargsh minify— Bundle + minify + obfuscate into a single script- LSP + Debugger — Full IDE support with completions, diagnostics, formatting, and step-through debugging
- Plugin system — Install, publish, and manage libraries via OCI registries
Everything runs locally when available, transparently forwards to Docker otherwise.
curl -sL https://min.arg.sh > .bin/argsh && chmod +x .bin/argshOr use the interactive installer:
bash -c "$(curl -sL https://get.arg.sh)"
Copyright © 2026-present Jan Guth