Pi Agent: Mac setup and terminal coding tutorial
Learn to install Pi Agent on macOS, connect a ChatGPT subscription or OpenAI API key, and use @ file references plus ! and !! shell commands.
Player not loading? Watch on YouTube
This tutorial introduces Pi Agent, a terminal coding assistant, with a macOS installation through npm. The presenter demonstrates two login paths: a ChatGPT subscription and an OpenAI API key. The setup uses provider authentication; it does not demonstrate how to run models locally or work offline.
Inside the VS Code terminal, Pi runs in a Next.js project and summarizes a README selected with an @ file reference. The presenter uses Ctrl L to select models, Ctrl P to cycle through them, and Shift Tab to change thinking levels. The tutorial describes Read, Write, Edit, and Bash as the default tools, with additional read-only tools available through tool options. Because the agent can modify files in its working directory, the speaker suggests Git or another checkpoint workflow for rollbacks.
The shell examples explain a useful distinction: ! runs a command and passes its output to Pi, while !! runs it without adding that output to the agent's context. A separate example uses the -p option to request a README summary without entering an interactive session.
The final section covers project and global instructions in agents.md. The presenter edits a project instruction to append a sample message to responses, then demonstrates the resulting behavior. Context-loading details are presented as the speaker's explanation rather than an independently verified specification.