prism Svelte Themes

Prism

Cyberpunk PI wrapper — Tauri 2 + Svelte 5

Prism

A desktop GUI for Pi, the AI coding agent.

Built with Tauri 2 + Svelte 5 — lightweight, fast, and native.

Features

  • Chat interface — Converse with AI coding models through a clean, modern UI
  • Multi-provider auth — Anthropic, OpenAI, Google Gemini, GitHub Copilot, OpenRouter, xAI, Mistral, Ollama
  • GitHub Copilot OAuth — One-click device flow login, use your Copilot subscription
  • 7 color themes — Void, Midnight, Emerald, Crimson, Aurora, Snow, Terminal
  • Custom backgrounds — Gradients, patterns, or your own image URL
  • Syntax highlighting — 15+ languages with theme-matched colors
  • Tool call visualization — See reads, edits, bash commands as they execute
  • Thinking blocks — Expandable reasoning display for supported models
  • Session management — New sessions, compaction, model switching
  • Tiny footprint — ~30MB installer (vs ~200MB for Electron equivalent)

Prerequisites

  • Pi must be installed and available in your PATH, or placed in a backend/ folder alongside the Prism executable
  • An API key or GitHub Copilot subscription for at least one supported provider

Building from Source

Requirements

Steps

# Install dependencies
npm install

# Dev mode (hot-reload)
npm run tauri dev

# Production build
npm run tauri build

The installer will be in src-tauri/target/release/bundle/.

Bundling the Pi Backend

To create a self-contained build with Pi included:

  1. Place the Pi binary in src-tauri/backend/pi (or pi.exe on Windows)
  2. Also include package.json, photon_rs_bg.wasm, theme/, export-html/, and docs/ from Pi's dist
  3. Build normally — Tauri will bundle the backend/ directory as a resource

If no bundled backend is found, Prism will look for pi in your system PATH.

Architecture

┌──────────────────────────────────┐
│           Tauri Shell            │
│  (Rust — src-tauri/src/lib.rs)   │
│                                  │
│  • Spawns Pi in --ws mode        │
│  • Auth IPC (read/write creds)   │
│  • URL opener                    │
│  • Process lifecycle             │
└────────────┬─────────────────────┘
             │ WebSocket (port 24193)
┌────────────▼─────────────────────┐
│        Svelte 5 Frontend         │
│  (TypeScript + Vite)             │
│                                  │
│  • Chat UI with markdown render  │
│  • Theme engine (7 presets)      │
│  • RPC client over WebSocket     │
│  • Tool call & thinking display  │
└──────────────────────────────────┘

Supported Providers

Provider Auth Type Models
Anthropic API Key Claude 4, Sonnet, Haiku
OpenAI API Key GPT-4o, o1, o3
Google API Key Gemini 2.5 Pro/Flash
GitHub Copilot OAuth All Copilot-available models
OpenRouter API Key 200+ models
xAI API Key Grok
Mistral API Key Mistral Large, Codestral
Ollama Local Any local model

Configuration

Prism stores auth credentials in ~/.pi/agent/auth.json (same location Pi uses). No additional configuration needed — if Pi works from your terminal, Prism will work too.

License

MIT

Top categories

Loading Svelte Themes