Skip to content

Do nothing scripting

Do you have a list of tasks that are a response to an incident? ex. these might be called “playbooks” or “run books”? Maybe they contain things that are manual currently, and you hope to automate them. Or maybe they’re just plain things that gotta be done by a human.

Reading a list and cross referencing it while you’re at a computer can have some failure points. I know this from running many mostly automated releases but that still have some human steps (ex. that don’t have automation endpoints [that wouldn’t be disturbingly hacky], or writing release notification emails).

Enter: “do nothing scripting”!

I learned about this at work in the context of a different team proposing to use it for $THING, but the package is open source so I can cheerfully write about it.

This is a framework that allows you to structure a “script” that doesn’t “do” anything other than prompt you for each step (thus “do nothing scripting”). By running the program, you’ll get a series of defined prompts and progress at each stage. To take the example from the README:

# Restore a database backup

This is our procedure for restoring a database backup. To familiarize yourself with our database
setup, see [the database docs](

[Enter] to begin:

## Retrieve the backup file

Log in to the [storage control panel]( and locate the latest file
of the form "backup_YYYYMMDD.sql". Download that file to your workstation.

[Enter] when done:

That first step (backup file) was defined in code as:

  pcd.AddStep(func(step *donothing.Step) {
    step.Short("Retrieve the backup file")
      Log in to the [storage control panel]( and locate the latest file
      of the form "backup_YYYYMMDD.sql". Download that file to your workstation.

I think this is also really cool because adding the steps in this way means the diffs between your procedures will be very direct, while editing Markdown docs sometimes has some restructuring, etc. I also wonder if having steps defined this way could mean you could do some interesting meta-analysis if you have many procedures defined 🤔

I think this is such an interesting idea and wonder if more teams might adopt it – I feel like there should be a talk on this at Monitorama [if it exists again].

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.