.agents/skills/use-pake/SKILL.md
Pake wraps any webpage into a native desktop app via Tauri (Rust + system WebView). Output is ~5MB (vs Electron's ~150MB). Run the commands below from the root of this Pake repository.
# Build the CLI once (produces dist/cli.js); skip if dist/ already exists
pnpm run cli:build
node dist/cli.js "<URL>" --name <AppName> [options]
Before running the build, confirm these with the user:
| Parameter | Why it matters |
|---|---|
| URL | The target website |
| Name | Becomes the .app / .exe name and productName |
Bundle ID (--identifier) | Defaults to com.pake.a{md5hash} — set explicitly for clean installs (e.g. com.pake.youtube) |
Proxy (--proxy-url) | Baked into the binary at build time; not runtime-configurable. Format: http://host:port or socks5://host:port |
| Icon | Auto-fetched from website if omitted; can be a local path or URL |
Pake auto-fetches icons from multiple services (logo.dev, brandfetch, clearbit, Google favicons, direct favicon.ico). However:
The icon download does NOT use --proxy-url. That flag only configures the packaged app's WebView proxy. If the icon URL requires a proxy to reach (e.g. Google/GitHub assets from China), download it manually first:
curl -x http://<proxy-host>:<proxy-port> -o /tmp/icon.png "<icon-url>" --connect-timeout 15 -s
Then pass the local file:
node dist/cli.js "<URL>" --icon /tmp/icon.png ...
Icon tips:
.icns (macOS), .ico (Windows), .png (Linux)src-tauri/icons/<name>.icns, Pake reuses it — rename/remove it to force re-fetchnode dist/cli.js "<URL>" \
--name <AppName> \
--identifier <com.pake.xxx> \
--proxy-url "http://host:port" \
--icon /path/to/icon.png
Build takes ~40s with cache, ~2min cold. Output: <AppName>.dmg in the project root.
After build, confirm:
mdls -name kMDItemCFBundleIdentifier <path-to>.app| Option | Default | Description |
|---|---|---|
--name <string> | — | App name |
--icon <string> | auto-fetch | Icon path (local file or URL) |
--identifier <string> | com.pake.a{hash} | Bundle ID / app identifier |
--proxy-url <url> | — | WebView proxy (http/https/socks5) |
--width <number> | 1200 | Window width |
--height <number> | 780 | Window height |
--app-version <string> | 1.0.0 | App version |
| Option | Default | Description |
|---|---|---|
--fullscreen | false | Start fullscreen |
--maximize | false | Start maximized |
--always-on-top | false | Pin window on top |
--hide-title-bar | false | Hide macOS title bar |
| Option | Default | Description |
|---|---|---|
--inject <files> | — | Inject CSS/JS files (comma-separated paths) |
--user-agent <string> | — | Custom user agent |
--debug | false | Enable devtools and verbose logging |
--multi-arch | false | Build for both Intel and Apple Silicon |
--multi-instance | false | Allow multiple app instances |
--multi-window | false | Multiple windows in one instance |
--new-window | false | Allow popup windows (needed for OAuth flows) |
--incognito | false | Private browsing mode |
--dark-mode | false | Force macOS dark mode |
--zoom <number> | 100 | Initial zoom level (50-200) |
--wasm | false | Enable WebAssembly |
--enable-drag-drop | false | Drag & drop support |
--camera | false | Camera permission (macOS) |
--microphone | false | Microphone permission (macOS) |
--ignore-certificate-errors | false | Ignore TLS errors |
--targets <string> | auto | Build target format |
--use-local-file | false | Package local HTML file |
| Platform | Status | Notes |
|---|---|---|
| Windows | Full | Via --proxy-server browser arg |
| Linux | Full | Via --proxy-server browser arg |
| macOS | macOS 14+ | Uses Tauri native macos-proxy feature; auto-detected at build time |
Not supported. Pake uses system WebView (WKWebView on macOS, WebView2 on Windows, WebKitGTK on Linux), not a full Chrome browser. Use --inject to add custom JS/CSS as an alternative.
# Step 1: Download icon via proxy
curl -x http://127.0.0.1:7890 -o /tmp/icon.png "<icon-url>" -s
# Step 2: Build with local icon
node dist/cli.js "https://example.com" \
--name MyApp \
--identifier com.pake.myapp \
--proxy-url "http://127.0.0.1:7890" \
--icon /tmp/icon.png
# Remove cached icon, then build without --icon
mv src-tauri/icons/<name>.icns src-tauri/icons/<name>.icns.bak
node dist/cli.js "https://example.com" --name MyApp
node dist/cli.js "https://accounts.google.com" \
--name GoogleApp \
--new-window \
--ignore-certificate-errors