> For the complete documentation index, see [llms.txt](https://docs.tidelight.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tidelight.app/untitled-zh/shi-yong-tidelight-gou-jian/ben-di-kai-fa.md).

# 本地开发

在本地运行 Tidelight 并验证更改。

## 本地开发

你需要 Node.js、npm，以及访问 Tidelight Supabase 项目的权限。

{% stepper %}
{% step %}

### 安装依赖

```bash
npm ci
cp .env.example .env.local
```

{% endstep %}

{% step %}

### 配置你的环境

在以下位置设置 Supabase 项目 URL 和可发布密钥 `.env.local`。请保持服务器凭据私密。

对于本地合成，请配置所需的服务端模型凭据。切勿在浏览器代码中暴露它们。
{% endstep %}

{% step %}

### 启动应用

```bash
npm run dev
```

打开 `http://localhost:3000`.
{% endstep %}

{% step %}

### 验证你的更改

```bash
npm run typecheck
npm run lint
npm run build
```

{% endstep %}
{% endstepper %}

数据库更改位于 `supabase/migrations`。基于所有者范围的访问策略会保护私有记录。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.tidelight.app/untitled-zh/shi-yong-tidelight-gou-jian/ben-di-kai-fa.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
