@webmcp/cli
Command Line Tools
Powerful CLI tools for scanning, validating, and optimizing HTML files for AI processing. Perfect for CI/CD pipelines, automation workflows, and development environments. Process files in ~100ms with 67.6% token reduction.
Quick Install
npm install -g @webmcp/cliAvailable Commands
Six powerful commands for complete webMCP workflow automation
webmcp scan
Scan HTML files or URLs to generate webMCP configurations
webmcp scan login.html --output login.wmcp --verbosewebmcp validate
Validate webMCP configuration files against schema and best practices
webmcp validate page.wmcp --schema 0.2 --strictwebmcp optimize
Optimize webMCP configurations for AI model consumption
webmcp optimize page.wmcp --target gpt-4o --level advancedwebmcp lint
Lint webMCP files for best practices and code quality
webmcp lint "src/**/*.wmcp" --fixwebmcp dev-server
Start development server with webMCP processing capabilities
webmcp dev-server --port 3000 --openwebmcp benchmark
Benchmark webMCP performance across AI models (Premium)
webmcp benchmark page.wmcp --models gpt-4o,claude-3.5-sonnetCLI Features
Enterprise-grade command line tools for professional workflows
Complete HTML Processing
Scan and process HTML files, URLs, or entire directories with intelligent element detection
Schema Validation
Comprehensive validation against webMCP schema with detailed error reporting
AI Model Optimization
Optimize for 8+ AI models including GPT-4o, Claude 3.5 Sonnet, and Gemini Pro
CI/CD Integration
Perfect for automation workflows, GitHub Actions, and continuous integration
Usage Examples
Real-world examples for common development scenarios
Basic HTML Scanning
# Scan a single HTML file
webmcp scan login.html --output login.wmcp --verbose
# Scan from URL
webmcp scan https://example.com/signup --format json --output signup.json
# Scan multiple files
webmcp scan "src/**/*.html" --output-dir ./webmcp-configsAdvanced Optimization
# Optimize for specific AI model with goal
webmcp optimize login.wmcp \
--target gpt-4o \
--goal "Login with username and password" \
--level premium \
--output optimized-prompt.txt
# Batch optimization with custom rules
webmcp optimize "configs/*.wmcp" \
--target claude-3.5-sonnet \
--level advanced \
--output-dir ./optimizedCI/CD Pipeline Integration
# GitHub Actions workflow
name: webMCP Validation
on: [push, pull_request]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install webMCP CLI
run: npm install -g @webmcp/cli
- name: Scan HTML files
run: webmcp scan "src/**/*.html" --output-dir ./webmcp-configs
- name: Validate configurations
run: webmcp validate "webmcp-configs/*.wmcp" --strict
- name: Optimize for production
run: webmcp optimize "webmcp-configs/*.wmcp" --target gpt-4o --level advancedDevelopment Server
# Start development server with hot reload
webmcp dev-server --port 3000 --watch --open
# Custom configuration
webmcp dev-server \
--port 8080 \
--config ./webmcp.config.js \
--cors \
--verbose
# API endpoints available:
# GET /api/scan - Scan HTML content
# POST /api/validate - Validate webMCP config
# POST /api/optimize - Optimize for AI modelPerformance Characteristics
Optimized for speed and efficiency in production environments
HTML Scanning
Validation
Optimization
Linting
Automate Your Workflow
Install webMCP CLI tools and integrate AI optimization into your development pipeline