-
Notifications
You must be signed in to change notification settings - Fork 2
Quick Start Guide
Get up and running with D1 Database Manager in just a few minutes!
The fastest way to try D1 Manager is using local development mode with mock data.
git clone https://github.com/neverinfamous/d1-manager.git
cd d1-manager
npm installTerminal 1 - Frontend:
npm run devRuns on http://localhost:5173
Terminal 2 - Worker API:
npx wrangler dev --config wrangler.dev.toml --localRuns on http://localhost:8787
Navigate to http://localhost:5173 in your browser.
You'll see sample databases with mock data - perfect for exploring features!
On the home page, you'll see database cards showing:
- Database name and UUID
- Creation date
- File size
- Number of tables
π‘ Tip: Use the search box to quickly filter databases by name - great when you have many databases!
Try it: Click on any database card to explore its tables.
Inside a database, you'll see:
- List of all tables
- Search bar to filter tables by name
- Quick actions (Browse, Schema, Export)
π‘ Tip: Type in the search bar to instantly filter tables - partial matches work too!
Try it: Click the "Browse" button on any table to view its data.
Open the Query Console:
- Click the "Query" button on any database card
- Write a SQL query in the editor
- Press Ctrl+Enter (Cmd+Enter on Mac) to execute
Example query:
SELECT * FROM users LIMIT 10;Use the Visual Schema Designer:
- Navigate to any database
- Click "Create Table"
- Add columns with the visual builder
- Review the SQL preview
- Click "Create"
- From the home page, click "Create Database"
- Enter a name (lowercase, letters, numbers, hyphens)
- Click "Create"
- Click the "Rename" button on a database card
- Download a backup (recommended)
- Enter the new name
- Check the confirmation box
- Click "Rename Database"
Note: Renaming creates a new database, migrates data, and deletes the original.
- Select one or more databases using checkboxes
- Click "Delete Selected"
- Confirm the deletion
- Navigate to a database
- Find the table you want to clone
- Click the "Clone" button
- Enter a new name
- Click "Clone Table"
This copies the table structure, data, and indexes.
- Click the "Export" button on a table
- Choose format: SQL or CSV
- The file downloads automatically
- View a table's data
- Click "Add Column" in the column management section
- Specify:
- Column name
- Data type (TEXT, INTEGER, REAL, BLOB, NUMERIC)
- Constraints (NOT NULL, PRIMARY KEY)
- Default value (optional)
- Click "Add Column"
- View a table's data
- Use the filter bar above the table
- Select operator and enter value for any column
- Filters apply automatically
Available operators:
- TEXT: contains, equals, starts with, ends with
- INTEGER/REAL: =, >, <, β₯, β€
- NULL: is null, is not null
- From the home page, expand the "Cross-Database Search" card
- Enter a search term
- Select search scope:
- Table names
- Column names
- Table data
- Click "Search"
- From the home page, click "Compare Databases"
- Select two databases to compare
- Click "Compare"
- View differences in:
- Tables (missing, matching)
- Column structures
- Data types
- From the home page, click "Migrate Database"
- Select source and target databases
- Choose tables to migrate
- Review migration plan
- Click "Start Migration"
Click the theme icon in the header to cycle through:
- System - Follows your OS preference
- Light - Force light mode
- Dark - Force dark mode
Your preference is saved automatically.
- Ctrl+Enter / Cmd+Enter - Execute query in Query Console
- Esc - Close open dialogs
Select multiple databases or tables using checkboxes for efficient batch operations:
- Download multiple databases as a ZIP file
- Delete multiple items at once
- Clone multiple tables simultaneously
- Export multiple tables as SQL or CSV
When you filter table rows, the filters are saved in the URL. Bookmark or share the URL to preserve your filtered view.
Before deleting rows or tables, use the "Simulate Cascade Impact" button to visualize exactly what will be affected:
- Interactive graph showing all cascade paths
- Row count estimates at each level
- Export reports for documentation
- See Cascade Impact Simulator for details
All your executed queries are automatically saved. Access them from the Query Console's history tab.
Create reusable queries:
- Write a query in the Query Console
- Click "Save Query"
- Give it a name and description
- Load it anytime from the saved queries list
# 1. Create database
Click "Create Database" β Enter "my-app-db"
# 2. Open Query Console
Click "Query" on the new database
# 3. Create table
CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
email TEXT UNIQUE NOT NULL,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
# 4. Insert data
INSERT INTO users (name, email) VALUES
('Alice', 'alice@example.com'),
('Bob', 'bob@example.com');
# 5. Browse data
Navigate to database β Click "Browse" on users table# Export
1. Navigate to a database
2. Select tables using checkboxes
3. Click "Download Selected"
4. Choose format (SQL or CSV)
5. Save the ZIP file
# Import
1. From home page, click "Upload Database"
2. Choose "Create new database" or "Import into existing"
3. Select your SQL file
4. Click "Upload"# Optimize one or more databases
1. Select databases using checkboxes
2. Click "Optimize Selected"
3. Confirm the operation
4. Wait for ANALYZE to completeThis updates query statistics for better query performance.
- Local Dev: Make sure both frontend and Worker API are running
- Production: Check Cloudflare API credentials and permissions
- Check that the Worker API is accessible
- Look for errors in the browser console (F12)
- Verify your SQL syntax
- Refresh the page
- Check browser console for errors
- Verify database permissions
- Clear browser cache and cookies
- Check Cloudflare Access configuration
- Verify
TEAM_DOMAINandPOLICY_AUDare correct
Now that you know the basics:
- Database Management - Deep dive into database operations
- Table Operations - Master table management
- Query Console - Advanced SQL querying
- Configuration - Customize your setup
- Production Deployment - Deploy to Cloudflare Workers
Want to see it in action without installing?
Visit: https://d1.adamic.tech/
Note: The live demo uses Cloudflare Access authentication.
Questions? Check Troubleshooting or open an issue.
- Database Management
- R2 Backup Restore
- Scheduled Backups
- Table Operations
- Query Console
- Schema Designer
- Column Management
- Bulk Operations
- Job History
- Time Travel
- Read Replication
- Undo Rollback
- Foreign Key Visualizer
- ER Diagram
- Foreign Key Dependencies
- Foreign Key Navigation
- Circular Dependency Detector
- Cascade Impact Simulator
- AI Search
- FTS5 Full Text Search
- Cross Database Search
- Index Analyzer
- Database Comparison
- Database Optimization