Skip to content

Workers SDK

TrendingMaintained
cloudflare/workers-sdk

The official SDK for Cloudflare Workers, providing a complete toolkit for developing, testing, and deploying serverless applications on Cloudflare's global network.

View on GitHub
Stars
4.3k
Forks
1.3k
Watchers
4.3k
Open issues
425

Workers SDK

Workers SDK (formerly Wrangler) is the official command-line tool for Cloudflare Workers, enabling developers to build, test, and deploy serverless applications on Cloudflare’s global network.

Core Features

  • Project Management: Create, develop, and deploy Workers projects
  • Local Development: Test Workers locally with miniflare integration
  • Pages Integration: Deploy static sites and full-stack applications
  • D1 Database: Manage D1 databases directly from the CLI
  • R2 Storage: Handle R2 storage buckets and objects
  • KV Support: Interact with Workers KV namespaces
  • Durable Objects: Deploy and manage Durable Objects
  • Custom Builds: Support for custom build processes and configurations
  • TypeScript Support: First-class TypeScript development experience

Quick Start

  1. Installation:

    npm install -g wrangler
  2. Authentication:

    wrangler login
  3. Create a Project:

    wrangler init my-worker
    cd my-worker
  4. Development:

    wrangler dev
  5. Deployment:

    wrangler deploy

Key Components

  • Wrangler CLI: Command-line interface for Workers
  • Miniflare: Local development environment
  • Dev Tools: Built-in debugging and testing tools
  • Configuration: Flexible project configuration
  • Templates: Project templates for quick starts
  • Plugin System: Extensible plugin architecture

Use Cases

  • Building serverless applications
  • Deploying static websites
  • Creating API endpoints
  • Managing Workers KV data
  • Handling R2 storage operations
  • Developing full-stack applications
  • Testing Workers locally
  • Managing deployment environments

Advanced Features

  • Environment Variables: Secure configuration management
  • Custom Domains: Domain management and SSL
  • Secret Management: Secure secrets handling
  • Multi-environment Support: Dev, staging, and production environments
  • Tailored Builds: Custom build configurations
  • Asset Management: Static asset handling
  • Monitoring: Built-in logging and debugging

Community and Support

License

This project is licensed under the Apache License 2.0.

Similar open-source projects, ranked by shared categories and tags.

All SDK projects →