Scripts
Scripts are executable text files placed on your PATH. Unlike managed binaries, they are not downloaded: a shipped script is written out from the binary, and one of yours is symlinked from wherever you keep it.
scripts: - name: csf source: builtin - name: tmux-session source: builtin - name: deploy source: ~/dev/scripts/deploy.shloadout bin install # installs declared scripts alongside binariesloadout bin list # shows both, and where each came fromShipped scripts
Section titled “Shipped scripts”| Script | What it does |
|---|---|
csf | Create a new shell script in the current directory, executable and with the interpreter line already there |
sshp | List the SSH private keys it can find, identifying them by content rather than by filename |
tmux-session | Create or attach a named tmux session, used by the workspace aliases |
Declare them with source: builtin. They are embedded in the binary, so there is nothing to fetch and nothing to keep in sync.
sshp is worth a note, because it is the clearest example of a portability trap this project hit. It originally used find -regex, whose flavour differs between GNU and BSD, and it matched only *rsa and *.pem — which silently skipped every ed25519 key. It is now POSIX sh with a shell loop that identifies a private key by looking at its contents.
Your own scripts
Section titled “Your own scripts”scripts: - name: deploy source: ~/dev/scripts/deploy.shThe file stays where it lives. loadout symlinks it into the managed bin directory under the name you gave, so editing the original takes effect immediately with nothing to reinstall, and the script remains in whatever repository already versions it.
The name is what you type; it does not have to match the filename. A source that does not exist is reported by doctor rather than silently producing a dead link.
Why scripts and binaries are separated
Section titled “Why scripts and binaries are separated”They look similar — both end up executable on PATH — but they need entirely different handling:
| Scripts | Binaries | |
|---|---|---|
| Origin | Text you or loadout authored | Downloaded release artefact |
| Platform | Independent | One artefact per platform |
| Versioning | In whatever repository holds it | Pinned in your configuration |
| Verification | Not applicable | Checksum before install |
| Install | Symlink or write out | Fetch, verify, extract, rename |
Conflating them is what leads to committed binaries. Keeping them apart is what let this project replace 61MB of executables with a few lines of YAML while still keeping the hand-written helpers.
PATH ordering
Section titled “PATH ordering”Same rule as binaries: the managed directory is appended, so a script of yours named git will not shadow the real one. Name things distinctly rather than relying on ordering.