D1 Manager is a web UI and API for Cloudflare D1, a serverless SQL database. It provides a user-friendly interface for managing databases, tables, and records, as well as an API for performing operations programmatically. D1 Manager simplifies database management, enabling users to focus on their data.
- Multiple D1 Databases
- List all tables in a database
- Show table schema
- Run SQL queries
- Run Semantic Queries (with
OPENAI_API_KEY
env var set) - Create new table through UI
- Edit table data through UI
- Custom SQL scripts
- I18n support (English, Chinese) add more
- API support (see routes/api for details)
- Fork this repo
- Setup a Cloudflare Pages with the forked repo
- Use Cloudflare Access to protect the your site
- Bind databases to
DB_*
environment variables
Note: You can bind multiple databases to the manager. In theis example,
DB
will bedefault
in the UI, andDB_test
will betest
.
Some plugins (e.g. Semantic Query) require additional environment variables to be set.
Also, there are some configuration options that can be set through environment variables.
SHOW_INTERNAL_TABLES
: Show internal tables (splite_*
andd1_*
) in the UI.
Semantic Query uses OpenAI Codex to translate natural language queries into SQL.