freshcrate
Home > AI Agents > piclaw

piclaw

I'm going to build my own OpenClaw, with blackjack... and bun!

Description

I'm going to build my own OpenClaw, with blackjack... and bun!

README

piclaw β€” your self-hosted AI workspace

PiClaw

PiClaw packages the Pi Coding Agent into a self-hosted workspace with a streaming web UI, multi-provider LLM support, persistent state, and a growing collection of built-in tools β€” code editor, terminal, VNC client, document viewers, kanban boards, and autonomous experiment loops.

It is built for people who want a practical, stateful agent they can run locally or in a container without stitching together half a dozen separate services.

Why PiClaw

Demo Animation

  • Streaming web UI β€” real-time chat with Markdown, KaTeX, Mermaid, and Adaptive Cards
  • Persistent agent state β€” SQLite-backed messages, media, tasks, token usage, encrypted keychain, and session-scoped SSH / Proxmox / Portainer profiles
  • Workspace-native workflow β€” browse files, preview documents, upload attachments, drag files into the workspace explorer with progress feedback and a client-side size guard, edit code, reference files in prompts, and optionally flip core tools to a remote SSH host for the current session
  • Built-in tools β€” Ghostty-based terminal, code editor, Office/PDF/CSV/image/video viewers, draw.io, kanban board and mindmap editors, VNC client, browser automation, sharp-backed image processing, bundled MCP access via pi-mcp-adapter, and agent-only infrastructure tools for SSH, Proxmox, and Portainer
  • Visual artifact generation β€” agent-driven HTML pages, architecture diagrams, data tables, diff reviews, slide decks, and draw.io files using vendored Mermaid, ECharts, D3, and KaTeX libraries with a consistent visual-design profile (adapted from nicobailon/visual-explainer)
  • Agent control features β€” steering, queued follow-ups, threading, side prompts, autoresearch experiment loops, and scheduled tasks
  • Context conservation by default β€” small always-active tool baseline, staged tool/script discovery via list_tools / list_scripts (filtered or intent-guided discovery β†’ compact summary β†’ on-demand detail β†’ activate/use), lazy activation for non-default tools, and opt-in examples for higher-detail workflow help
  • Optional auth and channels β€” passkeys/TOTP for the web UI, plus optional WhatsApp integration

Quick start

mkdir -p ./home ./workspace

docker run -d \
  --init \
  --name piclaw \
  --restart unless-stopped \
  -p 8080:8080 \
  -e PICLAW_WEB_PORT=8080 \
  -v "$(pwd)/home:/config" \
  -v "$(pwd)/workspace:/workspace" \
  ghcr.io/rcarmo/piclaw:latest

Open http://localhost:8080 and type /login to configure your LLM provider, including custom OpenAI-compatible endpoints when you are not using one of the built-in hosted providers.

Tip

Keep --init enabled for docker run / podman run so the runtime inserts a tiny init process for signal forwarding and zombie reaping. The bundled docker-compose.yml now sets the equivalent init: true flag.

Mount Container path Contents
Home /config Agent home (.pi/, .gitconfig, .bashrc)
Workspace /workspace Projects, notes, and piclaw state

Note

In the container image, /home/agent/.pi is backed by /config/.pi. With the stock docker run / docker-compose.yml examples above, Pi home state therefore persists on the host under ./home/.pi/agent/.

That means provider login state and model metadata should survive rebuilds/recreates when stored under files such as:

  • ./home/.pi/agent/auth.json
  • ./home/.pi/agent/models.json

Mounting directly to /home/agent or /home/agent/.pi/agent can also work, but /config is the canonical documented persistence path for the container image.

Warning

Never delete /workspace/.piclaw/store/messages.db. It contains chat history, media, and task state.

Important

You do not need to set provider API keys in piclaw environment variables. PiClaw reuses provider credentials configured in Pi Agent settings.

Note

Power users can place workspace-scoped shell environment overrides in /workspace/.env.sh. PiClaw sources that file for the embedded terminal and on runtime startup, which is useful for things like PATH tweaks or persisting gh auth login with GH_CONFIG_DIR=/workspace/.config/gh. This hook is user-controlled: if its contents break PiClaw startup, shell behavior, or tool resolution, that breakage is the user's responsibility.

