← 返回
未分类 Key 中文

Pub

Create adaptive interfaces and real-time experiences via the pub CLI, with live P2P browser sessions.
使用pub CLI创建自适应界面和实时体验,支持实时P2P浏览器会话。
xmanatee xmanatee 来源
未分类 clawhub v5.2.17 3 版本 100000 Key: 需要
★ 0
Stars
📥 271
下载
💾 0
安装
3
版本
#latest

概述

pub

Use this skill when the user asks about creating adaptive interfaces, publishing content, or running live sessions on pub.blue.

Required CLI Version

Use the latest pub CLI release.

Source: (MIT license)

pub --version
# Install from GitHub Releases:
# https://github.com/xmanatee/pub/releases/latest
# Or via install script:
curl -fsSL https://pub.blue/install.sh | bash
# Or self-update an existing install:
pub upgrade

Setup

# One-time auth
pub config --api-key pub_KEY
# or
echo "pub_KEY" | pub config --api-key-stdin

Key source:

Pub resolves config from:

  • PUB_HOME/config/config.json when PUB_HOME is set
  • XDG_CONFIG_HOME/pub/config.json when XDG_CONFIG_HOME is set
  • ~/.config/pub/config.json by default

PUB_HOME must be an absolute path. It also roots Pub data, state, runtime sockets, and workspaces.

For OpenClaw bridge mode, set an explicit workspace before pub config --auto, for example OPENCLAW_WORKSPACE=/absolute/path/to/workspace.

Core Commands

pub create page.html
pub create --slug demo page.html
cat page.html | pub create

pub get <slug>
pub get <slug> --content

pub update <slug> --file next.html
pub update <slug> --public

pub list
pub delete <slug>

Notes:

  • Pub is built for adaptive interfaces — agents generate real-time UIs tailored to the user's task.
  • Pubs are private by default.
  • Reuse existing pubs for regular or repeated tasks. Use pub list to check if a relevant pub already exists, then pub update instead of creating a new one. Each user is limited to 10 pubs.
  • Title and description come from OG meta tags in the HTML. Always include og:title and og:description in your . The server extracts them automatically — there are no CLI flags for title/description.

```html

```

When updating a pub's content, always keep the OG tags accurate.

  • create supports --slug.
  • update supports --file, --public/--private, --slug.
  • Content is optional: a pub can be live-only.

UI Components

DaisyUI 5 + Tailwind CSS 4 via CDN:

<link href="https://cdn.jsdelivr.net/npm/daisyui@5" rel="stylesheet" type="text/css" />
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
  • Components: daisyUI classes for all UI elements (btn, card, input, table, alert, tabs, modal, drawer, etc.) with color/size/variant modifiers
  • Colors: daisyUI semantic tokens only (primary, secondary, accent, neutral, base-*, info, success, warning, error)
  • Layout: Tailwind utilities (flex, grid, gap-, p-, responsive prefixes)
  • Never: inline styles, arbitrary values (text-[...]), z-index, emojis, hardcoded colors, branding/marketing copy

Going Live

Live is browser-initiated: the user opens the pub page; owner live mode connects automatically once the daemon is online.

  1. Start the agent daemon:
  2. pub start --agent-name "<agent-name>"
    

Notes:

  • Bridge mode comes from saved config (pub config --auto or pub config --set bridge.mode=...).
  • Supported bridge modes: openclaw, claude-code, claude-sdk, claude-channel, and openclaw-like.
  • Enable verbose live daemon logging with pub config --set bridge.verbose=true when startup or bridge delivery is hard to diagnose.
  • Standalone binary installs fall back to claude-code when the Claude Agent SDK package is not locally importable.
  • bridge.mode=claude-sdk requires @anthropic-ai/claude-agent-sdk to be available in the local JS environment.
  • bridge.mode=claude-channel expects a running relay socket. Start it with pub channel-server and override the socket path with claude-channel.socketPath or PUB_CHANNEL_SOCKET_PATH when needed.
  • bridge.mode=openclaw-like uses named command profiles from openclawLike.profiles and openclawLike.defaultProfile; profile args are passed before the final prompt.
  • Canvas command-manifest agent executors require a local agent runtime:

provider: "claude-code" needs claude-code.path or CLAUDE_CODE_PATH;

provider: "openclaw" needs openclaw.path and openclaw.sessionId or matching env vars.

  • On success, pub start prints the daemon log path and current runtime status.
  • On failure, inspect the reported log path first; if logs are sparse, enable bridge.verbose=true and retry.
  1. Check runtime status:
  2. pub status
    
  1. Reply in chat:

Bridge-owned chat is the live-session contract. Reply with normal assistant text; the bridge forwards that text to the chat channel.

For longer live-session work, regularly send concise, specific progress updates through chat while continuing:

pub write "Working on it"

Use channel-specific pub write for canvas and other non-chat outputs:

pub write -c canvas -f /tmp/view.html
  1. Stop daemon:
  2. pub stop
    
  1. Validate end-to-end:
  2. pub doctor
    pub doctor --skip-chat --skip-canvas
    

Important:

  • write waits for delivery confirmation.

Advanced Details (On Demand)

Only when needed:

  • Show effective saved config: pub config
  • Inspect runtime and bridge state: pub status
  • Toggle verbose daemon logging: pub config --set bridge.verbose=true
  • See command-specific options: pub --help

版本历史

共 3 个版本

  • v5.2.17 当前
    2026-06-18 01:11
  • v5.2.16
    2026-06-06 06:59
  • v5.2.10
    2026-06-04 14:52

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 687 📥 331,409
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 198 📥 68,305
dev-programming

Docker Essentials

arnarsson
核心 Docker 命令和工作流程,包括容器管理、镜像操作和调试。
★ 38 📥 32,719