/oosh-module — Create a new module
Create a new module file in the CLI's modules directory.
Steps
- Determine the modules path:
~/.<cli>/modules/(default) — if the CLI was generated to a custom path, ask the user - Ask what commands and flags the module should expose
- Write
<module>.shfollowing the conventions below - Run
oosh lint <cli> <module>to validate the new module
Conventions
Read references/annotations.md in this skill directory for the full annotation reference and module template.
Key rules:
- File starts with
#!/bin/bashand#@module <Name> - <description> - Import the engine:
. ${MODULES_DIR}/../oo.sh - Variable names:
UPPER_SNAKE_CASE, prefixed with module name (e.g.,DEPLOY_ENVindeploy.sh) - End with
main $0 "$@" - No
sed,awk,grepin hot paths — bash builtins only - Bash 3.2 compatible
Source: bruno-de-queiroz/oosh — distributed by TomeVault.