Run OpenCode in your browser. Install the CLI, open localhost:3000, done. Works on desktop browsers, tablets, and phones as a PWA.
This repository is the IPaper monorepo. The published CLI and web package lives in packages/web as @ai4paper/ipaper.
Full project overview, screenshots, and all features: github.com/ai4paper/ipaper
curl -fsSL https://raw.githubusercontent.com/ai4paper/ipaper/main/scripts/install.sh | bashOr install manually: bun add -g @ai4paper/ipaper (or npm, pnpm, yarn).
Prerequisites: OpenCode CLI installed, Node.js 20+.
ipaper # Start on port 3000
ipaper --port 8080 # Custom port
ipaper --ui-password secret # Password-protect UI
ipaper logs # Follow latest instance logs
OPENCODE_PORT=4096 OPENCODE_SKIP_START=true ipaper # Connect to external OpenCode server
OPENCODE_HOST=https://myhost:4096 OPENCODE_SKIP_START=true ipaper # Connect via custom host/HTTPS
ipaper stop # Stop server
ipaper update # Update to latest versionConnect to external OpenCode server
OPENCODE_PORT=4096 OPENCODE_SKIP_START=true ipaper
OPENCODE_HOST=https://myhost:4096 OPENCODE_SKIP_START=true ipaper| Variable | Description |
|---|---|
OPENCODE_HOST |
Full base URL of external server (overrides OPENCODE_PORT) |
OPENCODE_PORT |
Port of external server |
OPENCODE_SKIP_START |
Skip starting embedded OpenCode server |
IPAPER_OPENCODE_HOSTNAME |
Bind hostname for managed OpenCode server (default: 127.0.0.1, use 0.0.0.0 for LAN/remote access; trusted networks only) |
Bind managed OpenCode to LAN / Tailscale
IPAPER_OPENCODE_HOSTNAME=0.0.0.0 ipaper --port 3000Security note: binding to 0.0.0.0 exposes the server on all network interfaces. Use only on trusted networks and protect it with firewall rules or --ui-password.
Background & daemon mode
ipaper # Runs in background by default
ipaper stop # Stop background serversystemd service (VPN / LAN access)
Use --foreground to keep the CLI process alive so systemd (or another process manager) can track and restart it. Combine with OPENCODE_HOST to connect to an OpenCode instance running as a separate service.
~/.config/systemd/user/opencode.service
[Unit]
Description=OpenCode Server
[Service]
Type=simple
ExecStart=opencode serve --port 4095
Environment="PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/YOU/.local/bin:/home/YOU/.npm-global/bin:/usr/local/bin:/usr/bin:/bin"
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
Restart=on-failure
RestartSec=5
[Install]
WantedBy=default.targetWhy set
PATHandSSH_AUTH_SOCK? systemd user services start with a minimal environment and do not source your shell profile. Without an explicitPATH, OpenCode may not find tools installed via Homebrew, npm, or~/.local/bin. WithoutSSH_AUTH_SOCK, git operations over SSH can fail.%texpands to$XDG_RUNTIME_DIR(for example/run/user/1000), where most SSH agents write their socket.
~/.config/systemd/user/ipaper.service
[Unit]
Description=IPaper Web Server
After=opencode.service
[Service]
Type=simple
ExecStart=ipaper serve --port 3000 --host 0.0.0.0 --ui-password your-password --foreground
Environment="OPENCODE_HOST=http://localhost:4095"
Environment="OPENCODE_SKIP_START=true"
Restart=on-failure
RestartSec=5
[Install]
WantedBy=default.targetsystemctl --user daemon-reload
systemctl --user enable --now opencode ipaper--host 0.0.0.0 is required to listen on all interfaces (the default is 127.0.0.1). Use --host <ip> or IPAPER_HOST=<ip> to bind to a specific interface instead.
Install workspace dependencies:
bun installCommon monorepo commands from the repository root:
bun run dev # Full local dev flow
bun run dev:all # Server, web build watcher, and shared UI watcher
bun run build # Build all workspaces
bun run type-check # Type-check all workspaces
bun run lint # Lint all workspacesWorkspace layout:
packages/web: published@ai4paper/ipaperCLI and web runtimepackages/ui: shared UI/runtime package used by the web app
- Mobile-first PWA: optimized chat controls, keyboard-safe layouts, drag-to-reorder projects.
- Background notifications: know when your agent finishes, even from another tab.
- Self-update: update and restart from the UI while keeping server settings intact.
- Cross-tab tracking: session activity stays in sync across browser tabs.
MIT