I wanted one command for the small chores I kept googling, so I built tinytools: 200 offline utilities behind tt, written with only Node's standard library. A few things I learned.
TOTP in 15 lines
A TOTP code is an HMAC-SHA1 of the current 30-second counter, "dynamically truncated" to 6 digits. With crypto.createHmac it fits in a screen, and the RFC 6238 test vectors (time 59, 8 digits gives 94287082) make a perfect test.
Cron: the day-of-month OR day-of-week rule
0 12 13 * 5 doesn't mean "Friday the 13th": when both day fields are restricted, cron fires when either matches. It's easy to get this wrong, so there's a test with a known calendar for it.
A calculator without eval
tt calc is a recursive-descent parser: numbers, + - * / % ^, parentheses and a short function list. Inputs like process.exit() are simply "unknown token".
The bug that only showed up on macOS CI
tt list printed fine on my machine but was truncated in the macOS CI. The cause: process.exit(code) right after a large write to a pipe. Setting process.exitCode and letting Node exit on its own flushes stdout first.
Tests as the real deliverable
Two hundred tools means two hundred places to be quietly wrong. Each tool has tests with independently known answers (Easter 2026 is April 5, the ISO week of 2021-01-03 is 2020-W53, a 200k loan at 3.5% over 30 years is 898.09 per month). Several of my own expected values were wrong too: an independent check (Python) settled which side was right.
What it isn't
It doesn't replace jq or csvkit; it's the install-free toolbox for the 80% case. It downloads nothing, phones home to no one, and only changes files when you pass an explicit flag.
I wrote it with Claude's help and reviewed and tested the result. Code (MIT): https://github.com/gianbenve95/tinytools


