Manual Installation
Manual installation is recommended if you:
- Are familiar with the terminal, bash, config files, etc.
- Wish to install only a subset of items
- Want modifications not supported by the script, like alternate models
- Are using a container (docker, podman etc.)
Step 1 — LLM Running Software (Inference Engine) - llama.cpp
If you have homebrew installed:
brew install llama.cpp
or install directly with llama.cpp’s install script:
curl -LsSf https://llama.app/install.sh | sh
NOTE: Recent builds of llama.cpp provide a unified llama command (llama cli, llama serve, llama --version).
Step 2 — Model
Model weights (the actual stuff that comprises of the LLM) can be downloaded from https://huggingface.co. This website is the de facto place that all companies use to share their models.
Choose a model from the choices here
Each of the above have several flavors when you search HF. Recommend
- Using quantized versions a.k.a quants. 4-bit (Q4_K_M) quantization is a happy medium that preserves accuracy reasonably while being small.
- Use quants from either official sources (google, Qwen etc.) or from unsloth/bartwoski (the latter two are independent developers but have been in the ecosystem from the start in 2023 and are reliable, trusted sources)
To get and use the model:
- Click on the quantization of your choice.
- Click the “Use this model button” towards the top right in the sidebar that opens.
- Copy the llama serve… command (second line)
- Paste into a new terminal tab and hit enter
- The model will start downloading and will be served (will be live) after the download completes
- To use in the future, simply run the same command again (it will not re-download as the model is saved to your hard disk. Defaults to the cache folder)
Step 3 — Agent - pi
Follow the installation process here: https://pi.dev/
The direct install script command is copied here for convenience:
curl -fsSL https://pi.dev/install.sh | sh
Notes on the installer
Step 3 pipes a remote script into a shell. That deserves scrutiny, so here is what pi.dev/install.sh does, from reading it:
- Node.js. Requires ≥ 22.19.0. If missing or too old it asks, then uses
brew install nodewhen Homebrew exists (macOS). Without Homebrew it downloads a Node 22 tarball fromnodejs.organd verifies it against the publishedSHASUMS256.txtbefore extracting. - Interactivity. It opens
/dev/ttyexplicitly for its prompts, which is why piping intoshdoesn’t break it. It shows you the exactnpmcommand it intends to run and offers install / uninstall / do-nothing. Choosing “do nothing” exits cleanly. - What it runs. By default:
npm install -g --ignore-scripts --min-release-age=0 @earendil-works/pi-coding-agent. An alternative pinned-dependency path exists but is gated behind an environment variable and is off by default. - Privileges. No
sudoon macOS. Thesudocalls in the file are confined to the Linuxapt/apkbranches. - Writes. npm’s prefix or
~/.local, plus~/.local/share/pi-node, plus temp files. Its one edit to your shell profile is prompted and checks for a duplicate line first. - No
eval, no telemetry, no credential access.
To read it yourself before running anything:
curl -fsSL https://pi.dev/install.sh | less
Step 4 — connect pi to your local model
Step 4a — the pi-llama plugin
pi auto-discovers the model served by llama serve:
pi install git:github.com/huggingface/pi-llama
Step 4b — start the model server
Run the server in its own terminal tab/window and leave it running:
llama serve
llama serve starts the local server on 127.0.0.1:8080. The pi-llama plugin finds it automatically. If you skipped the model download, the first llama serve run fetches the weights for you.
Everything is set! Run Pi
To start pi, simply type:
pi
in the terminal. Recommend changing directory (cd path/to/folder) to a specific project or new folder and then starting pi