pi-shell

GitHub: https://github.com/mcyork/pi-shell

Why I Wrote This

So pi-shell—why'd I write it? It's not obvious sometimes, but here's the story.

I was working on two Pi projects and it got to the point where I was re-imaging a Pi every day, 5-6-7 times. At that time, my SD card reader was really slow. Mental note: if you have a slow card reader, go buy a good one. It will save you time and hours of frustration.

Anyhow, I was doing development on my Mac with Cursor. Cursor would be like, "Oh, okay, now copy these files to your Pi." Okay, done. "Now copy these files to your Pi." Okay, done. "Can't you just SSH?" Yeah, it could, but it kind of had some problems, and it wasn't consistent or clean.

The Birth of pi-shell

So pi-shell was born. The idea was simple: I just tell Cursor, "Here's the Pi, here's its user ID, here's its password, here's its IP address. Use this tool." And Cursor just went, "Yeah, I know how to do that."

I gave it a good prompt at the beginning of my workflow, told it to go full agent mode, and man, did it ever wreck a couple of Pis. But you know, in the process I got all sorts of stuff done way faster.

At the time I was building an inventory system (which I still have to publish publicly someday), and there were inevitably things that would mess up. But pi-shell would come to the rescue: diagnose the problem, figure it out, check the logs—do all those things where Cursor could see everything it needed to see. Then come back to the code, fix it, push it, re-run it, restart the services... do anything.

Evolution

So I kept making pi-shell better to the point where I think it's good enough. And that's what we have today.

pi-shell is intended to run on your development system. That could be a Mac, a Linux box, or even another Pi, I guess. The key is that it gives your AI coding assistant (like Cursor) a clean, consistent interface to interact with your Raspberry Pi devices over SSH.

Side note: Despite the "pi" in the name, pi-shell can actually log into any Linux machine over SSH, not just Raspberry Pis. I just happened to be working with Pis when I built it. Works great for VPS servers, cloud instances, or any remote Linux box you need to manage.

Workflow Benefits

The tool handles:

You set it up once per Pi, and then your LLM-powered development environment can just... work. No more context-switching, no more manual file copying, no more "wait, which Pi was I working on?"

Taking It Further: Keybird

And then I took it one step further and kind of abused it in Keybird. Instead of just using pi-shell as a development tool, I made it part of the installation process itself. You can read more about that experiment on the Keybird page.


Part of the Black Hat Booze toolset. See also: Keybird | About BHB