Vollständiges Transkript anzeigen (3.979 Wörter)
Today we're going to take a look at OhMyPi, which is a coding agent or agent harness built on top of the Pi harness, which I also recently made a video about, but this one follows an entirely different design philosophy. Pi basically comes with nothing similar to something like Arch Linux or Neovim. You have to set it up from scratch, you have to install extensions, you have to configure it so it meets your needs, but it's basically super lightweight and minimal without a lot of functionality. OhMyPi is the complete opposite. It comes complete out of the box with tons of features, tons of tools, and approaches which make your agent more efficient, accurate, faster. You have features like collaboration, different types of voice inputs, you have an LSP built-in, you have a debugger built-in. This is the complete opposite of being minimal, but it's a full-fledged coding agent with an IDE wired in as the website likes to phrase it.
So what I want to do in this video today is I just want to briefly take a look at it. I want to explore some of the most important and most interesting features. We're not going to be able to cover all of them, it's just too much that this tool is capable of. I want to highlight the stuff that I personally think is the most interesting and then you can decide if you want to give it a try or not. Now, if you get value out of this video and if you like it, let me know by hitting the like button and subscribing, and now let us get right into it.
All right, so we're going to take a look at OhMyPi in this video today, the coding agent with the IDE wired in. When you scroll through the page, you will see this is an extremely feature-rich, batteries-included, out-of-the-box complete coding agent or agent harness, the complete opposite of the thing that it's actually based on, which is Pi, the minimal agent harness. So I also made a video about this recently. I like Pi a lot, but this design philosophy is completely different. Pi comes with almost nothing out of the box, it's completely minimal, you have to set it up yourself, you have to install plugins for almost everything, and it's not opinionated at all.
Now, OhMyPi is based on that so you can also access the same plugin ecosystem. You have the best of both worlds, so to say, but it comes completely opinionated out of the box with a ton of features. We're not going to cover all of those today, and in addition to that, it's also bench-max. Now, there are certain things, there are certain optimizations that lead to better token efficiency, uh, more speed, or better accuracy when it comes to editing, and one of those is the hashline edit. We're going to take a look at this as well, but the basic idea is when you do edits, you don't do that by matching strings and by doing substitutions, we do that by targeting certain hashes that represent line numbers, but this is more a theory thing that happens behind the scenes.
What I want to do in this video today is I want to show you the most interesting things, in my opinion. Now, I'm not going to cover all of it, for example I'm not going to go into sub-agents. Know that they exist. If you're interested in that you can scroll through the page here. You're going to see all the different features. What I want to do is I want to focus on the things that I think are the most interesting and then you can explore it yourself, but this is, keep in mind, a completely different approach to the minimal Pi. This is the complete opposite.
Now, let us get started with the installation. What you can do here is you can run the curl command if you want to run a shell script, you can install it using bun, which is what I did. Theoretically you do also have an AUR package, but for me somehow this produced some problems so I just went with a bun install. And once you have the package installed on your system, navigate to a directory when you want to try it, in my case it's the tutorial directory, and then you can just run the command OMP for OhMyPi.
And the first time you do this you probably want to login so you do something like /login to choose a provider, and you can choose one of the many that are available here. In my case I connected myself to my ChatGPT Plus, which is my Codex subscription, and also to OpenCode Go, which is what I use to run stuff like GLM or KimiK3. Uh as you can see right now I'm using GLM 5.2. So once you log in you can do /model and you can pick your provider. In my case here as I said I have, uh I also have Ollama connected theoretically, but you can go into the list of models. You can go with GLM 5.2 for example, then I can pick default, then I can pick, um Max as the setting, this is the, the effort level that I like to work with, and then I have GLM 5.2 selected.
Now, one thing you will notice is first of all the TUI is very nice. I think it looks very good, but also it has a ton of settings. If you do /settings, if you go into the settings, you will see a ton of settings. So this is way too much to process the first time you see it, so don't try to understand everything here, not everything is super important. The thing that I would configure here, this is important, is in the interaction tab I would go to the tool approval and I would go to "always ask." Now the default is Yolo, which means it does whatever it wants, uh without asking you for approval. I would set this to "always ask" so you can always have a say when it comes to actually running stuff or doing write edits.
So what's cool about OhMyPi when you run it for the first time is that it picks up on the already existing configs and already existing files that are related to cursor, to Claude, to Codex, and so on. So let me show you an example. If I go to my .claude directory, I can create here a file called claude.md and this is going to be like a system prompt basically. So I can say here, one instruction, or let's say one important rule, every message, no matter what it is about, should always start with "OK, Florian." That's my name. I just want this to be always the start of every message. I'm going to put this in quotations here, comma. That is now a claude.md file in the claude directory. So not really related to OMP. I can also run Claude now and I can say, "What does the ls command do?" So just a basic question. This should pick up on the rule now in Claude code, as you can see, "OK, Florian," and now if I do that here as well in OMP, if I say, "What is the ls command for?" question mark, then it's going to pick up on this claude.md file and it's going to say, "OK, Florian," and answer the question, because it can also use the already existing stuff.
So it seems like it's a little bit stuck. Let's try to ask again. And there you go, "OK, Florian." And you can also see here, "Every message must start with OK, Florian," because it read this file. So basically, if you have an already existing setup, you can just start this tool and it will pick up on the existing files.
Now, the first thing I want to talk about when it comes to OhMyPi is editing code. For this one of the things we're going to take a look at is the setting for the edit mode, which I already, briefly touched upon, in files here you can set the edit mode to something else. The default is hashline, and this is the editing that, or this is the edit mode that is responsible for the bench-maxing that we saw on the website. This is a more robust way of editing files. The idea is instead of replacing one string with another string, we're just a single token, just a single, uh space can mess up the entire edit, and then it has to retry or has to fix the mistake and try again. What we do here is every line gets a certain hash, a unique identifier, and the editing targets this specific hash instead of targeting a string match.
Now, this is not something that we can really demonstrate here because this is just what happens behind the scene, makes the editing more robust. What we can get into though, or what we can show, is the LSP. So LSP stands for Language Server Protocol. The idea is that it doesn't consider just strings when I say replace a variable or change the name of a function, change the name of a file. It doesn't just do that in terms of string changes. It does that also in a holistic way where it understands on a workspace level, okay, this file is a module, it's being imported somewhere else, I need to replace all the occurrences on a workspace level, and you can do that with an LSP. And for this I have a very trivial example here that I can show you, very minimal just to illustrate the concept. LSP demo. We have two Python files here. One is called math_utils.py, which just has a single function here, "some_prices," and the other one is app.py which imports from that file the function "some_prices" and uses it.
Now, for this we don't need an LSP, we can just rename easily by scanning two files also with the agent, just scan the two files and replace whatever you want to replace. But think of this to be a complicated, a complex large workspace with thousands or hundreds of thousands, millions of lines of code, many different files. Then if you do a change, if you rename a file, if you rename a function, you want to also rename properly, refactor all the occurrences. You want to rename all the occurrences, and we can do that with the LSP tool. Again, this is a very trivial example here, but I just want to illustrate the concept. Now, one thing that you need to have on your system for this to work is a language server. Depending on the programming language, you're going to use a different server. In my case here with Python I'm going to use Pyright, or to be precise, I'm going to use based pyright. And how you get it onto your system is up to you, you can use pip, you can use UV tool. So UV tool install based pyright is what I did. There's also an AUR package if you're on Arch, but you need to have this on your system as a binary that you can use. And then we can start OMP and we can ask it to do a basic refactoring, a basic rename here with the LSP tool. So I can say here, "Rename the math_utils.py file to math_tools.py using the LSP tool."
So you don't have to usually be that explicit, I'm doing it right now to force the tool call because otherwise it will see that there's only two files, no need to use the LSP, I can just make the edit simply. But we can do that like this to force the tool use, so you can see that this tool exists. You can see that it query the LSP status here and it has based pyright and pi-lsp available. And here you can see now it uses the LSP tool with the action "rename file" on math_utils.py. I can approve this. Now in this particular case it also checked manually if there are other imports, but it wasn't necessary. Now it recognized that there is another import, but the LSP, as it says here, should rename, should update that automatically. Let me perform the rename. So as you can see the first time it made a mistake in the tool call, it timed out, and now it renamed that properly. Renamed math_utils to math_tools.py and also Based Pyright here applied one edit to app.py. So this happened using the LSP. I didn't have to approve the actual string edits, the actual hashline edits. And if I go now into app.py, you can see "from math_tools" and the file is also named "math_tools." This is super trivial, but you get the idea. You can do that on a workspace level. Whenever you want to rename something, whenever you say, "Hey, change this variable name, change this function name, change this model name, rename this file," it's going to use the LSP to find all occurrences and to refactor the entire codebase.
Now, another very interesting and useful thing about OhMyPi is that it has a real debugger. And by debugger I don't mean that it runs shell commands and it prints stuff and it tries the application and it figures out what's wrong. It actually injects the process and uses a proper debugger. So the package that's actually used here is debugpy, and if you don't have it you should install it on your system, either by saying "pip install debugpy" or if you're on Arch you can do "sudo pacman -S" and then I think "python-debugpy" is what you need. But you need to have this package on your system, it will use that debugger and for this I also have a simple example here. We can go to my "debug_demo," it's very, very simple, just a script that divides a number by a random number, and sometimes this number is going to be zero, and if it's zero it's going to fail. And my question is why does this script fail? Use the debug tool to do that. Now, of course it will also be able to do that by just reading the code, so now I'm again going to explicitly say "use the debug tool," otherwise it's going to maybe just look at the code and tell me exactly what the problem is, but I want to show you that this works.
Now, in case that this is not set by default in your installation, you can go to Tools and then "debug," make sure that this is true. So we're going to say, "Sometimes my Python script here crashes randomly. Do not look at the code. Use only the debug tool to figure out what's wrong." Again, just making this prompt to show you that it's going to use the debug tool and it will actually run this and inject the process. There you go, so you can see now it uses the debug tool. It doesn't read the code to figure out the error in the code itself in the logic. It actually runs this and launches the debugger, which can then do things like setting breakpoints, continuing, making a step, and so on. You can see exactly what it does here. It uh launches, it uh takes a look at the stack trace, it has an automatic pause here in the first line. It asks me if it's okay to continue, I can approve this. Then it realized that after continue it just terminated and crashed, so now it's going to work with breakpoints. So here you can see a custom request, "set exception breakpoints," raised and uncaught. And now it runs the program until it crashes, and then it's going to catch the exception, and it figured out that there is a problem, "number 1 is 20, number 2 is zero, so probably here, there you go, ZeroDivisionError." It uh understood that there is a division by zero and that's the problem. And it tells me here, "Diagnosis complete, using only the debug tool, I never opened the source file. It crashes with a ZeroDivisionError." And uh, yeah, it also gives me the variables here, and tells me what's wrong and how to fix it. So this is again a very trivial example, but it has a real debugger that can take actions and troubleshoot the program as it's going, not just look at the code, not just print stuff, actually inject itself into the process and then work with breakpoints, continues, steps, and so on.
Now, another very cool feature of OhMyPi is that we can collaborate very easily. I can just type "/collab" and this is going to create a QR code and also a link that I can use in the browser, which means I can also use it on my phone. So what I can do now is I can just take my phone, open the camera, I don't need a special app for this, I can scan this QR code, I can go to the link, and right now I'm in this session with my phone, so I can uh say "Thank you" for example and get an answer from the AI. I typed this from my phone, I can do the same thing on my laptop. This is just super super convenient if you want to work with people on the same session, if you want to work across multiple devices. So you can basically use this as a remote feature, if you're in the kitchen, or if you're taking a walk, and you still want to be coding, or if you're on the subway. Or you can use this as a collaboration feature, send this link to a friend and vibe code together for whatever reason you would want to do that. I don't think that that's a very useful use case, but for the remote feature this is very very convenient.
Then another thing I want to show you is voice input, or voice mode. There's two different ways to do that here. One is to connect to your Codex subscription and to then press Ctrl+L. This is going to start a real-time interactive voice mode. I don't have desktop sound recorded right now so you're not going to hear the responses, but the AI is actually answering back uh with with voice. So I'm going to turn down the volume for myself here. But basically if I say "Ctrl+L," this is going to connect to uh Codex and now I can speak to the AI. "Can you hear me? Hello, what's going on?" There you go. So I actually heard that now through my headphones. You didn't hear that in the video, but this was not just text, this was actually a real-time conversation. So I'm talking, it's talking back and we can still run commands, right? So I can show you that again. "Go ahead and create a simple Python script that shows Hello World on screen." Okay, didn't get the "please," but this is also something that we can do. I need to say this is not as, uh good as the Claude code voice inputs, so I would say that Claude code is superior when it comes to that, but it's a nice thing and this is how you can set it up.
And then maybe the last thing I want to show here as a feature is that OhMyPi can actually use a browser to actually browse the web, not just web search as a tool call, but actually using a browser. So I can say "Open a web browser, go to Google and tell me what the current slogan is." Doesn't make a lot of sense, but this is going to force it to use the browser tool and you can see now, "Allow tool, browser, open tab main," approve and this is going to open it in a browser. Now this is running in headless mode, so it's running behind the scenes, but this means that it's actually using a real browser instance and it can actually scrape the web and actually serve the web, not just retrieve information using a web search tool.
So these are basically the couple of features I wanted to show you myself. Of course there's much more. If you go to the website you can scroll through the most important ones. As I mentioned you do have sub-agent support, you also have something called "time-traveling stream rules," which basically the idea here is you define a rule, there's a regex that waits for certain triggers, and the rule doesn't have to stay in context. So you don't have to tell the agent, "Every time something happens do X, Y, Z," and then the agent has to keep it in context. What happens is that this rule is triggered in a delayed way. So when something triggers, when a regex matches, this rule is going to be loaded into context and applied directly without having to stay in context all the time, without wasting the context window. Uh we also have second models that we can run like an advisor role, so one model that controls the other model or checks the other model. What's also cool is that all the binaries used for stuff like ripgrep are in the process itself, so in like ripgrep, grep, find, they don't have to be running as shell commands, they're tools built into OMP, which means that it can use them natively even on Windows, so don't have to run these shell commands, they're part of the binary, they're part of OMP itself.
And of course, much much more. You can just scroll through everything, you can see all the latest editions. There's an update almost every day. You can do OMP OMP update which I have to do here to update it. And also maybe one thing that I didn't cover, as I said you can install plugins. So you can basically say OMP install and then NPM, and then "pi-permission-system," what was it? Permission system, and then it will install the plugin. You can also of course say OMP plugin uninstall pi-permission, what was it? Pi-permission system, or "npm pi-permission-system," and then it will uninstall that. But this is just super convenient, you have a fully fledged environment here out of the box, complete, batteries included, feature-rich, and you're still running the Pi harness behind the scenes, so you still have the whole ecosystem. This is for those of you who want an opinionated, ready-to-go, feature-rich, IDE-like coding agent or agent harness.
So that's it for this video today. I hope you enjoyed it and hope you learned something. If so, let me know by hitting the like button and leaving a comment in the comment section down below. Also in case you're interested on my website you will find a services tab and a tutoring tab, there you can contact me via email or LinkedIn at the bottom of both pages. If you need help from a freelancer, if you need a consultant, if you need help with a project, you can reach me there. Besides that don't forget to subscribe to this channel and hit the notification bell to not miss a single future video for free. Other than that, thank you much for watching. See you in the next video and bye.