home / skills / robdtaylor / personal-ai-infrastructure / mobileapp

MobileApp skill

/skills/MobileApp

This skill helps you manage and optimize a self-hosted mobile app interface for Claude Code with file, knowledge, and chat access.

npx playbooks add skill robdtaylor/personal-ai-infrastructure --skill mobileapp

Review the files below or copy the command above to add this skill to your agents.

Files (75)
SKILL.md
2.9 KB
---
name: MobileApp
description: |
  PAI Mobile App - Unified mobile interface for Claude Code chat, file browsing, and Obsidian knowledge base access.

  A self-hosted web application accessible from iPhone/iPad via Tailscale.

  ## Quick Start

  ```bash
  cd ~/.claude/Skills/MobileApp
  ./manage.sh install         # Install dependencies
  ./manage.sh build           # Build client
  ./manage.sh service install # Enable auto-restart (recommended)
  ```

  ## Access

  - Local: http://localhost:5050
  - Via Tailscale: http://<tailscale-ip>:5050

  ## Auto-Restart (Production)

  The server can be managed by launchd for automatic restart on crash/reboot:

  ```bash
  ./manage.sh service install   # Enable auto-restart
  ./manage.sh service uninstall # Disable auto-restart
  ./manage.sh service status    # Check service status
  ./manage.sh service logs      # View launchd logs
  ```

  ## Development

  ```bash
  ./manage.sh dev  # Hot reload (auto-pauses launchd service)
  ```

  Dev mode automatically:
  - Pauses the launchd auto-restart service
  - Runs server + client with hot reload
  - Resumes auto-restart when you Ctrl+C

  ## Features

  - **Chat**: Claude Code interaction with streaming responses
  - **Files**: Full home directory browser with file preview
  - **Knowledge**: Obsidian vault viewer with wiki-link support

  ## Architecture

  - **Server**: Bun + TypeScript (port 5050)
  - **Client**: Vue.js + Tailwind CSS (PWA)
  - **API**: REST + WebSocket for real-time chat
---

# PAI Mobile App

Unified mobile interface for Personal AI Infrastructure.

## Commands

| Command | Description |
|---------|-------------|
| `./manage.sh start` | Start production server (manual) |
| `./manage.sh stop` | Stop server |
| `./manage.sh restart` | Restart server |
| `./manage.sh dev` | Development mode with hot reload (pauses auto-restart) |
| `./manage.sh build` | Build client for production |
| `./manage.sh status` | Check server + service status |
| `./manage.sh install` | Install dependencies |
| `./manage.sh service install` | Enable auto-restart on crash/reboot |
| `./manage.sh service uninstall` | Disable auto-restart |
| `./manage.sh service status` | Show launchd service status |
| `./manage.sh service logs` | View launchd logs |

## API Endpoints

### Files
- `GET /api/files/list?path=<path>` - List directory
- `GET /api/files/read?path=<path>` - Read file content
- `GET /api/files/stat?path=<path>` - Get file info
- `GET /api/files/search?q=<query>` - Search files

### Knowledge
- `GET /api/knowledge/notes` - List recent notes
- `GET /api/knowledge/note?path=<path>` - Get note with wiki-links
- `GET /api/knowledge/search?q=<query>` - Search vault

### Chat
- `WS /chat` - WebSocket for real-time Claude Code streaming

## Mobile Setup

1. Enable auto-restart: `./manage.sh service install`
2. On iPhone, open Safari and navigate to your Mac's Tailscale IP:5050
3. Tap Share → Add to Home Screen
4. Open the installed app for native-like experience

Overview

This skill provides a unified mobile interface for interacting with Claude Code chat, browsing files on the host, and viewing an Obsidian knowledge vault from iPhone or iPad. It is a self-hosted web app served on port 5050 and accessible locally or over Tailscale for secure remote access. The client is a PWA built with Vue + Tailwind for a native-like mobile experience.

How this skill works

The server runs on Bun + TypeScript and exposes REST endpoints for file and knowledge operations plus a WebSocket endpoint for streaming Claude Code chat. A single-page Vue client communicates with these APIs and can be installed to the home screen as a PWA. A management script handles install, build, dev mode, and an optional launchd service for auto-restart on macOS.

When to use it

  • When you need mobile access to Claude Code chat with streaming responses.
  • When you want to browse and preview files from your host machine on iPhone/iPad.
  • When you use Obsidian and want quick access to your vault with wiki-link rendering.
  • When you prefer a self-hosted solution reachable via Tailscale for privacy.
  • During development when hot reload and easy service control are required.

Best practices

  • Enable the launchd auto-restart service in production to keep the server running after reboots or crashes.
  • Use Tailscale for secure remote access instead of opening ports to the public internet.
  • Run ./manage.sh dev for development; it auto-pauses the service and enables hot reload.
  • Build the client for production (./manage.sh build) after development and before enabling auto-restart.
  • Limit vault and file access to trusted networks and accounts; the app exposes home directory browsing.

Example use cases

  • Carry a compact interface for Claude Code chat on your iPhone for quick coding or debugging sessions.
  • Preview and search files from your Mac when away from your desk via Tailscale.
  • Reference Obsidian notes and follow wiki-links directly on iPad during meetings or research.
  • Run a private mobile companion app for personal AI tooling without relying on third-party cloud services.
  • Iterate on client UI in dev mode with hot reload while the launchd service is temporarily paused.

FAQ

How do I access the app from my iPhone?

Install and run the server, enable Tailscale on your Mac and phone, then open http://<tailscale-ip>:5050 in Safari and Add to Home Screen.

How do I keep the server running after reboot?

Use ./manage.sh service install to register the launchd service for automatic restart on macOS.

What endpoints power the app?

Files and knowledge use REST endpoints (list, read, search); chat uses a WebSocket at /chat for streaming responses.