*.run.ts file is ordinary TypeScript running under Bun on a machine with root, a persistent disk, Docker, Python, Go and outbound internet, so anything you can reach from that machine you can reach from an automation, with whatever client library you’d normally use.
Install what you need
The script’s directory is a normal Bun project. Add dependencies next to it and import them:@boxd/run keeps resolving from anywhere, and your own dependencies resolve from the script’s node_modules. Anything installed on the machine, CLIs included, is available too. Bun.$ runs shell commands, so kubectl, psql, aws, gcloud or your own binaries are one line away.
Keep credentials out of the file
Put connection strings, tokens and passwords in env vars and secrets and read them fromprocess.env. They are set once for your account or organization, injected into every machine you own, and never appear in the script. That matters because the script’s source is what the console’s generated write-up is built from (credential-shaped strings are redacted before that happens, but a secret that was never in the file has nothing to redact).
shared or all scope are present. See Env vars & secrets for scopes.