Mission: replace daily bash scripts — file/text transforms, API calls, subprocess orchestration, scheduling — with one toolchain, Bun, whose scripts run identically and type-checked on macOS, Linux, and Windows. Lessons assume you already know JS/TS.
Run a .ts script anywhere, read arguments (Bun.argv), and exit with codes & stderr the way bash never guaranteed. Ends by porting one of your own bash scripts.
Turn "read a file, tweak it, save the result" — the daily sed/grep/awk chore — into a typed Bun script that also composes as a Unix pipe.
Replace backticks ($(...)) and $? with a typed helper that runs another program, captures its output, and aborts on failure — the Bun twin of set -e.
Write git log pipelines and ls | wc -l-style one-liners in Bun Shell — bash syntax you already know, but cross-platform and immune to injection.
Turn a curl | jq chore into a typed Bun script: fetch an API, check res.ok, parse JSON, write to disk — secrets from a .env file.
Make your scripts remember between runs with bun:sqlite — a real SQL database in one file, no server, and typed queries for stateful daily chores.
Next bun lessons: Bun.Glob batch matching & scheduling. Meanwhile, Lesson 0007 opens the Cloudflare D1 track — it puts Lesson 0006’s SQLite online.