Install and configure pi
Install pi on macOS, Linux or Windows and connect it to NaviGator AI Toolkit
pi is a small, extensible coding agent for the terminal. It reads, edits and writes files and runs shell commands, using a NaviGator AI model. It starts minimal on purpose: you add instructions, skills and extensions as your work needs them.
What you need
- Your NaviGator AI Toolkit key stored as
NAVIGATOR_TOOLKIT_API_KEY. See Store your key. - A model your key can use. These steps use
gpt-oss-120b, which runs in UF data centers and is approved for Open, Sensitive and Restricted data. - A project in a Git repository. Git is how you review and undo the agent's changes.
- On Windows, Node.js 22.19 or later and Git for Windows.
Install pi
curl -fsSL https://pi.dev/install.sh | shWhen the installer asks to add pi to your
PATH, answerY, then open a new terminal.If you already have Node.js 22.19 or later, you can install with npm instead:
npm install -g --ignore-scripts @earendil-works/pi-coding-agentConfirm the install:
pi --versionConnect pi to NaviGator AI Toolkit
pi reads custom providers from
models.jsonin its agent folder. Create the file:mkdir -p ~/.pi/agent touch ~/.pi/agent/models.json open -e ~/.pi/agent/models.jsonDownload the starter file and save it there, or paste the configuration below:
models.jsonpi provider configuration for NaviGator AI Toolkit. Reads your key from NAVIGATOR_TOOLKIT_API_KEY.Download models.jsonmodels.json { "providers": { "navigator": { "baseUrl": "https://api.navigator.ai.ufl.edu/v1", "api": "openai-completions", "apiKey": "$NAVIGATOR_TOOLKIT_API_KEY", "models": [ { "id": "gpt-oss-120b", "name": "GPT OSS 120B", "reasoning": true, "input": ["text"], "contextWindow": 128000 } ] } } }"$NAVIGATOR_TOOLKIT_API_KEY"tells pi to read your stored key each time it sends a request, so the key never appears in the file.modelslists the models pi offers. To add another, copy thegpt-oss-120bentry with the exact model ID and its context length from its model page.
Check that pi sees the models:
pi --list-models navigatorChoose the model and test
Start pi in your project:
cd path/to/your-project piEnter
/model, select GPT OSS 120B undernavigatorand pressCtrl+Sto make it your default.
Then ask a question that changes nothing:
Read this project and tell me what it does and how to run its tests. Don't change anything.The answer should describe your project, and the footer should show the navigator model.
If the project has its own pi settings, skills or extensions, pi asks whether to trust the project before loading them. Review them first. See Work safely.
Give the project its rules
An
AGENTS.mdfile at the project root tells the agent how to build, test and behave in this codebase. Ask pi to write one:Read this repository and write an AGENTS.md with the install, test and lint commands, the code style it uses and folders I should not edit. Keep it short.Review the result, or start from this file:
AGENTS.mdStarter project rules for a coding agentDownload AGENTS.mdRules in
~/.pi/agent/AGENTS.mdapply in every project, so keep personal preferences there and project standards in the project's file. Enter/reloadafter changing either.
Basic use
| Control | Action |
|---|---|
@ | Find and reference a project file |
/model or Ctrl+L | Change the model. Ctrl+S in the list saves it as the default |
/new | Start a new session |
/resume | Open an earlier session |
/reload | Reload instructions, skills and extensions |
/hotkeys | Show every keyboard shortcut |
Ctrl+O | Expand tool output |
!command | Run a shell command yourself and add its output to the conversation |
Escape | Interrupt the current response |
Ctrl+C twice | Quit pi |
Sessions save automatically. Run pi -c to continue the last one.
Work in small steps: ask for a plan, change one thing, run the tests, read git diff yourself, then commit it yourself.
Work safely
pi does not ask before it edits a file or runs a command. It works with the permissions of your account. Your guardrails are how you start it, a Git branch and your own review.
-
Start a new branch before letting the agent edit:
git switch -c ai/short-task-name.git diffshows what changed, andgit restore .discards uncommitted changes. pi has no undo for files. -
Plan without edits by starting pi with only its reading tools, then restart it normally to make the change:
pi --tools read,grep,find,ls -
Start pi in the project folder, never in your home folder.
-
Review a project before trusting it. Trusting a project lets pi load its settings, skills and extensions, which run with your account's access. For code you did not write, see Open an unfamiliar project.
-
Keep commits and pushes for yourself, and keep keys and
.envfiles out of the project. pi and the commands it runs can readNAVIGATOR_TOOLKIT_API_KEY.
For the full operating loop, see Operate coding agents safely.
Other ways to store the key
Read the key from secure storage
Instead of an environment variable, pi can run a command to get the key each time it needs it. A value that starts with ! is a command. Replace the apiKey line in models.json:
Read the key from your Keychain:
"apiKey": "!security find-generic-password -a \"$USER\" -s navigator-toolkit -w"If your unit provides an approved secret-manager command, use it the same way.
For one terminal session
Read the key through a hidden prompt as shown in Getting Started, then run pi in the same terminal.
Troubleshooting
| Problem | What to do |
|---|---|
navigator models don't appear in /model | pi hides models it can't authenticate. Open a new terminal so NAVIGATOR_TOOLKIT_API_KEY loads, then start pi. Check models.json is valid JSON; /model reloads it |
401 or an authentication error | The key is missing, expired or revoked. Check it loads as shown in Store your key |
| Skills or extensions don't load | Trust the project when pi asks, or use /trust. Then enter /reload |
| Changes went wrong | git restore . discards uncommitted changes. pi's /tree and /fork change the conversation, not your files |
pi can't find Bash on Windows
pi looks for Bash in this order:
shellPathin~/.pi/agent/settings.jsonC:\Program Files\Git\bin\bash.exe- the first
bash.exeon yourPATH, such as Cygwin or MSYS2
If pi reports No bash shell found, install Git for Windows or point pi at your Bash. Open the settings file:
notepad "$env:USERPROFILE\.pi\agent\settings.json"Add shellPath with the full path to bash.exe, using forward slashes. Keep any other settings in the file:
{
"shellPath": "C:/Program Files/Git/bin/bash.exe"
}Restart pi, then check it with a command you run yourself:
!!echo $BASH_VERSIONIf pi reports Custom shell path not found, the path is wrong or points to a folder. Point it at bash.exe itself, not wsl.exe.