@e9n/pi-mobile

PWA mobile app for Pi agents โ€” mounts on pi-webserver at /mobile

Package details

extension

Install @e9n/pi-mobile from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@e9n/pi-mobile
Package
@e9n/pi-mobile
Version
0.3.0
Published
Apr 26, 2026
Downloads
60/mo ยท 60/wk
Author
e9n
License
MIT
Types
extension
Size
92.8 KB
Dependencies
0 dependencies ยท 1 peer
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-mobile

PWA mobile app for Pi coding agents. Mounts on pi-webserver at /mobile, giving you mobile control over any Pi agent.

Screens

Tab Description
๐Ÿ’ฌ Chat Send messages with streaming responses via SSE. Type /commands to invoke extension commands, skills, or prompt templates
๐Ÿ“Š Status Agent health, system metrics, uptime, tool count
๐Ÿ“‹ Tasks td issue list with filters, create/update tasks
๐Ÿ“ Files Browse workspace files, view content
๐Ÿ“œ Logs Live log stream with level filters
โฐ Cron Manage scheduled jobs โ€” toggle, run, view schedule
๐Ÿง  Skills Browse registered tools with search
๐Ÿ‘ฅ CRM Contact list with search (via pi-personal-crm)
๐Ÿ“… Calendar Upcoming events (via pi-calendar)
๐Ÿงฉ Extensions View installed extensions and their tools
โš™๏ธ Settings Connection config, API key, theme

Setup

1. Install the extension

Add pi-mobile to your Pi extensions:

# Symlink to extensions directory
ln -s ~/Dev/pi-mobile ~/.pi/agent/extensions/pi-mobile

# Install dependencies
cd ~/.pi/agent/extensions/pi-mobile
npm install

Or add to settings.json:

{
  "extensions": ["~/Dev/pi-mobile"]
}

2. Ensure pi-webserver is running

pi-mobile mounts on the shared pi-webserver. Make sure pi-webserver is enabled.

3. Access the app

http://localhost:<webserver-port>/mobile

Install as PWA

iOS (Safari)

  1. Open /mobile in Safari
  2. Tap Share (๐Ÿ“ค) โ†’ Add to Home Screen โ†’ Add

Android (Chrome)

  1. Open /mobile in Chrome
  2. Tap โ‹ฎ โ†’ Install app โ†’ Install

Remote Access via Tailscale

  1. Install Tailscale on both devices
  2. Access via Tailscale hostname:
http://your-machine.tail12345.ts.net:<port>/mobile

Important: Set an API key when binding to external interfaces:

{
  "pi-webserver": {
    "bind": "0.0.0.0",
    "apiKey": "your-secret-key"
  }
}

Architecture

pi-mobile/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ index.ts          # Extension + API endpoints + SSE broadcasting
โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ app.html          # SPA โ€” 11 Preact screens, dark theme (no build step)
โ”‚   โ”œโ”€โ”€ manifest.json     # PWA manifest
โ”‚   โ””โ”€โ”€ sw.js             # Service worker
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ tsconfig.json
โ”œโ”€โ”€ AGENTS.md
โ””โ”€โ”€ README.md

Tech Stack

  • Preact + HTM from esm.sh CDN โ€” no build step
  • CSS Custom Properties โ€” dark mode theming
  • Service Worker โ€” offline caching (stale-while-revalidate)
  • SSE โ€” real-time agent events and log streaming
  • pi-webserver โ€” shared HTTP server with event-bus mount system