ecabigting
← Back to Blog

Why I Switched to Pi: A Simple Guide to Building Your Own Coding Agent

by Eric Thomas D. Cabigting
Why I Switched to Pi: A Simple Guide to Building Your Own Coding Agent
[ai generated]

Today I want to tell you about a new tool called Pi. Before I found Pi, I was very tired. I used many coding agents like Claude code, cursor, openai codex, or opencode. They are like big spaceships. They have so many buttons and features. But the truth is, I only use five percent of them. The rest is just noise. Sometimes the agent forgets things because the memory is too full. It is frustrating.

Then I heard about Pi. The idea is very simple. Do not make the agent fit you. Make the agent fit your needs. Pi is small. It is fast. It does not have fancy things like sub-agents or background plans. It is just a clean tool. You can add whatever you want on top of it. This is why I love it.

In this post, I will walk you through how to use Pi. We will go step by step. You will see how to set it up and how to make it work for you.

Step 1: Getting Ready

First, you need to install Pi. It is written in JavaScript and TypeScript. You just need to run the install command on your computer.

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

Once it is done, you run the program. You will see a warning screen. This is normal. It asks you to log in.

Terminal
$ pi

You can choose your favorite provider here. Maybe you like Anthropic. Maybe you like OpenAI. Or maybe you want to use a local model like Ollama. Pi supports all of them. You just put your API key in the settings file. The file is usually named agent_settings.json. You can edit this file to change how the agent behaves. This is very important because Pi gives you full control.

Step 2: Understanding the Tree

Now you are inside Pi. The first thing you notice is the speed. It is very fast. But the best part is how it handles your conversation.

In other tools, if you ask a wrong question, the whole chat gets messy. The agent gets confused. In Pi, you can use the /tree command. This shows you a picture of your conversation. You can see every branch.

If you go down a bad path, you can fork the session. This means you can copy the conversation from a specific point and start a new branch. You do not lose your good work. You just avoid the bad questions. This keeps your context clean. A clean context means the agent is smarter.

Step 3: Making It Your Own

Pi does not come with many features built in. This is good. It means you can build exactly what you need.

Let us talk about commands. You can create your own shortcuts. Put a text file in the prompts folder. Give it a name. Now you can type a slash command to use it. For example, you can make a command called /review. When you type it, the agent checks your code for bugs and security issues. You do not need to type the same long sentence every time.

You can also run commands directly. If you need to check which program is using port 8080, just type an exclamation mark ! followed by your command. Pi runs it for you and shows the result. You do not need to leave the chat.

Step 4: Adding Extra Power

Sometimes you need more help. Pi has a place for packages. You can install things like themes or special prompts. There is a package called "babysitter." It helps stop the agent from lying or making mistakes. It might be a little slower, but it is safer. You can install it with one command.

Terminal
pi install npm:@a5c-ai/babysitter-pi

You can also use different models for different jobs. If you just need a quick answer, use a free or cheap model. If you need to solve a hard problem, switch to a smart reasoning model. Pi lets you change this easily. You do not need to pay for expensive features you do not use.

Step 5: Saving Your Work

When you finish your work, you might want to save it. Pi can make a gist of your session. This is like a summary of your chat. You can save it as an HTML file to read later. Or you can send it to GitHub as a private note. This is great for sharing with your team or keeping a record of what you did.

Why I Stay with Pi

At first, I was worried. I liked the big features of my old tools. But then I realized something. Those big tools are heavy. They are slow. They hide things from me.

Pi is light. It is honest. It does not pretend to be magic. It is just a tool that listens to you. I can add my own rules. I can fix my own problems. I can make it fast.

I am not sure if Pi is perfect for everyone. If you want a tool that does everything for you without thinking, maybe Pi is not for you. But if you are a developer who likes to build and control your workflow, Pi is amazing.

I hope this guide helps you try Pi. It is a small tool, but it can do big things. Give it a try. You might find that less is more.

Continue Reading.