MIT License

项目介绍

JacobLinCool/d1-manager 是一个托管在 GitHub 上的开源项目,主要使用 Svelte 编写,采用 MIT License 许可证,目前获得 653 个 Star、341 次 Fork。

仓库全名
JacobLinCool/d1-manager
开源许可证
MIT License
Star 数
653
Fork 数
341
未关闭 Issue
24

README 摘要

D1 Manager 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. Features [x] Multiple D1 Databases [x] List all tables in a database [x] Show table schema [x] Run SQL…

完整内容见 GitHub 原始 README 或本页 。

常见问题

d1-manager 用什么语言开发?

主要使用 Svelte 编写,采用 MIT License 许可证,目前有 653 个 Star。

d1-manager 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 d1-manager 的源码?

可以直接克隆仓库:git clone https://github.com/JacobLinCool/d1-manager.git,默认分支为 main;安装与运行步骤见仓库 README。

d1-manager 最近还在维护吗?

仓库最近一次更新为 3 天前,当前有 24 个未关闭 Issue;Star 数为 653,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

D1 Manager is a web UI and API for Cloudflare D1, a serverless SQL database. It provides a web interface for managing databases, tables, and records, as well as an AI assistant to help you write query in natural language.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
1340
价值分
493
活跃状态
活跃

语言占比

CSS
Dockerfile
HTML
JavaScript
Shell
Svelte
TypeScript

README

D1 Manager

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.

semantic-query-demo

Features

  • Multiple D1 Databases
  • List all tables in a database
  • Show table schema
  • Run SQL queries
  • Run Semantic Queries (OpenAI API or Cloudflare AI Worker)
  • Edit table data through UI
  • I18n support (English, Chinese, Spanish, Japanese) add more (Online Editor)
  • API support (see routes/api for details)

Setup

  1. Fork this repo
  2. Setup a Cloudflare Pages with the forked repo
    • Select the SveltKit framework preset.
    • Build command: npm run build
    • Build output directory: .svelte-kit/cloudflare
  3. Use Cloudflare Access to protect the your site
    • The default access rules only restrict access to preview pages, so make sure to add other urls you want protected.
  4. Bind databases to DB_* environment variables

bind-d1

Note: You can bind multiple databases to the manager. In theis example, DB will be default in the UI, and DB_test will be test.

Environment Variables

Some plugins (e.g. Semantic Query) require additional environment variables to be set.

set-env-var

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.
Semantic Query

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-4.1-mini.

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.

Screenshots

tables

run-query

table-browser

add-record

semantic-query

Semantic Query uses OpenAI GPT-4.1 Mini to translate natural language queries into SQL.

评论

暂无评论