How to add and maintain proto TOML plugins in this repo.
Each tool lives in its own directory containing a plugin.toml (the plugin) and a
README.md. The root .prototools is the source of truth for what exists: it pins a
version per tool and registers each plugin under [plugins] with a file:// locator.
CI installs every pinned tool through its local plugin across Linux, macOS (x64 and
arm64), and Windows, then runs scripts/smoke-test.sh to confirm each resolves to a
runnable binary. Install alone is not enough: proto reports a wrong exe-path as a
successful install and only fails when the dangling binary is used.
-
Create
<tool>/plugin.toml. See the schema reference below and copy an existing plugin as a starting point. -
Add
<tool>/README.mdwith usage and a link to upstream releases. -
Register it and pin a version in
.prototools(in-repo plugins use afile://locator):<tool> = "X.Y.Z" [plugins] <tool> = "file://./<tool>/plugin.toml"
proto pin <tool> X.Y.Zwrites the pin line for you. -
Verify it installs and the checks pass (see below).
The TOML plugin format is documented at https://moonrepo.dev/docs/proto/non-wasm-plugin. The fields used here:
name,type(required):typeis one oflanguage,dependency-manager,package-manager, orcli.[resolve]: how versions are discovered.git-urllists git tags; pair it withversion-pattern(a regex with named groupsmajor/minor/patch/...) when tags carry a prefix such asv.[platform.{linux,macos,windows}]:download-fileand optionalchecksum-fileper OS, plusexe-path(the binary inside the archive). Tokens:{version},{arch},{os},{libc}.[install]:download-urland optionalchecksum-url, built from the platform files. Prefer publishing achecksum-urlso installs are verified.
- Use the upstream release's static/portable Linux build (
musl) where one exists. - Provide a
checksum-file/checksum-urlwhenever upstream ships checksums. - Keep
version-patternonly when tags need stripping; omit it when tags are bare semver.
With direnv installed, direnv allow once and entering the repo
auto-runs proto use and puts the pinned tools on PATH. Otherwise run proto install
by hand.
Hooks run via prek (a pre-commit-compatible runner)
and are the same checks CI runs. taplo is invoked through proto, so its version comes
from .prototools, not a hook-managed copy.
proto run prek -- install # optional: enable git hooks
proto run prek -- run --all-files # file hygiene, typos, taplo format + lint
./scripts/smoke-test.sh # every pinned tool resolves to a runnable binary- GitHub Action versions are pinned to tags to match the ecosystem norm. Pinning to a commit SHA is the hardened alternative if supply-chain strictness is required.