بنقرة واحدة
cf-tunnel
Cloudflare Tunnel 一键管理工具,支持统一 Bun CLI(share + panel 合并)、端口自动避让、状态检查与自解释文档
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Cloudflare Tunnel 一键管理工具,支持统一 Bun CLI(share + panel 合并)、端口自动避让、状态检查与自解释文档
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Web search, online search, real-time search, internet search, Google alternative, Bing alternative, DuckDuckGo alternative, search the web, lookup online, find information, research,查询,搜索,搜索结果,网页搜索,联网搜索,实时搜索,网络查询,资料查找,信息检索,最新资讯,新闻搜索, Tavily Search API for optimized, real-time web search results for RAG. A pre-configured, cost-effective search tool.
在 macOS 上使用 osascript 执行 AppleScript 或 JavaScript for Automation (JXA) 实现系统自动化。当用户需要控制 macOS 应用(Finder、Safari、Mail、Calendar、Keynote、Numbers、Pages 等)、操作系统 UI、显示对话框/通知、读写剪贴板、自动化重复任务、或任何涉及 osascript/AppleScript/JXA 的需求时,必须使用本技能。即使用户只说"帮我自动化这个"或"在 Mac 上操作 XXX",也应优先考虑本技能。
Model configuration editor for ~/.pi/agent/models.json - 使用 Bun 脚本管理模型配置
读取和写入输出风格目录的工具技能。当用户需要:(1)读取输出风格文件,(2)写入/创建输出风格文件,(3)管理输出风格目录,(4)解析风格文件格式时使用。
Best practices for writing and maintaining high-quality role memories.
Periodic maintenance of role memory: dedup, tidy, consolidate, and pending management.
| name | cf-tunnel |
| description | Cloudflare Tunnel 一键管理工具,支持统一 Bun CLI(share + panel 合并)、端口自动避让、状态检查与自解释文档 |
目标:把“临时暴露 + 管理面板 + 端口管理”统一到一个命令入口,避免端口混乱。
bun ~/.pi/agent/skills/cf-tunnel/scripts/cf.ts
# 启动临时暴露(等同 share start)
bun ~/.pi/agent/skills/cf-tunnel/scripts/cf.ts start --dir ./demos/html
# 暴露已有端口
bun ~/.pi/agent/skills/cf-tunnel/scripts/cf.ts start --port 8766
# 暴露单文件
bun ~/.pi/agent/skills/cf-tunnel/scripts/cf.ts start --file ./demos/html/index.html --route /index.html
# 启动/停止/查看面板
bun ~/.pi/agent/skills/cf-tunnel/scripts/cf.ts panel start --port 8788 --host 127.0.0.1
bun ~/.pi/agent/skills/cf-tunnel/scripts/cf.ts panel status
bun ~/.pi/agent/skills/cf-tunnel/scripts/cf.ts panel stop
# 综合状态(share + panel)
bun ~/.pi/agent/skills/cf-tunnel/scripts/cf.ts status
# 停止(默认全停)
bun ~/.pi/agent/skills/cf-tunnel/scripts/cf.ts stop
# 只停 share
bun ~/.pi/agent/skills/cf-tunnel/scripts/cf.ts stop --share
# 只停 panel
bun ~/.pi/agent/skills/cf-tunnel/scripts/cf.ts stop --panel
cf.ts 同时管理 share / panelcf-share-webcf-share-tunnelcf-share-panelshare.ts、panel.ts 仍可直接使用# share 底层
bun ~/.pi/agent/skills/cf-tunnel/scripts/share.ts start --dir ./demos/html
bun ~/.pi/agent/skills/cf-tunnel/scripts/share.ts status
bun ~/.pi/agent/skills/cf-tunnel/scripts/share.ts stop
# panel 底层
bun ~/.pi/agent/skills/cf-tunnel/scripts/panel.ts --port 8788 --host 127.0.0.1
建议优先使用
cf.ts,底层命令主要用于调试。
启动面板后默认地址:
http://127.0.0.1:8788(若占用会自动避让)API:
GET /api/status 当前状态POST /api/start 启动(body 支持 port/dir/file/route)POST /api/stop 停止GET /api/logs 日志 tailGET /api/history 历史记录POST /api/history/clear 清空历史# Cloudflared(如未安装)
wget -q https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
sudo dpkg -i cloudflared-linux-amd64.deb
本地静态服务优先级:python3 > bunx > npx(无可用工具时直接失败)
cf.ts status 先看三类会话是否在线~/.cf-tunnel/share-tunnel.logcf.ts panel status 看实际端口(可能已自动避让)cf.ts stop --all 后重新 start