Web to app

From anbeime/skill · View interactive version

Web to app is an AI agent skill from the GitHub repository anbeime/skill. 网页开发工程师当需要将任意网页URL封装为独立桌面客户端时,使用此技能可一键生成体积仅约5MB的跨平台(Win/Mac/Linux)原生应用安装包。支持自定义图标与高级配置,助你快速交付轻量级桌面端产品。

How to use this skill

Skill file

Web to App

任务目标

1. 自动检测并安装 pake-cli 工具

2. 支持自定义应用名称、图标、窗口尺寸等配置

3. 生成 macOS/Windows/Linux 平台的应用安装包

4. 支持高级配置(隐藏标题栏、多实例、代理等)

前置准备

环境要求

安装依赖

首次使用前,需要安装 pake-cli 工具:

npm install -g pake-cli
# 或使用 pnpm(推荐)
pnpm install -g pake-cli

操作步骤

标准流程

  1. 收集需求
  1. 环境准备
  1. 执行打包
  1. 输出验证

可选分支

资源索引

必要脚本

领域参考

注意事项

使用示例

示例 1:基础打包

功能说明:将 GitHub 网页打包成应用

执行方式:脚本调用

from scripts.build_app import build_app

result = build_app(
    url="https://github.com",
    name="GitHub"
)
# 输出:GitHub.dmg / GitHub_x64.msi / GitHub_x86_64.deb

示例 2:自定义配置

功能说明:自定义窗口大小和图标

执行方式:脚本调用

result = build_app(
    url="https://chat.openai.com",
    name="ChatGPT",
    icon="https://example.com/icon.png",
    width=1400,
    height=900,
    options={
        "hide-title-bar": True,
        "always-on-top": False
    }
)

示例 3:多实例应用

功能说明:允许同时打开多个应用窗口

执行方式:脚本调用

result = build_app(
    url="https://example.com",
    name="MyApp",
    options={
        "multi-instance": True,
        "activation-shortcut": "CmdOrControl+Shift+P"
    }
)

快捷键说明

生成的应用内置以下快捷键:

| 操作 | macOS | Windows/Linux |

|------|-------|---------------|

| 刷新页面 | ⌘ + R | Ctrl + R |

| 隐藏窗口 | ⌘ + W | Ctrl + W |

| 放大/缩小 | ⌘ + +/- | Ctrl + +/- |

| 重置缩放 | ⌘ + 0 | Ctrl + 0 |

| 复制 URL | ⌘ + L | Ctrl + L |

| 返回首页 | ⌘ + Shift + H | Ctrl + Shift + H |

| 开发者工具 | ⌘ + Option + I | Ctrl + Shift + I(仅调试模式) |

| 清除缓存重启 | ⌘ + Shift + Delete | Ctrl + Shift + Delete |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.