Web UI

PiClaw is single-user, mobile-friendly, and streams updates over SSE.

Chat

  • Thought and draft panels during streaming
  • Live steering and queued follow-ups
  • Adaptive Cards with persisted submissions
  • /btw side conversations
  • File attachments, link previews, threaded turns, and syntax-highlighted previews for common text/code attachments
  • Themes and tinting via /theme and /tint
  • Mobile-friendly layout with webapp manifest

Workspace

  • Sidebar file browser with auto-refresh, drag-and-drop upload progress, and a client-side 256 MB upload guard before the request even starts
  • File-reference pills in prompts
  • Folder sizes in the starburst explorer
  • Workspace search index status with one-click reindex from the explorer header

Editor

  • CodeMirror 6 with syntax highlighting for JS/TS, Python, Go, JSON, CSS, HTML, YAML, SQL, XML/SVG, Markdown, and Shell
  • Search and replace, dirty-state tracking, line wrapping
  • Lazy-loaded local bundle β€” no CDN dependency

Terminal

  • Ghostty-based web terminal β€” a real shell in the browser, not a simulation
  • Runs as a dock panel or a standalone tab
  • Detachable into popout windows with live session transfer
  • Enabled by default on Linux and macOS; disable with PICLAW_WEB_TERMINAL_ENABLED=0
  • Still disabled by default on Windows

Viewers

  • Draw.io β€” self-hosted editor with SVG/PNG/XML export back to workspace
  • Office documents β€” .docx, .xlsx, .pptx, .odt, .ods, .odp
  • CSV/TSV β€” dedicated table viewer
  • PDF, images, video β€” inline viewers
  • Text/code attachments β€” syntax-highlighted timeline preview modal for common code/config formats
  • Kanban boards β€” *.kanban.md in a drag-and-drop board editor (Obsidian Kanban compatible)
  • Mindmaps β€” *.mindmap.yaml in a D3/SVG visual editor
  • VNC remote display β€” connect to allowlisted targets from a tab, with direct-connect enabled by default on Linux, macOS, and Windows (experimental); disable with PICLAW_WEB_VNC_ALLOW_DIRECT=0

Automation

  • /image and /flux β€” workspace-backed image generation commands for Azure OpenAI / Foundry; /image now supports --transparent for transparent PNG output when the Azure OpenAI model supports it
  • image_process β€” sharp-backed workspace image manipulation for resize/crop/convert/optimise, metadata inspection, text/SVG/composite operations, and animated GIF frame/spritesheet workflows
  • cdp_browser β€” Chromium/Edge/Chrome automation via CDP for navigation, JS evaluation, DOM clicking, and screenshots
  • mcp via pi-mcp-adapter β€” token-efficient access to external MCP servers configured through .pi/mcp.json
  • Experimental m365 extension β€” opt-in Microsoft 365 automation bundle for Teams, Graph, OneDrive, SharePoint, and calendar flows; enable with PICLAW_ENABLE_M365_EXPERIMENTAL=1 (primarily validated on Windows with YOLO mode, with Edge β†’ Chrome β†’ Chromium browser lookup across Windows/macOS/Linux). Graph-backed consumer-account support now exists; Teams chat flows still require a work/school tenant, and the auth/browser reuse path now follows the current Teams web-app entry instead of the stale legacy route.
  • win_* tools β€” Windows-only desktop automation via Win32 FFI for window enumeration, screenshots, element inspection, clicking, typing, and process management. No-ops on non-Windows platforms.

Configuration

Key environment variables:

Variable Default Purpose
PICLAW_WEB_PORT 8080 Web UI port
PICLAW_WEB_TERMINAL_ENABLED 1 on Linux/macOS, 0 on Windows Enable or disable the authenticated Ghostty-based web terminal
PICLAW_WEB_VNC_ALLOW_DIRECT 1 on Linux/macOS/Windows Allow or disable direct VNC targets supplied at runtime
PICLAW_WEB_TOTP_SECRET (empty) Base32 TOTP secret; enables login gate (or initialize with /totp)
PICLAW_WEB_PASSKEY_MODE totp-fallback totp-fallback, passkey-only, or totp-only
PICLAW_ASSISTANT_NAME PiClaw Display name in the UI
PICLAW_ENABLE_M365_EXPERIMENTAL 0 Enable the experimental Microsoft 365 extension bundle
PICLAW_KEYCHAIN_KEY (empty) Master key for encrypted secret storage
PICLAW_TRUST_PROXY 0 Enable when behind a reverse proxy or tunnel

