Static App
by @akellacom
Deploy static websites to Static.app hosting. Use when the user wants to deploy, upload, or host a static site on Static.app. Triggers on phrases like "deploy to static.app", "upload to static", "host on static.app", "static.app deploy", or when working with the Static.app hosting service.
clawhub install static-appπ About This Skill
name: Static Website Hosting - Static.app description: Deploy static websites to Static.app hosting. Use when the user wants to deploy, upload, or host a static site on Static.app. Triggers on phrases like "deploy to static.app", "upload to static", "host on static.app", "static.app deploy", or when working with the Static.app hosting service.
Static.app Deployment Skill
Deploy static websites and applications to Static.app hosting directly from OpenClaw.
Workspace Structure
All Static.app operations in your workspace use a dedicated folder structure:
workspace/
βββ staticapp/ # Main folder for all Static.app operations
βββ new-site/ # New sites created locally
βββ {pid}/ # Downloaded existing sites (by PID)
staticapp/ subfolders before deploymentstaticapp/{pid}/ for editingHow Static.app Handles Files
Static.app automatically creates clean URLs from your filenames:
| File | URL |
|------|-----|
| index.html | / (homepage) |
| about.html | /about |
| portfolio.html | /portfolio |
| contact.html | /contact |
No subdirectories needed! Just create .html files in the root folder.
Project Structure
Simple Multi-Page Site
my-site/
βββ index.html # Homepage β /
βββ about.html # About page β /about
βββ portfolio.html # Portfolio β /portfolio
βββ contact.html # Contact β /contact
βββ style.css # Stylesheet
βββ js/ # JavaScript files
β βββ main.js
β βββ utils.js
βββ images/ # Images folder
βββ logo.png
βββ photo.jpg
JavaScript App (React, Vue, etc.)
For JS apps, build first, then deploy the dist (or build) folder:
# Build your app
npm run buildDeploy the dist folder
node scripts/deploy.js ./dist
Prerequisites
1. Get API Key: Go to https://static.app/account/api and create an API key (starts with sk_)
2. Set Environment Variable: Store the API key in STATIC_APP_API_KEY env var
Usage
Deploy Multi-Page Site
# Create your pages
echo 'Home
' > index.html
echo 'About
' > about.html
echo 'Portfolio
' > portfolio.htmlDeploy
node scripts/deploy.js
Deploy Specific Directory
node scripts/deploy.js ./my-site
Update Existing Site
node scripts/deploy.js . --pid olhdscieyr
List All Sites
node scripts/list.js
List Site Files
node scripts/files.js YOUR_PID
Options:
--raw β Output raw JSON-k β Specify API keyDelete Site
node scripts/delete.js YOUR_PID
Options:
-f, --force β Skip confirmation prompt-k β Specify API keyDownload Site
Download an existing site to your workspace for editing:
node scripts/download.js YOUR_PID
This will:
1. Fetch the download URL from Static.app API
2. Download the site archive
3. Extract it to staticapp/{pid}/
Options:
-p, --pid β Site PID to download-o, --output β Custom output directory (default: ./staticapp/{pid})-k β Specify API key--raw β Output raw JSON responseExample:
# Download site to default location
node scripts/download.js abc123Download to custom folder
node scripts/download.js abc123 -o ./my-site
Script Options
node scripts/deploy.js [SOURCE_DIR] [OPTIONS]Arguments:
SOURCE_DIR Directory to deploy (default: current directory)
Options:
-k, --api-key API key (or set STATIC_APP_API_KEY env var)
-p, --pid Project PID to update existing site
-e, --exclude Comma-separated exclude patterns
--keep-zip Keep zip archive after deployment
Default Exclusions
The following are automatically excluded from deployment:
node_modules.git, .github*.mdpackage*.json.env.openclawImportant Notes
β What Works
.html pagesimages/ folder or rootjs/ folder or rootdist/ or build/ folder after npm run buildβ What Doesn't Work
JavaScript Apps Workflow
# 1. Build your React/Vue/Angular app
npm run build2. Deploy the build output
node scripts/deploy.js ./dist --pid YOUR_PID
API Reference
Deploy Site
POST https://api.static.app/v1/sites/ziparchive (zip file) and optional pidList Sites
GET https://api.static.app/v1/sitesAccept: application/jsonList Site Files
GET https://api.static.app/v1/sites/files/{pid}Accept: application/jsonDelete Site
DELETE https://api.static.app/v1/sites/{pid}Accept: application/jsonDownload Site
GET https://api.static.app/v1/sites/download/{pid}Accept: application/jsonDependencies
archiver β Zip archive creationform-data β Multipart form encodingnode-fetch β HTTP requestsadm-zip β Zip extractionInstall with: cd scripts && npm install
Response
On success, the script outputs:
β
Deployment successful!
π Site URL: https://xyz.static.app
π PID: abc123STATIC_APP_URL=https://xyz.static.app
STATIC_APP_PID=abc123
Workflow
1. Check for STATIC_APP_API_KEY env var or --api-key
2. Create zip archive from source directory (with exclusions)
3. Upload to Static.app API
4. Parse response and output URLs
5. Clean up temporary zip file
Error Handling
π‘ Examples
Deploy Multi-Page Site
# Create your pages
echo 'Home
' > index.html
echo 'About
' > about.html
echo 'Portfolio
' > portfolio.htmlDeploy
node scripts/deploy.js
Deploy Specific Directory
node scripts/deploy.js ./my-site
Update Existing Site
node scripts/deploy.js . --pid olhdscieyr
List All Sites
node scripts/list.js
List Site Files
node scripts/files.js YOUR_PID
Options:
--raw β Output raw JSON-k β Specify API keyDelete Site
node scripts/delete.js YOUR_PID
Options:
-f, --force β Skip confirmation prompt-k β Specify API keyDownload Site
Download an existing site to your workspace for editing:
node scripts/download.js YOUR_PID
This will:
1. Fetch the download URL from Static.app API
2. Download the site archive
3. Extract it to staticapp/{pid}/
Options:
-p, --pid β Site PID to download-o, --output β Custom output directory (default: ./staticapp/{pid})-k β Specify API key--raw β Output raw JSON responseExample:
# Download site to default location
node scripts/download.js abc123Download to custom folder
node scripts/download.js abc123 -o ./my-site
βοΈ Configuration
1. Get API Key: Go to https://static.app/account/api and create an API key (starts with sk_)
2. Set Environment Variable: Store the API key in STATIC_APP_API_KEY env var