Skip to main content

Choose Your Installation

Pi is distributed as multiple npm packages. Install only what you need:

Coding Agent CLI

Install globally for interactive development

Library Packages

Install locally for programmatic usage

Prerequisites

Pi requires Node.js 20.0.0 or higher. Check your version with node --version.

Coding Agent (Global CLI)

For the full interactive coding agent experience:
Verify installation:
Windows: Works best with Windows Terminal. See Windows setup guide.Termux (Android): Fully supported. See Termux setup guide.Terminal Configuration: For best experience, see terminal setup guide.

Library Packages

LLM API Only

For unified LLM access without the agent runtime:
Includes:
  • Multi-provider LLM streaming and completion
  • Tool calling with TypeBox validation
  • Automatic model discovery
  • OAuth support
Use when: Building custom LLM integrations, need simple completion/streaming API

Agent Runtime

For building stateful agents with tool execution:
Includes:
  • Agent state management
  • Event-driven architecture
  • Tool execution loop
  • Message queue and steering
Use when: Building custom agents, need event streaming and state management

Terminal UI

For building terminal-based interfaces:
Includes:
  • Differential rendering
  • Built-in components (Editor, Markdown, SelectList, etc.)
  • Overlay system
  • Autocomplete providers
Use when: Building CLIs, need terminal UI components

Web UI

For building browser-based chat interfaces:
Peer dependencies:
Includes:
  • Chat panel components
  • Artifact viewer
  • File attachments (PDF, DOCX, XLSX, images)
  • IndexedDB storage
  • CORS proxy handling
Use when: Building web apps, browser extensions, need browser-based chat UI

Slack Bot

For running the coding agent in Slack:
Includes:
  • Slack socket mode integration
  • Thread management
  • Agent delegation
Use when: Need team collaboration via Slack

vLLM Pod Management

For managing GPU pods and vLLM deployments:
Use when: Self-hosting LLM inference on cloud GPU providers

Full Development Setup

To work on Pi itself or use all packages:
1

Clone the Repository

2

Install Dependencies

3

Build All Packages

4

Run Tests

Development Note: npm run check requires npm run build to be run first, as the web-ui package uses TypeScript which needs compiled .d.ts files from dependencies.

API Keys & Authentication

After installation, configure authentication for your LLM provider:
Set environment variables for your provider:
See AI Providers for complete list.

Verify Installation

Package Versions

All Pi packages use lockstep versioning. Every release updates all packages together, even if only one package changed. This ensures compatibility across the monorepo.
Current version: 0.55.3 (as of this documentation) Check for updates:
Update to latest:

Common Installation Issues

Error: error @mariozechner/pi-coding-agent@0.55.3: The engine "node" is incompatible with this module.Solution: Update Node.js to v20 or higher. Use nvm for easy version management:
Error: EACCES: permission deniedSolution: Use npx instead, or configure npm prefix:
Error: Cannot find module '@mariozechner/pi-ai'Solution: Ensure dependencies are installed:
Error: Type errors when building web-uiSolution: Build dependencies first:
The web-ui package uses TypeScript and needs compiled .d.ts files from dependencies.

Next Steps

Quick Start Guide

Run your first Pi agent in under 5 minutes

LLM Providers

Configure your preferred LLM provider

Coding Agent Guide

Learn the interactive coding agent

API Reference

Explore the programmatic API