Posts
logwrap: prefix any command's output with timestamps and log levels
A Go wrapper that intercepts stdout/stderr in real time and decorates each line with timestamps, levels, user, and PID
I have a recurring frustration: I run a script in CI, it produces output, something fails, and I have no idea when any of it happened. Did the failure come 200ms after start or two minutes in? Was it stdout or stderr? It’s the difference between “took a minute to figure out” and “took half an hour.”
The fix is to prefix every line with a timestamp. Easy in theory, annoying in practice — especially if you want the prefix to differ between stdout and stderr, or if you want UTC, or colors, or to drop the prefix in production. So I wrote logwrap: a small Go binary you put in front of any command and it adds a configurable prefix to every line, in real time, without buffering.
mdtohtml: Markdown to HTML with a GitHub-style skin
A Go CLI and library to render Markdown to standalone HTML with GitHub-flavoured styling, batch mode and validation
I write a lot of Markdown — for this blog, for READMEs, for one-off docs that need to be emailed as a single self-contained HTML file. Pandoc is overkill. gh markdown-preview requires a network round-trip. Most lightweight converters either don’t do GitHub-flavoured Markdown properly or render output that looks like 2003. So I wrote mdtohtml.
postgresql-mcp: a read-only PostgreSQL bridge for Claude Code
An MCP server that lets Claude Code inspect schemas, run SELECT queries, and explain plans against your PostgreSQL databases — safely
A surprising amount of debugging boils down to “let me check the database.” Schema lookups, sample row counts, “is this index actually being used,” EXPLAIN plans. None of that is hard to do in psql, but pulling Claude Code into the loop means copy-pasting schemas and query results back and forth, which gets old.
postgresql-mcp is an MCP server that gives Claude Code direct, read-only access to PostgreSQL. Claude does the inspection, you keep the conversation flowing.
pplx: a CLI (and MCP server) for Perplexity AI
An unofficial command-line client for the Perplexity API — query, chat, profile-driven config, shell completions, and a built-in MCP server for Claude Code.
I maintain a Go library for the Perplexity API (perplexity-go). Once it existed, it was almost a sin not to wrap it in a CLI. So pplx is what I reach for when I want a cited, web-aware answer from the shell — and now also a Model Context Protocol server I plug into Claude Code.
retry: a tiny CLI for the things that almost always work
A Go CLI (and library) for retrying flaky commands with fixed delays or exponential backoff
There’s a category of bash one-liners I keep rewriting: “run this thing, and if it fails, try again a few times with a delay.” curl against a service that’s still booting. A kubectl rollout status that flickers. A flaky integration test. A docker pull from a registry having a bad five seconds.
You can write the loop yourself in five lines of bash. I’ve done it hundreds of times. But I always forget the exit code handling, the sleep arithmetic, the cap on retries. So I wrote retry — a single binary that does exactly this, with proper exponential backoff if you want it.