For the full list, auth setup (TOTP/passkeys), session-scoped SSH-backed remote tools, reverse proxy configuration, and SSHFS/FUSE support, see docs/configuration.md.

Other install methods

Install without Docker

bun add -g github:rcarmo/piclaw

Experimental. Linux/macOS/Windows. See docs/install-from-repo.md.

On Windows, PiClaw remains a secondary / not-officially-supported target. Shell-like child processes now run attached there (detached=false) so stdout/stderr remain capturable; Unix-like hosts still use detached process groups for cleaner tree termination on abort/shutdown.

Build from source

See docs/development.md.

Documentation

Setup & operations

Architecture & internals

Reference

Platform studies

Credits

Licence

MIT

Release History

VersionChangesUrgencyDate
v1.8.3# PiClaw v1.8.3 β€” "They Live" *I have come here to chew bubblegum and stop agent turns... and I'm all out of bubblegum.* ## Features - **Visual stop button during agent turns** β€” the compose area now shows a prominent stop button while the agent is working, with distinct states for active processing and compaction. No more staring at a blank screen wondering if anyone's home. - **Dynamic `/skill:` autocomplete** β€” typing `/skill:` in the compose box now autocompletes from actual registered skHigh4/19/2026
v1.8.2# PiClaw v1.8.2 β€” "Sliding Doors" A patch release about interrupted turns, restored model state, and swipe navigation finally behaving like someone thought through what happens on phones after 2023. ## Features - **Automatic turn recovery now has a proper user-facing shape** β€” interrupted turns can recover more deliberately, recovered replies carry an explicit marker in the timeline, stale in-flight web chats can now be recovered while the runtime is still alive instead of waiting for the nexHigh4/19/2026
v1.8.1# PiClaw v1.8.1 β€” "Heat" A point release about hardening the doors, slimming the startup path, and finally teaching the web client how to do push notifications without embarrassing itself in public. ## Platform news - **Startup has been put on a stricter diet** β€” Azure bootstrap work, web viewer routes, bundled browser tooling, and office tooling have been shoved off the cold path so PiClaw can start answering sooner and contemplating its own existence later. - **The web client is markedly leHigh4/18/2026
v1.8.0# PiClaw v1.8.0 - "This Is Spinal Tap" A hefty point release about making the web UI faster, the discovery surface smarter, the image pipeline unexpectedly ambitious, and the upstream model stack current enough to suggest someone has been feeding the amplifier after midnight. ## Features - **PiClaw now picks up support for Anthropic Opus 4.7 via the upstream Pi core package updates** β€” the upstream stack moved to `0.67.6` during the release window alone, which is the sort of dependency velociHigh4/16/2026
v1.7.15# PiClaw v1.7.15 β€” "Blow-Up" A release about seeing what the system is actually doing, surviving iPhone PWA melodrama, and giving operators better answers than a blank stare and a quietly compromised log file. ## Features - **The `messages` tool grew into a proper audit surface** β€” it now supports `grep`, `extract`, and checkpoint `diff`, which makes chat-history forensics much less dependent on direct SQLite excavation and the sort of optimism that usually precedes disappointment. - **ScheduHigh4/15/2026
v1.7.14# PiClaw v1.7.14 β€” "Brazil" A patch release about making the operator surface clearer under pressure: better status hints, better timeout behavior, better terminal and compose ergonomics, and fewer situations where provider failures vanish into the wallpaper like a procedural memo nobody meant to approve. ## Features - **Added `/effort` as an alias for `/thinking`, with provider-native level labels** β€” model effort controls are easier to discover and a little less dependent on everyone remembHigh4/14/2026
v1.7.13# PiClaw v1.7.13 β€” "The Paper Chase" A release about operator ergonomics, search behaving properly, and giving the M365 extension enough actual skills to justify its paperwork β€” which feels especially on-brand for a Monday the 13th, a date apparently engineered to combine bureaucracy with menace. ## Features - **The experimental M365 extension now ships eleven operator-facing skills** β€” which moves it a fair distance away from "interesting plumbing demo" and closer to something a human might High4/13/2026
v1.7.12# PiClaw v1.7.12 β€” "The Conversation" A release about seeing more, guessing less, and making the web UI slightly less likely to surprise you in ways nobody ordered. ## Features - **The session tree viewer is now properly useful instead of merely promising to be** β€” `/tree` gained a search/filter box, more compact rows, theme-derived role tags, fuller sidebar detail, human-readable tool arguments, and better prompt previews, which is rather better than forcing people to reverse-engineer state Medium4/12/2026
v1.7.11# PiClaw v1.7.11 β€” "Inception" A release about trees, widgets, previews, Azure behaving slightly less like an expensive practical joke, and the experimental M365 auth stack becoming just a touch less feral. ## Features - **Added an interactive session tree viewer for the web UI** β€” `/tree` now opens a proper in-app widget for exploring chat branches, active leaves, tool calls, outputs, and message context, which is vastly preferable to squinting at invisible state and calling it observabilityMedium4/12/2026
v1.7.9# PiClaw v1.7.9 β€” "The Player" A patch release about visibility, polish, previews, and the general business of making the UI look more intentional than accidental. ## Features - **Workspace index status and reindex controls** β€” the workspace UI now exposes indexing state and lets you kick a reindex when search feels stale, which is rather better than treating uncertainty as an advanced feature. - **Compare-to-saved diff mode in the editor** β€” the editor can now show changes against the saved High4/8/2026
v1.7.8# PiClaw v1.7.8 β€” "Ghost in the Shell" A patch release about shells, markdown, Dream bootstrap, and making a few previously unhelpful surfaces behave like they have met a competent adult. ## Features - **Rendered markdown code blocks now get syntax highlighting** β€” timeline posts with fenced code blocks are easier to scan, which is useful because monochrome walls of code are mostly just a tax on human patience. - **Timeline posts can now be copied back as Markdown** β€” message copy actions preMedium4/7/2026
v1.7.7# PiClaw v1.7.7 β€” "Ronin" A smaller release about handling secrets, shells, and unreliable infrastructure with slightly more professionalism and slightly less theatre. ## Platform news - **Keychain env secrets now flow across shell exec surfaces** β€” keychain entries with shell-safe names can now be injected automatically across local `bash`, PowerShell, SSH-backed shell sessions, and exec-style infra flows, which is much nicer than manually smuggling credentials through every command line likMedium4/6/2026
v1.7.6# PiClaw v1.7.6 β€” "Dreamscape" Dream now runs in its own lane, as a proper memory-maintenance pass rather than a chatty impostor wearing the clothes of the old daily-notes and situational-awareness skills. ## Features - **Dream mode replaces the old daily-notes / situational-awareness workflow** β€” `/dream` and AutoDream now provide the canonical memory-maintenance path, consolidating what used to be split across older note-refresh and orientation skills into one model-driven flow. - **Dream iMedium4/6/2026
v1.7.5# PiClaw v1.7.5 β€” "Sneakers" More tools, more documentation, and slightly fewer opportunities to improvise your way into trouble. ## Platform news - **Session-scoped SSH core tooling** β€” chats can now direct the core tool path at a remote SSH target on a per-session basis, so remote file and shell work no longer needs awkward global configuration. - **Infra tooling consolidated** β€” the infrastructure-facing tool surface is now more coherent, with the native tool path taking precedence over olMedium4/5/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

mainframeAI-native development environment for orchestrating agentsv0.11.1
acolyteA terminal-first AI coding agent. Open-source, observable, and built for developer control.v0.19.0
iterateA self-evolving coding agent written in Go. Reads its own source, decides what to improve, writes code, runs tests, and commits β€” autonomously.0.0.0
PulSeedAn AI agent system that grows your goals from seed to tree. Set a goal β€” Seedy observes, delegates, and tracks until done.v0.4.18
serverlessclawOfficial ServerlessClaw: The authoritative autonomous AI agent swarm for AWS. Zero idle cost, self-evolving, and infinite scale. Powered by OpenClaw.main@2026-04-21