Skip to main content

Scripting & Automation

Bash and Python for operations: idempotent scripts, CLIs, APIs and safe automation.

Most automation that breaks in production breaks in the same few ways: an unquoted variable that splits, a script that keeps going after an error, a retry loop that hammers a rate-limited API, a cron job that runs twice across a daylight-saving change, a tool nobody else can install. None of that needs a framework to fix; it needs the habits that good tools encode. This phase writes those tools from the standard library (a Bash linter, a CLI framework, a resilient API client, a jq and awk subset, a scheduler, a wheel builder) and checks each against the tool you would reach for.

How this phase is built​

LessonTypeWhat you buildWhat you then use
Robust BashBuildbashlint: a tokenizer and the checks ShellCheck is famous for, plus a strict-mode template scriptShellCheck, shfmt, bats-core, bash -x
CLI designBuildcliforge: subcommands, config precedence with --explain, --json, exit codes, --dry-run, completion and golden testsclig.dev, Click and Typer, NO_COLOR
API automationBuildapiclient: timeouts, jittered retries, Retry-After, idempotency keys, rate limits, a circuit breaker and paginationurllib3 Retry, curl --retry, gh api --paginate
Stream processingBuildministream: a jq subset and an awk subset that stream in constant memoryjq, awk, sed, xargs -P
SchedulingBuildminicron: cron and OnCalendar parsing, DST-correct next runs, missed-run policies and lockscrontab, systemd timers, flock, Kubernetes CronJob
PackagingBuildshipit: a reproducible wheel with RECORD hashes, a zipapp and a hash-checked installerpython -m build, pip --require-hashes, uv, pipx

Further lessons for this phase are proposed in ROADMAP.md.

Reference layer​

The long-form guides, cheat sheets and interview questions for this phase live under Bash, Python and YAML.