From webflow-cli-skills
Initializes, builds, and deploys Webflow Cloud applications via CLI with non-interactive flags, mount path validation, and package manager detection. Use for Webflow project creation and deployment.
npx claudepluginhub webflow/webflow-skills --plugin webflow-cli-skillsThis skill uses the workspace's default tool permissions.
Initialize new projects from templates, build applications, and deploy to Webflow Cloud with comprehensive validation and deployment verification.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Initialize new projects from templates, build applications, and deploy to Webflow Cloud with comprehensive validation and deployment verification.
ALWAYS use Bash tool for all Webflow CLI operations:
webflow cloud commands via Bash toolwebflow --versionwebflow auth login for site authenticationNon-Interactive Deployment (CRITICAL for agents and automation): The Webflow CLI is interactive by default (environment selection prompts, mount path prompts, update checks). Since AI agents and CI/CD pipelines cannot interact with interactive prompts, you MUST always use these flags together for deployment:
--no-input โ Disables all interactive prompts (environment selection, confirmations, etc.)--mount <MOUNT_PATH> โ REQUIRED with --no-input to avoid ENVIRONMENT_MOUNT_MISMATCH errors. You MUST determine the correct mount path before deploying โ see below.--skip-mount-path-check โ Skips interactive mount path validation--skip-update-check โ Skips the interactive package update checkDetermining the mount path (NEVER assume a default):
The mount path varies between projects (e.g., /app, /, /blog). Assuming a common default like /app WILL cause deployment failures if the project uses a different path. The Webflow CLI does NOT persist the mount path to webflow.json after init or deploy, so it is often not available in local config. Follow these steps in order:
webflow.json โ Read the cloud section and look for a mount or mountPath field. It is usually NOT present, but check anyway.webflow.json (which is the common case), you MUST ask the user before deploying: "What mount path does this project use? (e.g., /app, /, /blog)". Do NOT guess, do NOT assume /app, and do NOT proceed without a confirmed mount path.The canonical non-interactive deploy command is:
webflow cloud deploy --no-input --mount <MOUNT_PATH> --skip-mount-path-check --skip-update-check
Add --auto-publish if the user wants changes published immediately.
Package Manager Detection:
package-lock.json (npm), pnpm-lock.yaml (pnpm), yarn.lock (yarn)cloud list)cloud init)cloud deploy)webflow --version to confirm CLI is installedwebflow cloud listwebflow cloud init with options:
--framework or -f: Choose framework (astro, nextjs)--mount or -m: Mount path (e.g., /app)--site-id or -s: Webflow site ID to connectwebflow auth login)webflow.json cloud section:
projectId: Cloud project identifier (set automatically on first deploy)framework: Either "nextjs" or "astro"mount or mountPath: Mount path (may or may not be present)webflow.json, ask the user before proceeding. NEVER default to /app or any other value.npm run build or configured build scriptwebflow cloud deploy with non-interactive flags:
--no-input: REQUIRED โ disables all interactive prompts--mount or -m: REQUIRED โ mount path (e.g., /app). Must match the existing environment's mount path.--skip-mount-path-check: REQUIRED โ skips interactive mount path validation--skip-update-check: RECOMMENDED โ skips interactive package update check--auto-publish: Optional โ publish site after deployment--project-name or -p: Project name (for new projects only)-e or --environment: Environment name (defaults to first available with --no-input)User prompt:
What Webflow Cloud templates are available?
Response:
๐ Webflow Cloud Templates
Listing available templates...
Executing: webflow cloud list
Output:
Available templates:
1. astro - Astro framework template
2. nextjs - Next.js framework template
Use these templates with:
webflow cloud init -f <template-name>
Example:
webflow cloud init -f astro -m /app
User prompt:
Create a new Webflow Cloud project with Astro
Step 1: Verify CLI
๐ Webflow CLI Check
Checking CLI installation...
โ Webflow CLI installed: v1.5.2
Ready to initialize Webflow Cloud project with Astro.
Options needed:
1. Mount path (where project will be accessible, e.g., /app)
2. Site ID (optional - Webflow site to connect to)
Would you like to initialize with default settings (/app mount path)?
User confirms: yes
Step 2: Initialize Project
๐ Initializing Webflow Cloud Project
Executing: webflow cloud init -f astro -m /app
Output:
โ Creating new Astro project
โ Installing dependencies
โ Configuring Webflow Cloud
โ Creating webflow.json
Project initialized!
๐ Project Structure:
/my-cloud-project/
โโโ webflow.json (Cloud configuration)
โโโ package.json
โโโ src/
โ โโโ pages/
โ โโโ index.astro
โโโ public/
โโโ astro.config.mjs
๐ Configuration (webflow.json):
{
"cloud": {
"projectId": "", // Will be set on first deploy
"framework": "astro"
}
}
โ
Project Ready!
Next Steps:
1. Build your application: npm run dev
2. Add your code to src/
3. Deploy: webflow cloud deploy
User prompt:
Initialize Cloud project with Next.js for site ID abc123
Response:
๐ Initializing Webflow Cloud Project
Framework: Next.js
Mount Path: /app
Site ID: abc123
Executing: webflow cloud init -f nextjs -m /app -s abc123
Output:
โ Creating new Next.js project
โ Connecting to site: abc123
โ Installing dependencies
โ Configuring Webflow Cloud
โ Creating webflow.json
โ Authenticating with site
Project initialized and connected to site!
๐ Configuration (webflow.json):
{
"cloud": {
"projectId": "",
"framework": "nextjs"
}
}
๐ Environment (.env):
WEBFLOW_SITE_ID=abc123
WEBFLOW_SITE_API_TOKEN=************
โ ๏ธ Important: Add .env to your .gitignore file!
โ
Ready to develop and deploy!
User prompt:
Deploy my Webflow Cloud app
Step 1: Environment Verification
๐ Webflow Cloud Deployment Check
Checking CLI installation...
โ Webflow CLI installed: v1.5.2
Checking project configuration...
โ webflow.json found
โ Cloud configuration present
Configuration:
- Framework: astro
- Project ID: (will be set on first deploy)
- Mount path: /app
Checking authentication...
โ ๏ธ No authentication found - will authenticate during deploy
Checking build...
Step 2: Build
๐จ Building Application
Executing: npm run build
Output:
โ Building for production
โ Compiling pages
โ Optimizing assets
โ Build complete
Build output: ./dist (1.2 MB)
Step 3: Deployment Preview
๐ Deployment Preview
Project: Acme Cloud App (new deployment)
Framework: Astro
Mount Path: /app
First Deployment:
โ ๏ธ This is your first deployment. The CLI will:
1. Authenticate with your Webflow site
2. Create project in Webflow Cloud
3. Set projectId in webflow.json
4. Deploy application
โ ๏ธ Type "deploy" to proceed with deployment.
User confirms: deploy
Step 4: Deployment
๐ Deploying to Webflow Cloud
Executing: webflow cloud deploy --no-input --mount <MOUNT_PATH> --skip-mount-path-check --skip-update-check
Output:
โ Authenticating with Webflow...
โ Site authenticated
โ Creating Cloud project
โ Uploading build artifacts (1.2 MB)
โ Deploying to Webflow Cloud
โ Deployment complete
โ
Deployment Successful!
Project ID: proj_abc123xyz (added to webflow.json)
Deployment: https://acme-site.webflow.io/app
๐ Next Steps:
1. Visit your deployed app at the URL above
2. Future deploys will use saved project ID
3. Use: webflow cloud deploy (no re-auth needed)
4. Publish your site to make changes live
Updated webflow.json:
{
"cloud": {
"projectId": "proj_abc123xyz",
"framework": "astro"
}
}
User prompt:
Deploy updates to my Cloud app
Verification & Build:
๐ Cloud Project Check
โ webflow.json found
โ Project ID: proj_abc123xyz
โ Framework: astro
โ Authentication: Valid
Building application...
Executing: npm run build
โ Build complete (1.3 MB)
Preview:
๐ Deployment Preview
Project: proj_abc123xyz
Framework: Astro
Mount Path: /app
Deployment Type: Update existing project
Authentication: Using saved credentials
โ ๏ธ Type "deploy" to proceed.
User confirms: deploy
Deployment:
๐ Updating Cloud Deployment
Executing: webflow cloud deploy --no-input --mount <MOUNT_PATH> --skip-mount-path-check --skip-update-check
Output:
โ Using project: proj_abc123xyz
โ Uploading build artifacts (1.3 MB)
โ Deploying to Webflow Cloud
โ Deployment complete
โ
Deployment Updated!
Live at: https://acme-site.webflow.io/app
Changes deployed successfully!
๐ก Publish your site to make updates live.
User prompt:
How do I deploy in CI/CD pipeline?
Response:
๐ค CI/CD Deployment for Webflow Cloud
For automated deployments, use non-interactive mode with options.
### Setup Steps:
1. **Authenticate Locally First**
Run once to create .env file:
```bash
webflow auth login
Add Credentials to CI/CD Add these environment variables from .env:
Deployment Command
webflow cloud deploy --no-input --mount <MOUNT_PATH> --skip-mount-path-check --skip-update-check --auto-publish
name: Deploy to Webflow Cloud
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm install
- name: Install Webflow CLI
run: npm install -g @webflow/webflow-cli
- name: Build application
run: npm run build
- name: Deploy to Webflow Cloud
run: |
webflow cloud deploy \
--no-input \
--mount /app \
--skip-mount-path-check \
--skip-update-check \
--auto-publish
env:
WEBFLOW_SITE_ID: ${{ secrets.WEBFLOW_SITE_ID }}
WEBFLOW_SITE_API_TOKEN: ${{ secrets.WEBFLOW_SITE_API_TOKEN }}
Environment Management:
# Deploy to specific environment
webflow cloud deploy --no-input -e staging -m <MOUNT_PATH> --skip-mount-path-check --skip-update-check
# Deploy to production with auto-publish
webflow cloud deploy --no-input -e production -m <MOUNT_PATH> --skip-mount-path-check --skip-update-check --auto-publish
New Project Deployment:
# Deploy new project with name and description
webflow cloud deploy --no-input \
--project-name "Acme App" \
--description "Production deployment" \
--mount <MOUNT_PATH> \
--skip-mount-path-check \
--skip-update-check \
--auto-publish
--env / -e - Environment name--mount / -m - Mount path (e.g., /app)--project-name / -p - Project name (new projects)--directory / -d - Project directory path--description - Project description--skip-mount-path-check - No prompts--auto-publish - Publish after deployโ ๏ธ Security:
## Guidelines
### Phase 1: Operation Detection
**Determine User Intent:**
Ask clarifying questions if unclear:
- "Do you want to create a new Cloud project or deploy an existing one?"
- "Which framework would you like to use? (Run 'webflow cloud list' to see options)"
**CLI Verification:**
```bash
# Check CLI installed
webflow --version
# If not installed:
npm install -g @webflow/webflow-cli
List Templates Command:
# Show available templates
webflow cloud list
# Output shows available frameworks (astro, nextjs)
Template Information:
Init Command Structure:
# Basic init with framework
webflow cloud init -f <framework>
# With mount path
webflow cloud init -f astro -m /app
# With site ID (connects to specific site)
webflow cloud init -f nextjs -m /app -s <site-id>
Init Options:
--framework / -f (required): astro or nextjs--mount / -m: Mount path (default prompts)--site-id / -s: Connect to specific siteAfter Init:
webflow.json Cloud Schema:
{
"cloud": {
"projectId": "<Project ID>", // Auto-set on first deploy
"framework": "astro" // or "nextjs"
}
}
Configuration Fields:
Authentication Check:
# Site authentication creates .env file
# Check for:
cat .env
# Should contain:
# WEBFLOW_SITE_ID=your-site-id
# WEBFLOW_SITE_API_TOKEN=your-token
# If missing, authenticate:
webflow auth login
Build Command:
# Use project's build script
npm run build
# or
yarn build
# or
pnpm build
# Check for errors
echo $? # 0 = success
Build Validation:
Preview Format:
๐ Deployment Preview
Project: [Name or "New Project"]
Framework: [astro/nextjs]
Mount Path: [Path if specified]
Environment: [Name if specified]
[First time: Explain authentication flow]
[Subsequent: Show project ID]
Options:
- Auto-publish: [Yes/No]
- Environment: [Name or default]
โ ๏ธ Type "deploy" to proceed
First-Time Deployment: Explain clearly:
Deploy Command:
IMPORTANT: The Webflow CLI is interactive by default. Always use --no-input and --mount together to avoid interactive prompts that agents cannot handle.
# Standard non-interactive deploy (use this by default)
webflow cloud deploy --no-input --mount <MOUNT_PATH> --skip-mount-path-check --skip-update-check
# With auto-publish (publishes site after deploy)
webflow cloud deploy --no-input --mount <MOUNT_PATH> --skip-mount-path-check --skip-update-check --auto-publish
# New project with name (first deploy)
webflow cloud deploy --no-input \
--project-name "My App" \
--mount <MOUNT_PATH> \
--skip-mount-path-check \
--skip-update-check
# With specific environment
webflow cloud deploy --no-input \
-e production \
--mount <MOUNT_PATH> \
--skip-mount-path-check \
--skip-update-check \
--auto-publish
Deploy Options:
--no-input: REQUIRED for agents โ disables all interactive prompts--mount / -m: REQUIRED โ path to mount project. Must match the existing environment's mount path.--skip-mount-path-check: REQUIRED for agents โ skips interactive mount path validation--skip-update-check: RECOMMENDED โ skips interactive package update check--auto-publish: Publish the site after deployment-e / --environment: Environment name to deploy to--project-name / -p: Project name (for new projects)--directory / -d: Project directory if not in root--description: Project description (for new projects)Success Indicators:
Verification:
CLI Not Installed:
โ Webflow CLI Not Found
The Webflow CLI is required for Webflow Cloud.
Installation:
npm install -g @webflow/webflow-cli
After installation, verify:
webflow --version
Documentation: https://developers.webflow.com/cli
Not Authenticated:
โ Not Authenticated
You must authenticate with Webflow to deploy to Cloud.
Steps:
1. Run: webflow auth login
2. Follow authentication prompts in browser
3. Select your site when prompted
4. Verify: .env file created with WEBFLOW_SITE_ID and WEBFLOW_SITE_API_TOKEN
5. Retry deployment
Need help? https://developers.webflow.com/cli/authentication
Not a Cloud Project:
โ Not a Webflow Cloud Project
This directory doesn't appear to be a Cloud project.
Initialize Cloud Project:
1. List templates: webflow cloud list
2. Initialize: webflow cloud init -f <framework>
Example: webflow cloud init -f astro -m /app
Or check webflow.json for cloud configuration:
{
"cloud": {
"framework": "astro" or "nextjs"
}
}
Build Failures:
โ Build Failed
Error: [Specific error message]
Common Fixes:
- Missing dependencies: Run npm install
- Build script errors: Check package.json build script
- Framework errors: Review framework documentation
- Path issues: Verify file paths and imports
Show build output for details.
Deployment Failures:
โ Deployment Failed
Error: [Specific error from CLI]
Possible Causes:
- Network connection issues
- Authentication expired
- Build artifacts missing or invalid
- Insufficient permissions
Solutions:
1. Check internet connection
2. Re-authenticate: webflow auth login
3. Rebuild: npm run build
4. Verify webflow.json configuration
5. Check site permissions in Webflow dashboard
Retry deployment? (yes/no)
Invalid Framework:
โ Invalid Framework
Framework must be either "astro" or "nextjs".
Available templates:
Run: webflow cloud list
Initialize with valid framework:
webflow cloud init -f astro
webflow cloud init -f nextjs
Reading Files: Always use Read tool (never modify):
# View Cloud configuration
Read: webflow.json
# View package configuration
Read: package.json
# View environment (if exists)
Read: .env
# View build output
Read: dist/ or .next/ or .output/
Discovering Files: Use Glob tool to find files:
# Find configuration files
Glob: *.json
# Find build output
Glob: dist/**/*
# Find source files
Glob: src/**/*
Never Use Write/Edit Tools:
For Build:
๐จ Building Application...
Compiling pages... โ
Optimizing assets... โ
Generating build... โณ
Elapsed: 15s
For Deployment:
๐ Deploying to Webflow Cloud...
Uploading artifacts... โ
Deploying application... โณ
Configuring routes... โณ
Uploaded: 1.2 MB
Elapsed: 25s
Project Setup:
cloud list to see available templates before initDevelopment:
Deployment:
--no-input --mount <MOUNT_PATH> --skip-mount-path-check --skip-update-check for non-interactive deploys--auto-publish for production deploymentsCI/CD:
--no-input to disable all interactive prompts--mount with the correct path--skip-mount-path-check and --skip-update-checkEnvironment Management:
Workflow: list templates โ init project โ build โ deploy
Key Commands:
webflow cloud list - List available templateswebflow cloud init - Initialize new projectwebflow cloud deploy - Deploy applicationInit Options:
-f / --framework - Framework (astro, nextjs)-m / --mount - Mount path-s / --site-id - Site IDDeploy Options (for agents/automation, always include first 4):
--no-input - REQUIRED: disable interactive prompts-m / --mount - REQUIRED: mount path (must match existing environment)--skip-mount-path-check - REQUIRED: skip mount path validation prompt--skip-update-check - RECOMMENDED: skip update check prompt--auto-publish - Publish after deploy-e / --environment - Environment name-p / --project-name - Project name (new projects)Configuration: webflow.json with cloud section
Schema:
{
"cloud": {
"projectId": "proj_xxx", // auto-set
"framework": "astro" // or "nextjs"
}
}
Authentication: Site authentication via webflow auth login
Environment: WEBFLOW_SITE_ID and WEBFLOW_SITE_API_TOKEN in .env
Verification: Check webflow --version and site authentication first
Confirmation: Require "deploy" keyword before deployment
Documentation: https://developers.webflow.com/webflow-cloud/intro