Authoring Plugins
Create reusable libraries that others can install via argsh lib add.
Structure
A plugin is a directory with:
Metadata
Library file
The main .sh file is what import mylib sources. Follow argsh conventions:
Testing
Write bats tests alongside the library:
Run with:
Publishing
Plugins are distributed via the arg-sh/libs repository.
To contribute a plugin:
- Fork
github.com/arg-sh/libs - Create your library directory with the structure above
- Add tests
- Submit a pull request
Optional: Rust builtins
For performance-critical operations, plugins can include a Rust builtin .so that provides native implementations of bash functions. See the libs repo for the workspace setup.
The .so is loaded automatically when available. The .sh file provides the pure-bash fallback.
Was this section helpful?