我将要自己制作OpenClaw,还有二十一点和面包。
I'm going to build my own OpenClaw, with blackjack and bun

原始链接: https://github.com/rcarmo/piclaw

## PiClaw:基于Docker的代理沙箱 PiClaw 是一个自包含的、基于Docker的环境,用于运行Pi Coding Agent,提供安全隔离的Debian工作区。它具有基于Web的编排器,支持持久会话和实时流式UI,以丰富的渲染方式(Markdown、KaTeX、Mermaid)显示逐Token的响应。 主要功能包括带有预览和上传功能的的文件浏览器,内置CodeMirror 6编辑器支持12种语言,以及Passkeys和TOTP身份验证等强大的安全选项。可选的WhatsApp集成也可用。 PiClaw 提供了一系列技能,包括调试、Playwright 和网络搜索。它将数据存储在SQLite中,重要的聊天记录保存在 `/workspace/.piclaw/store/messages.db` 中。配置灵活,支持反向代理,并通过环境变量和配置文件自定义设置。 开发包括构建、测试和发布工具,通过GitHub Container Registry提供多架构支持(amd64 & arm64)。PiClaw 兼容各种符合OCI标准的运行时,如Docker、Podman 和 Apple Containers。

黑客新闻 新的 | 过去的 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 我要自己制作OpenClaw,并配有二十一点和面包(github.com/rcarmo) 7点 由 rcarmo 25分钟前 | 隐藏 | 过去的 | 收藏 | 讨论 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请YC | 联系方式 搜索:
相关文章

原文

PiClaw

PiClaw is a Docker-based sandbox for running the Pi Coding Agent in an isolated Debian environment. It bundles piclaw — a web-first orchestrator built on the Pi SDK with persistent sessions, a streaming web UI, and scheduled tasks. WhatsApp is optional. Inspired by agentbox and nanoclaw.

Demo Animation

  • Streaming web UI — real-time token-by-token updates over SSE, with Markdown, KaTeX, and Mermaid rendering
  • Workspace explorer — file tree sidebar with previews, file reference pills, and downloads
  • Disk usage starburst — folder-size visualization with hover details and drill-down
  • Code editor — built-in CodeMirror 6 with syntax highlighting for 12 languages, search/replace, and save
  • Persistent storage — SQLite-backed messages, media, tasks, token usage, and encrypted keychain
  • Skills — setup, debugging, Playwright, scheduling, charts, web search, and more
  • Passkeys + TOTP authentication — optional WebAuthn passkeys with TOTP fallback (iOS/Android webapp support)
  • WhatsApp — optional secondary channel
make build    # Build the Docker image
make up       # Start the container (supervisord launches piclaw)

Open http://localhost:8080 in your browser. To use pi interactively instead:

docker exec -u agent -it piclaw bash
cd /workspace && pi

Provision provider credentials via /shell <command> in the web UI or docker exec with pi /login. See docs/configuration.md for details.

The UI is single-user, mobile-friendly, and streams updates over SSE:

  • Thought/Draft panels — visible during streaming
  • Live steering — send follow-ups while the agent is still responding
  • File attachments with download links
  • Link previews via server-side OpenGraph fetch
  • Multi-turn threading — subsequent turns are visually threaded under the first
  • Themes + tinting — presets plus /theme and /tint commands (Solarized auto light/dark)
  • Mobile-first layout with webapp manifest

The sidebar shows a file tree of /workspace with auto-refresh. Click a file to preview it or add a file reference pill to the next prompt. Drag and drop files onto the tree to upload them. It also includes a folder-size starburst preview with hover details and drill-down.

Click the pencil icon on any text file preview (up to 256 KB) to open the built-in editor. It appears as a resizable centre pane between the sidebar and the chat.

  • 12 languages — JS/TS (JSX/TSX), Python, Go, JSON, CSS, HTML, YAML, SQL, XML/SVG, Markdown, Shell
  • Search and replace — Cmd/Ctrl+F and Cmd/Ctrl+H
  • Save — Cmd/Ctrl+S or the Save button; dirty state is tracked
  • Line wrapping, line numbers, and active line highlight
  • Vendored bundle (~245 KB gzip) — no external CDN dependencies
Mount Container path Contents
Home /config Agent home (.pi/, .gitconfig, .bashrc)
Workspace /workspace Projects, piclaw state, notes

Never delete /workspace/.piclaw/store/messages.db — it holds all chat history, media, and tasks.

Key environment variables:

Variable Default Purpose
PICLAW_WEB_PORT 8080 Web UI port
PICLAW_WEB_TOTP_SECRET (empty) Base32 TOTP secret; enables login gate
PICLAW_WEB_PASSKEY_MODE totp-fallback Passkey mode: totp-fallback, passkey-only, or totp-only
PICLAW_ASSISTANT_NAME PiClaw Display name in the UI
PICLAW_KEYCHAIN_KEY (empty) Master key for encrypted secret storage

For the full list (TLS, reverse proxies, timeouts, Pushover, WhatsApp, keychain, external workspaces), see docs/configuration.md.

Reverse proxies / tunnels

If piclaw is running behind a reverse proxy or tunnel (for example Cloudflare Tunnel, Caddy, or Nginx TLS termination), enable proxy trust so origin checks and absolute URL generation use the external host/proto:

or in .piclaw/config.json:

{
  "web": {
    "trustProxy": true
  }
}

Your proxy should forward either the standard Forwarded header or the usual X-Forwarded-Host / X-Forwarded-Proto headers.

make build-piclaw    # Full build: vendor bundle + web assets + TypeScript
make vendor          # Rebuild CodeMirror vendor bundle only
make lint            # ESLint
make test            # Run all tests
make local-install   # Pack, install globally, and restart piclaw

Tests use the Bun runner (cd piclaw && bun test). Sequential mode is recommended for SQLite safety (--max-concurrency=1).

Pushing a version tag triggers .github/workflows/publish.yml — multi-arch builds (amd64 + arm64) published to GHCR.

make bump-patch   # bump patch version, commit, and tag
make bump-minor   # bump minor version, commit, and tag
make push         # push commits + tag → triggers CI

PiClaw works with any OCI-compliant runtime:

  • Docker / Docker Desktop — primary target
  • Apple Containers (macOS 26+)
  • Podman, nerdctl, etc.

MIT

联系我们 contact @ memedata.com