Finally Got Pi Working on Debian – My New Favorite Minimal AI Coding Agent

After battling 401 errors and deprecated models, I finally got Pi Coding Agent running on Debian. My honest review of this minimal terminal AI coding agent and why it might become my daily driver.


Post Content:

After days of pure frustration — endless 401 authentication errors, model 404s, deprecated model names, and Anthropic being extra difficult — I can finally say it:

Pi is now running smoothly on my Debian machine.

And honestly? It feels good.

What is Pi?

Pi (made by Mario Zechner / badlogic) is a lightweight, terminal-first AI coding agent. It’s deliberately minimal: short system prompt, only four core tools (read, write, edit, and bash), and almost zero built-in opinions or safety theater.

Unlike Cursor, Claude Code, or other heavy agents, Pi doesn’t force planning steps, sub-agents, or fancy sidebars. It just gives the underlying model (Claude Opus 4.6, Sonnet 4, etc.) direct access to your filesystem and terminal so it can actually do things.

It’s highly extensible with custom skills, extensions, themes, and prompt templates. If you like control and hate bloat, Pi is built for you.

The Setup Nightmare (My Journey)

I thought installing it would be quick:

Bash

npm install -g @mariozechner/pi-coding-agent

But then the real fun began.

  • 401 “invalid x-api-key” errors even when the key was clearly set
  • auth.json not being picked up
  • Deprecated model names like claude-3-5-sonnet-20241022 returning 404
  • Anthropic’s OAuth login being blocked for third-party tools
  • Fighting with environment variables, cached files, and model selectors

At one point I was restarting Pi 20+ times, pressing Ctrl+L to switch models, and trying every combination of export commands. It was painful… but educational.

In the end, the winning combo was:

  • A fresh Anthropic API key
  • Forcing the key on launch
  • Switching to currently supported models (especially claude-opus-4-6)
  • Creating a simple alias pii so I can now just type pii to start it

First Impressions

Once it finally worked, Pi felt refreshingly direct.

I asked it to create a simple hello.py, then modify it to include the current date and time — and it did both cleanly, reading, editing, and executing without unnecessary fluff.

The terminal UI is clean and keyboard-friendly (Esc to interrupt, Ctrl+L to change models, etc.). Because the system prompt is so minimal, the model feels more “agentic” and less lobotomized than in some other tools.

It’s not perfect yet (model name compatibility can still be annoying), but the philosophy is spot on: give me the tools and get out of my way.

Why I’m Excited About Pi

  • Extremely hackable (easy to add skills and extensions)
  • Runs entirely in the terminal — perfect for my Debian + remote setups
  • No forced workflows or opinionated planning
  • Full bash access when needed
  • Lightweight and fast

It fits perfectly into my broader JARVIS project — a local-first, privacy-conscious AI assistant I’m building from the ground up.

Would I Recommend Pi?

Yes, if you:

  • Prefer terminal tools over GUI apps
  • Want maximum control and minimal bloat
  • Like tinkering and customizing your workflow
  • Are okay with occasional setup friction

If you want something super polished that “just works” out of the box, you might still prefer Cursor or Claude Code for now.

Final Thoughts

Pi reminds me why I got into tech in the first place: building and shaping your own tools instead of just consuming someone else’s product.

I’ll be posting more about:

  • Useful Pi extensions and skills I add
  • How I integrate it into my daily workflow
  • Comparisons with other agents
  • Using Pi to help build my JARVIS system

Stay tuned.