This one is more experimental than practical. I built a terminal companion, essentially a small script that watches what commands you are running and occasionally offers a comment via Claude API. I called it Buddy.

How It Works

A shell hook runs after each command. It sends the command and its exit code to a small Node.js process. That process decides probabilistically whether to respond (about 20% of the time). When it does, it sends the recent command history to Claude and asks for a short, context-aware response. Claude replies as a character, opinionated, occasionally dry, always brief.

What I Learned

Context window matters more than model size for this use case. You want a model that stays in character across a long terminal session. Claude Haiku is fast enough for real-time use. Opus is overkill. The character definition needs to be very precise, without it, the responses are generic and feel robotic.

Is It Useful?

Honestly, not very. It is a toy. But it taught me a lot about how to maintain character consistency in Claude across a long session, how to use shell hooks for AI integration, and how to keep API latency low enough for interactive use. The techniques transfer to real tools.