NaviGator AI

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.
  1. Install pi

    curl -fsSL https://pi.dev/install.sh | sh

    When the installer asks to add pi to your PATH, answer Y, 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-agent

    Confirm the install:

    pi --version
  2. Connect pi to NaviGator AI Toolkit

    pi reads custom providers from models.json in its agent folder. Create the file:

    mkdir -p ~/.pi/agent
    touch ~/.pi/agent/models.json
    open -e ~/.pi/agent/models.json

    Download 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.json
    models.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.
    • models lists the models pi offers. To add another, copy the gpt-oss-120b entry with the exact model ID and its context length from its model page.

    Check that pi sees the models:

    pi --list-models navigator
  3. Choose the model and test

    Start pi in your project:

    cd path/to/your-project
    pi

    Enter /model, select GPT OSS 120B under navigator and press Ctrl+S to make it your default.

    pi model selector showing GPT OSS 120B from the navigator provider

    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.

  4. Give the project its rules

    An AGENTS.md file 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.md

    Rules in ~/.pi/agent/AGENTS.md apply in every project, so keep personal preferences there and project standards in the project's file. Enter /reload after changing either.

Basic use

ControlAction
@Find and reference a project file
/model or Ctrl+LChange the model. Ctrl+S in the list saves it as the default
/newStart a new session
/resumeOpen an earlier session
/reloadReload instructions, skills and extensions
/hotkeysShow every keyboard shortcut
Ctrl+OExpand tool output
!commandRun a shell command yourself and add its output to the conversation
EscapeInterrupt the current response
Ctrl+C twiceQuit 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 diff shows what changed, and git 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 .env files out of the project. pi and the commands it runs can read NAVIGATOR_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

ProblemWhat to do
navigator models don't appear in /modelpi 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 errorThe key is missing, expired or revoked. Check it loads as shown in Store your key
Skills or extensions don't loadTrust the project when pi asks, or use /trust. Then enter /reload
Changes went wronggit 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:

  1. shellPath in ~/.pi/agent/settings.json
  2. C:\Program Files\Git\bin\bash.exe
  3. the first bash.exe on your PATH, 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:

settings.json
{
  "shellPath": "C:/Program Files/Git/bin/bash.exe"
}

Restart pi, then check it with a command you run yourself:

!!echo $BASH_VERSION

If 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.

References

On this page