Task Objective
- This Skill is used to: package any web URL into a native desktop application
- Capabilities include:
- Automatically detect and install the pake-cli tool
- Support configuration such as custom application name, icon, window size, etc.
- Generate application installers for macOS/Windows/Linux platforms
- Support advanced configuration (hide title bar, multiple instances, proxy, etc.)
- Trigger conditions: the user requests "package a web page into an application", "make a desktop application", etc.
Prerequisites
Environment Requirements
- Node.js: version ≥ 18.0.0 (22.0+ recommended)
- Rust: ≥ 1.85.0 (automatically installed on first use)
- System Tools:
- macOS/Linux: requires
curl、wget、file、tar - Windows: automatically handles dependencies
- macOS/Linux: requires
Install Dependencies
Before first use, you need to install the pake-cli tool:
npm install -g pake-cli
# 或使用 pnpm(推荐)
pnpm install -g pake-cli
Operation Steps
Standard Process
-
Collect Requirements
- Confirm the web URL (required)
- Application name (English recommended)
- Target platform (automatically detect the current system)
- Customization requirements (icon, window size, etc.)
-
Environment Preparation
- Call
scripts/install_pake.pyto check and install pake-cli - Verify the Node.js and Rust environments
- Call
-
Execute Packaging
- Generate configuration parameters according to user requirements
- Call
scripts/build_app.pyto execute packaging - Monitor execution progress and error messages
-
Output Verification
- Confirm the generated application installer
- Provide installation and usage instructions
Optional Branches
-
When a custom icon is needed:
- Provide the icon file path (local or remote URL supported)
- Automatically convert to platform-specific formats (.icns/.ico/.png)
-
When advanced configuration is needed:
- Refer to references/parameter-guide.md
- Add the corresponding parameters (such as
--hide-title-bar、--multi-instance)
-
When packaging fails:
- Check the network connection (dependencies need to be downloaded)
- Verify the Node.js and Rust versions
- Use the
--debugparameter to view detailed logs
Resource Index
Required Scripts
-
- Purpose: check and install the pake-cli tool
- Parameters: none
- Returns: installation status and version information
-
- Purpose: execute the web page packaging command
- Parameters:
url: web page URL (required)name: application nameicon: icon pathwidth: window widthheight: window heightoptions: other optional parameters (dictionary format)
- Returns: the path of the generated application file
Domain Reference
- references/parameter-guide.md
- When to read: when advanced options need to be configured
- Content: Complete parameter descriptions and usage examples
Notes
- ⏰ First build is slow: Rust dependencies need to be downloaded and compiled; subsequent builds will be much faster
- 📦 Output location: By default, the app installer is generated in the current working directory (
./) - 🖥️ Platform adaptation:
- macOS: generates
.dmginstaller (settingPAKE_CREATE_APP=1can generate.app) - Windows: generates
.msiinstaller - Linux: generates
.debor.AppImagepackage
- macOS: generates
- 🚀 Debug mode: When encountering issues, add the
--debugparameter to view detailed logs - 🔐 Certificate issues: If using an intranet or self-signed certificate, use
--ignore-certificate-errors
Usage examples
Example 1: Basic packaging
Function description: Packages the GitHub webpage into an app Execution method: Script call
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
Example 2: Custom configuration
Function description: Custom window size and icon Execution method: Script call
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
}
)
Example 3: Multi-instance app
Function description: Allows multiple app windows to be opened simultaneously Execution method: Script call
result = build_app(
url="https://example.com",
name="MyApp",
options={
"multi-instance": True,
"activation-shortcut": "CmdOrControl+Shift+P"
}
)
Keyboard shortcuts
The generated app includes the following keyboard shortcuts:
| Action | macOS | Windows/Linux |
|---|---|---|
| Refresh page | ⌘ + R | Ctrl + R |
| Hide window | ⌘ + W | Ctrl + W |
| Zoom in/out | ⌘ + +/- | Ctrl + +/- |
| Reset zoom | ⌘ + 0 | Ctrl + 0 |
| Copy URL | ⌘ + L | Ctrl + L |
| Back to homepage | ⌘ + Shift + H | Ctrl + Shift + H |
| Developer tools | ⌘ + Option + I | Ctrl + Shift + I (debug mode only) |
| Clear cache and restart | ⌘ + Shift + Delete | Ctrl + Shift + Delete |