I've been diving in and out of INI files at work a lot lately. One of our projects uses them to manage state in important ways, and some days it feels like all I've done is set or delete the same handful of values, check the results, then do it all over again. (Kind of like that schtick at the optometrist. "One. Two. Back to one. Here comes two again...")

If you're not familiar, INI files contain key=value configuration definitions like this:

street=SW 11th Avenue

Sometimes they get real fancy and use sections:


Unlike JSON and YAML files, which explode any time you have the audacity to overlook a trailing comma or rudely insert tabs instead of spaces, INI files aren't a hassle to edit by hand. Still, I found myself wishing for the simplicity and ease of that old Mac command-line standby, defaults.

So, I wrote innie, a tool for reading, writing, and deleting INI file entries. I even made a little icon, which is pretty ridiculous for something that runs in a terminal:

Square with rounded corners. Two white square brackets are oriented to form a capital letter I, with pink-to-purple gradient behind.

Borrowing a page from defaults, it offers three subcommands — read, write, and delete. Let's take it for a quick spin:

$ innie read ./data.ini zip
$ innie write ./data.ini zip 97206
$ innie read ./data.ini zip
$ innie delete ./data.ini zip
$ innie read ./data.ini zip
innie: No such key 'zip'

Impressive, huh? 😉

"What about those swanky sections we saw earlier?" you ask, observant as ever. innie supports dot-notation for referencing nested keys:

$ innie write ./data.ini weather.aqi 58

Just incredible.

If you'd like to take a closer look, innie is available on NPM. You can find instructions for getting set up there or in the Git repo README.