local cloudflare
See the codeLocal development dashboard for Cloudflare Workers. Visualize and interact with your D1 databases, KV namespaces, R2 buckets, Durable Objects, and Queues during development.
wrangler.toml automatically# Navigate to your Cloudflare Worker project
cd your-worker-project
# Run Localflare
npx localflare
That's it! Localflare will:
wrangler.toml configurationhttp://localhost:8787https://studio.localflare.devnpm install -g localflare
# or
pnpm add -g localflare
# or use directly with npx
npx localflare
# Run in your Worker project directory
localflare
# Custom port
localflare --port 9000
# Custom persistence directory
localflare --persist-to ./my-data
# Don't open browser automatically
localflare --no-open
Use -- to pass options directly to wrangler:
# Use a specific environment
localflare -- --env staging
# Set environment variables
localflare -- --var API_KEY:secret
# Combine options
localflare --port 9000 -- --env production --remote
For projects with custom dev commands (OpenNext, Nuxt, etc.), use attach mode:
# Terminal 1: Your dev server
pnpm dev # or: opennext dev, nuxt dev, wrangler dev, etc.
# Terminal 2: Localflare API
localflare attach
# Custom port for Localflare API
localflare attach --port 9000
Attach mode runs the Localflare API separately, sharing the same persistence directory with your dev server.
localflare [configPath] [options]
Options:
-p, --port <port> Worker port (default: 8787)
-v, --verbose Verbose output
--no-open Don't open browser automatically
--no-tui Disable TUI, use simple console output
--dev Open local dashboard instead of studio.localflare.dev
--persist-to <path> Persistence directory for D1/KV/R2 data (default: .wrangler/state)
-h, --help Display help
--version Display version
localflare attach [configPath] [options]
Options:
-p, --port <port> Localflare API port (default: 8788)
--no-open Don't open browser automatically
--dev Open local dashboard instead of studio.localflare.dev
--persist-to <path> Persistence directory for D1/KV/R2 data (default: .wrangler/state)
wrangler.tomlThe Localflare dashboard runs at studio.localflare.dev and connects to your local worker. Some browsers have security features that may block this connection.
Recent Chrome updates may block local network access by default. This prevents the dashboard from connecting to your localhost worker.
To fix:
Safari and Brave block access to localhost from external sites by default. You need to install mkcert and generate a local CA:
# Install mkcert (macOS)
brew install mkcert
# Install the local CA
mkcert -install
# Restart your browser
Brave alternative: You can also disable Brave Shields for studio.localflare.dev:
| Project Type | Mode | Command |
|---|---|---|
| Standard Workers | Default | npx localflare |
| Hono, Remix, Astro, SvelteKit | Default | npx localflare |
| OpenNext (Next.js on Workers) | Attach | npx localflare attach |
| Nuxt on Workers | Attach | npx localflare attach |
| Custom wrangler setups | Attach | npx localflare attach |
Localflare uses a sidecar architecture that runs alongside your worker in the same wrangler process. Both workers share the exact same binding instances, enabling full read/write access to all your data.
Single wrangler dev Process
├── Your Worker (http://localhost:8787)
│ └── Your application code unchanged
├── Localflare API Worker
│ └── Dashboard API routes (/__localflare/*)
└── Shared Bindings
├── D1 databases (same instance)
├── KV namespaces (same instance)
├── R2 buckets (same instance)
├── Queues (same in-memory queue)
└── Durable Objects (same instances)
This architecture means:
| Package | Description |
|---|---|
localflare | CLI tool - the main entry point |
localflare-api | API worker that powers the dashboard |
localflare-core | Config parser and utilities |
localflare-dashboard | React dashboard UI (hosted at studio.localflare.dev) |
# Clone the repo
git clone https://github.com/rohanprasadofficial/localflare
cd localflare
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Terminal 1: Start the demo app worker and localflare API
cd demo-app
pnpm run dev:client
pnpm run dev:studio
# Terminal 2: Start the dashboard
cd packages/dashboard
pnpm run dev
# Open the dashboard
# http://localhost:5174/d1?port=8787
| Binding | Support | Dashboard Features |
|---|---|---|
| D1 | ✅ Full | Full-featured database studio (see below) |
| KV | ✅ Full | Key browser, value editor, bulk operations |
| R2 | ✅ Full | File browser, upload/download, metadata |
| Durable Objects | ✅ Full | Instance listing, state inspection |
| Queues | ✅ Full | Message viewer, send test messages |
| Service Bindings | ✅ Full | Automatic proxying |
A comprehensive database management interface inspired by Drizzle Studio and Supabase:
Data Browser
SQL Query Editor
Schema Viewer
We welcome contributions! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.
Check out our Contributing Guide to get started.
Before contributing:
If you find Localflare useful, please consider supporting its development:
Your sponsorship helps with:
MIT
6,374 followers · starred Jan 2026
622 followers · starred Jan 2026
5,444 followers · starred Jan 2026
153 followers · starred Jan 2026
local cloudflare
See the codeLocal development dashboard for Cloudflare Workers. Visualize and interact with your D1 databases, KV namespaces, R2 buckets, Durable Objects, and Queues during development.
wrangler.toml automatically# Navigate to your Cloudflare Worker project
cd your-worker-project
# Run Localflare
npx localflare
That's it! Localflare will:
wrangler.toml configurationhttp://localhost:8787https://studio.localflare.devnpm install -g localflare
# or
pnpm add -g localflare
# or use directly with npx
npx localflare
# Run in your Worker project directory
localflare
# Custom port
localflare --port 9000
# Custom persistence directory
localflare --persist-to ./my-data
# Don't open browser automatically
localflare --no-open
Use -- to pass options directly to wrangler:
# Use a specific environment
localflare -- --env staging
# Set environment variables
localflare -- --var API_KEY:secret
# Combine options
localflare --port 9000 -- --env production --remote
For projects with custom dev commands (OpenNext, Nuxt, etc.), use attach mode:
# Terminal 1: Your dev server
pnpm dev # or: opennext dev, nuxt dev, wrangler dev, etc.
# Terminal 2: Localflare API
localflare attach
# Custom port for Localflare API
localflare attach --port 9000
Attach mode runs the Localflare API separately, sharing the same persistence directory with your dev server.
localflare [configPath] [options]
Options:
-p, --port <port> Worker port (default: 8787)
-v, --verbose Verbose output
--no-open Don't open browser automatically
--no-tui Disable TUI, use simple console output
--dev Open local dashboard instead of studio.localflare.dev
--persist-to <path> Persistence directory for D1/KV/R2 data (default: .wrangler/state)
-h, --help Display help
--version Display version
localflare attach [configPath] [options]
Options:
-p, --port <port> Localflare API port (default: 8788)
--no-open Don't open browser automatically
--dev Open local dashboard instead of studio.localflare.dev
--persist-to <path> Persistence directory for D1/KV/R2 data (default: .wrangler/state)
wrangler.tomlThe Localflare dashboard runs at studio.localflare.dev and connects to your local worker. Some browsers have security features that may block this connection.
Recent Chrome updates may block local network access by default. This prevents the dashboard from connecting to your localhost worker.
To fix:
Safari and Brave block access to localhost from external sites by default. You need to install mkcert and generate a local CA:
# Install mkcert (macOS)
brew install mkcert
# Install the local CA
mkcert -install
# Restart your browser
Brave alternative: You can also disable Brave Shields for studio.localflare.dev:
| Project Type | Mode | Command |
|---|---|---|
| Standard Workers | Default | npx localflare |
| Hono, Remix, Astro, SvelteKit | Default | npx localflare |
| OpenNext (Next.js on Workers) | Attach | npx localflare attach |
| Nuxt on Workers | Attach | npx localflare attach |
| Custom wrangler setups | Attach | npx localflare attach |
Localflare uses a sidecar architecture that runs alongside your worker in the same wrangler process. Both workers share the exact same binding instances, enabling full read/write access to all your data.
Single wrangler dev Process
├── Your Worker (http://localhost:8787)
│ └── Your application code unchanged
├── Localflare API Worker
│ └── Dashboard API routes (/__localflare/*)
└── Shared Bindings
├── D1 databases (same instance)
├── KV namespaces (same instance)
├── R2 buckets (same instance)
├── Queues (same in-memory queue)
└── Durable Objects (same instances)
This architecture means:
| Package | Description |
|---|---|
localflare | CLI tool - the main entry point |
localflare-api | API worker that powers the dashboard |
localflare-core | Config parser and utilities |
localflare-dashboard | React dashboard UI (hosted at studio.localflare.dev) |
# Clone the repo
git clone https://github.com/rohanprasadofficial/localflare
cd localflare
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Terminal 1: Start the demo app worker and localflare API
cd demo-app
pnpm run dev:client
pnpm run dev:studio
# Terminal 2: Start the dashboard
cd packages/dashboard
pnpm run dev
# Open the dashboard
# http://localhost:5174/d1?port=8787
| Binding | Support | Dashboard Features |
|---|---|---|
| D1 | ✅ Full | Full-featured database studio (see below) |
| KV | ✅ Full | Key browser, value editor, bulk operations |
| R2 | ✅ Full | File browser, upload/download, metadata |
| Durable Objects | ✅ Full | Instance listing, state inspection |
| Queues | ✅ Full | Message viewer, send test messages |
| Service Bindings | ✅ Full | Automatic proxying |
A comprehensive database management interface inspired by Drizzle Studio and Supabase:
Data Browser
SQL Query Editor
Schema Viewer
We welcome contributions! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.
Check out our Contributing Guide to get started.
Before contributing:
If you find Localflare useful, please consider supporting its development:
Your sponsorship helps with:
MIT
6,374 followers · starred Jan 2026
622 followers · starred Jan 2026
5,444 followers · starred Jan 2026
153 followers · starred Jan 2026