Skills
Chapter 11 of 28
Step-by-step guide for deploying Webflow Code Components to a workspace.
3 minutes · 758 words · 24 sections
28 chapters · 170 min
Guide users through deploying their code component library to Webflow.
Use when:
Do NOT use when:
Note: The CLI command is webflow library share. This skill uses “deploy” as the user-facing term.
Verify project is ready:
Check authentication status:
Confirm deployment target:
npx webflow library shareVerify deployment:
Provide next steps:
📦 Deploying Code Components
Step 1: Pre-flight checks
├── webflow.json ✅
├── Dependencies ✅
└── Build test ✅
Step 2: Authentication
├── Checking for existing auth...
└── Found valid token ✅
Step 3: Deploying
├── Bundling components...
├── Uploading to workspace...
└── Processing...
Step 4: Verification
├── Library registered ✅
└── 4 components available ✅
🎉 Deployment Complete!# Set environment variable
export WEBFLOW_WORKSPACE_API_TOKEN=your-token-here
# Deploy without prompts
npx webflow library share --no-inputUser prompt:
Deploy my components to WebflowResponse:
🚀 Deploy Guide: Code Components
Let me guide you through deploying your component library.
---
## Step 1: Pre-Flight Checks
Running validation...
✅ webflow.json configured
✅ Dependencies installed
✅ Build succeeds
✅ Bundle size: 2.3MB (under 50MB limit)
All checks passed! Ready to deploy.
---
## Step 2: Authentication
**Option A: Interactive (Recommended for first time)**
Run the deploy command:
```bash
npx webflow library shareThis will:
Option B: API Token (For CI/CD or returning users)
Get your Workspace API Token:
Run with token:
npx webflow library share --api-token YOUR_TOKEN_HEREOr set environment variable:
export WEBFLOW_WORKSPACE_API_TOKEN=YOUR_TOKEN_HERE
npx webflow library shareReady to deploy? Run:
npx webflow library shareExpected output:
✓ Bundling components...
✓ Authenticating...
✓ Uploading library...
✓ Processing...
Library "My Component Library" successfully shared!
Components:
- Button
- Card
- Accordion
- Modal
View in Designer: Open any site in your workspaceAfter deployment:
✅ Your components are live!
To update components later:
# Make your changes, then re-deploy
npx webflow library shareImportant notes:
💡 Tips:
--verbose flag for debugging issuesnpx webflow library log to see recent deploy logs
---
**Example: First-Time Setup**
🚀 Deploy Guide: First-Time Setup
I see this is your first deployment. Let me walk you through the full setup.
You’ll need a Workspace API token to deploy:
Open Webflow Dashboard Go to webflow.com and log in
Navigate to Workspace Settings Click your workspace name → Settings
Find API Access Go to “Apps & Integrations” → “Manage”
Generate Token Under “Workspace API Access”:
Save Token Add to your .env file:
WEBFLOW_WORKSPACE_API_TOKEN=your-token-here⚠️ Add .env to .gitignore:
echo ".env" >> .gitignoreNow run:
npx webflow library shareThe CLI will:
After successful deploy:
🎉 First deployment complete!
Future deployments are simpler:
# Just run this after making changes
npx webflow library share
---
**Example: CI/CD Setup**
🚀 Deploy Guide: CI/CD Setup
Setting up automated deployments for your pipeline.
Create .github/workflows/deploy.yml:
name: Deploy to Webflow
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Deploy to Webflow
env:
WEBFLOW_WORKSPACE_API_TOKEN: ${{ secrets.WEBFLOW_WORKSPACE_API_TOKEN }}
run: npx webflow library share --no-inputWEBFLOW_WORKSPACE_API_TOKENnpx webflow library share --no-input--no-input: Disables interactive promptsWEBFLOW_WORKSPACE_API_TOKEN env var automatically- name: Type check
run: npx tsc --noEmit✅ CI/CD configured!
Now every push to main will automatically deploy your components.
## Validation
After deployment, verify success with these checks:
| Check | How to Verify |
|-------|---------------|
| Deploy completed | `npx webflow library share` exited without errors |
| Components visible | Open Designer Add panel → find your library |
| Import logs clean | `npx webflow library log` shows successful import |
| Bundle size OK | Output shows bundle under 50MB |
| Props work | Drag component onto canvas, verify props in right panel |
## Guidelines
### Terminology
The CLI command is `webflow library share`. This skill uses "deploy" as the user-facing term for consistency with common developer vocabulary. See the [CLI reference](../../references/CODE_COMPONENTS_REFERENCE.md) (Section 12) for full command documentation.
### Authentication Methods
| Method | Use Case | Command |
|--------|----------|---------|
| Interactive | First time, local dev | `npx webflow library share` |
| Environment variable | CI/CD, automation | Set `WEBFLOW_WORKSPACE_API_TOKEN` |
| CLI flag | One-off with different token | `--api-token TOKEN` |
### Pre-Deploy Checklist
Before every deployment:
- [ ] `npm install` is up to date
- [ ] Build succeeds locally
- [ ] Bundle under 50MB
- [ ] All component tests pass
- [ ] No SSR-breaking code (or ssr: false set)
- [ ] Props have default values where supported (not available for Link, Image, Slot, ID)
### Common Deploy Issues
| Issue | Cause | Solution |
|-------|-------|----------|
| "Authentication failed" | Invalid/expired token | Regenerate workspace token |
| "Bundle too large" | Over 50MB | Optimize dependencies |
| "Library not found" | Wrong workspace | Check token workspace |
| "Build failed" | Code errors | Fix compilation errors |
### CLI Flags Reference
All flags for `npx webflow library share`:
| Flag | Description | Default |
|------|-------------|---------|
| `--manifest` | Path to `webflow.json` file | Scans current directory |
| `--api-token` | Workspace API token | Uses `WEBFLOW_WORKSPACE_API_TOKEN` from `.env` |
| `--no-input` | Skip interactive prompts (for CI/CD) | No |
| `--verbose` | Display more debugging information | No |
| `--dev` | Bundle in development mode (no minification) | No |
### Rollback & Versioning
- Each `library share` replaces the **entire** library — there are no partial updates
- There is **no built-in rollback** — use git to revert changes and re-deploy
- **Never rename `.webflow.tsx` files** — renaming creates a new component and removes the old one, breaking all existing instances in projects
### Debugging Commands
```bash
# Check recent deploy logs
npx webflow library log
# Verbose deploy output (detailed errors)
npx webflow library share --verbose
# Local bundle verification (catches build errors before deploying)
npx webflow library bundle --public-path http://localhost:4000/The GitHub Actions example above applies to any CI system. The key elements are:
# Generic CI pattern:
npm ci # Install dependencies
npx webflow library share --no-input # Deploy without prompts
# Requires WEBFLOW_WORKSPACE_API_TOKEN env varAlways verify after deployment:
Install this repository
npx skills add webflow/webflow-skills/plugin marketplace add webflow/webflow-skillsSkills install per repository, not per chapter — the CLI has no documented per-skill form, so we do not print one.
Step-by-step guide for deploying Webflow Code Components to a workspace. Covers authentication, pre-flight checks, deployment execution, and verification.
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
plugins/webflow-skills/skills/deploy-guide/SKILL.mdmain, last pushed 5 August 2026.SKILL.md, not by matching a directory convention. One layout observed: plugins/webflow-skills/skills/*/SKILL.md.h1 and no skipped levels:.claude-plugin/marketplace.json by Webflow, declaring 1 plugin. It is read for editorial metadata only — never as the skill index, which is always the repository tree./webflow/webflow-skills.md, and each chapter at its own .md URL.