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.
npm run build
.svelte-kit/cloudflare
DB_*
environment variablesNote: 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_*
and d1_*
) in the UI.You can use OpenAI API or Cloudflare AI Worker to run Semantic Query.
OpenAI API:
OPENAI_API_KEY
: OpenAI API key for Semantic Query.OPENAI_API_URL
: You may use this with Cloudflare AI Gateway to proxy requests to OpenAI API.OPENAI_MODEL
: OpenAI API model for Semantic Query. Default to gpt-3.5-turbo-1106
.Cloudflare AI Worker:
AI
: Bind a Cloudflare AI Worker to this variable.CFAI_MODEL
: Cloudflare AI Worker model for Semantic Query. Default to @cf/mistral/mistral-7b-instruct-v0.1
.Semantic Query uses OpenAI GPT-3.5 Turbo to translate natural language queries into SQL.