Skip to main content
Glama
dlt-hub

dltHub-AI-workbench

Official
by dlt-hub

dltHub AI Harness

dlt(数据加载工具)是一个开源的 Python 库,用于将 API 和数据库中的数据加载到数据仓库或湖仓中。dltHub(付费平台)在 dlt 的基础上扩展了面向编码代理需求的企业级功能:数据转换、数据质量验证、托管运行时基础设施、托管数据应用,以及 AI 驱动的工作区环境。

AI Harness 组件

dltHub AI Harness 是一组工具包,为 AI 编码助手提供使用 dlt 构建数据管道的分步工作流。您可以按原样使用该工具集,也可以分叉并针对自己的技术栈进行定制。dlthub ai CLI 会将工具包组件安装到您的助手的正确位置,并运行工作区 MCP 服务器。

构建工具包涵盖数据摄取(REST API、SQL)、数据转换和数据质量;运行工具包负责部署和探索。REST API 工具包由 dltHub context 提供支持——代理在编写代码之前会查询超过 9,700 个源定义,以找到经过验证的连接器。新用户可以从 quick-start 工具包开始,获得从数据到仪表板的引导式端到端运行体验。

dltHub AI Harness 已通过 Claude CodeCursorCodex 测试,也可能适用于其他 AI 编码助手。我们建议在 accept edits(Claude)/ --approval-mode(Codex)模式下工作以审查更改,并在开始使用 dlthub AI Harness 时熟悉 dlthub AI 工作流。

dltHub AI Harness 支持迭代式数据工程工作流

构建数据管道是迭代式的,涵盖两个主要阶段——摄取和转换——每个阶段都遵循相同的内部循环:

构建(本地开发)

  • 迭代式开发管道——对于摄取:先开发第一个 REST API 端点,然后添加其他端点;对于转换:先设计数据模型,然后构建完整的转换管道

  • 在每一步之后探索已加载的数据并验证

  • 循环回退并优化,直到管道稳定可靠

运行(生产环境)

  • 将摄取或转换管道部署到生产环境

  • 通过基于已加载数据构建的数据应用提供洞察

外部循环连接两个阶段:来自转换和服务层的洞察反馈到摄取优化中。工具集的构建工具包支持本地开发循环;运行工具包负责部署和数据应用。

数据开发生命周期

Related MCP server: Local LLM MCP Server

dltHub AI Harness 工具包

该工具集为您的编码助手提供工具包——其中包含针对特定阶段的、结构化的引导式工作流。助手不会生成临时拼凑的代码,而是从头到尾遵循一系列明确的步骤。

一个工具包包含技能、命令、规则和一个 MCP 服务器——通过一个工作流将它们串联起来,该工作流告诉助手在每一步运行哪个技能以及如何利用 MCP。

所有工具包都依赖 init 来提供共享规则、密钥处理以及 MCP 服务器。使用 dlthub ai CLI 时,init 会作为依赖项自动安装。使用 Claude 市场时,请单独安装 init 插件。

AI Harness

工具包组件

组件

它是什么

何时运行

技能(Skill)

助手遵循的分步流程

由用户意图触发,或通过 /skill-name 显式调用

命令(Command)

用于特定操作的斜杠命令

用户通过 /toolkit:command 调用

规则(Rule)

始终生效的上下文(约定、约束)

每个会话自动加载

工作流(Workflow)

具有固定入口点的有序技能序列

作为规则加载——始终生效

MCP 服务器

将管道、表和密钥作为工具暴露

在会话期间,通过 MCP 协议

dltHub context

超过 9,700 个 REST API 源定义,包含经过验证的连接器和管道模式

在源发现期间,通过 search_dlthub_sources 使用

MCP 工具

两个 MCP 服务器在整个工作流中为代理提供结构化上下文,避免手动复制粘贴的需要。

dlt-workspace-mcp(本地,由 dlthub ai init 安装)暴露:数据检查工具(list_tablespreview_tableexecute_sql_queryget_row_countsdisplay_schemaget_local_pipeline_state)、密钥工具(secrets_view_redactedsecrets_update_fragment)以及工具包发现(list_toolkitstoolkit_info)。

dltHub context(远程)提供 search_dlthub_sources——由 find-source 技能使用,用于搜索超过 9,700 个 REST API 源定义,并在编写代码之前返回带有参考链接的经过验证的连接器。

可用工具包

工具包

阶段

工作流入口

功能

示例提示

可用性

quick-start

设置

quick-start

3–5 个提示即可完成从数据到仪表板的引导式端到端运行;根据所选深度路由到正确的入口技能

"使用 quick-start 带我完成使用 GitHub API 的完整工作流"

运行 /quick-start:quick-start

bootstrap

设置

/init-workspace

检查 uv、Python 虚拟环境和 dlthub;安装缺失的组件;初始化工作区;然后运行 dlthub ai init 并列出可用工具包

"运行 /init-workspace 以设置带 dlthub 的 Python 环境"

亲自试试!运行 /init-workspace

rest-api-pipeline

构建

find-source

搭建、调试和验证 REST API 摄取管道

"使用 find-source 将 Stripe API 的数据加载到 DuckDB"

亲自试试!运行 /find-source

sql-database-pipeline

构建

find-source

搭建、调试和验证 SQL 数据库摄取管道

"使用 find-source 将我的 Postgres 数据库中的表加载到 DuckDB"

运行 /find-source

filesystem-pipeline

构建

create-filesystem-pipeline

从本地磁盘、S3、GCS、Azure 或 SFTP 加载文件(CSV、Parquet、JSONL 或自定义格式)到目标位置

"使用 create-filesystem-pipeline 将我的 S3 CSV 文件加载到 DuckDB"

注册

data-exploration

探索

explore-data

查询已加载的数据并创建 marimo 仪表板

"使用 explore-data 探索我的 Stripe 管道并创建仪表板"

亲自试试!运行 /explore-data

dlthub-platform

运行

setup-runtime

将管道部署到 dltHub 平台

"使用 setup-runtime 将我的管道部署到 dltHub"

注册

transformations

转换

annotate-sources

设计规范数据模型(CDM)并从现有管道编写 dlthub 转换函数

"使用 annotate-sources 开始从我的 HubSpot 和 Luma 管道构建 CDM"

注册

data-quality

构建

setup-data-quality

在 dlt 管道数据上定义、运行和审查数据质量检查与指标

"使用 setup-data-quality 为我的 Stripe 管道添加验证检查"

注册

performance

构建

optimize-performance

调优缓慢或内存占用高的管道——诊断瓶颈阶段并应用并行、工作进程、缓冲区和批处理

"使用 optimize-performance 加速我的 Postgres 管道"

注册

init 是一个共享依赖项,提供规则、密钥处理和 MCP 服务器。它由 dlthub ai init 自动安装,或作为独立插件通过 Claude 市场安装。

入门指南

新项目(推荐)

要设置一个带有 AI 支持的干净的新 dlthub 项目,请运行 dlthub-init。它是非交互式的且支持 AI,因此您的编码助手可以为您运行它——这是代理应使用的命令,用于设置一个干净的新 dlthub 项目。它通过捆绑的锁文件固定 dlt[hub] 版本并运行 uv sync

uvx dlthub-init@latest <dir>    # scaffold a clean new project into <dir>

现有项目

要将 AI 工具集添加到现有项目,请在原地运行相同的 dlthub-init。它使用逐文件冲突处理(合并 pyproject.toml,绝不覆盖 secrets.toml,合并 .gitignore),固定 dlt[hub] 版本,并运行 uv sync——而且由于它是非交互式的,您的编码助手可以为您运行它:

uvx dlthub-init@latest          # set up AI support in the current directory

手动步骤(备选): 如果您更愿意逐步操作,或者 dlthub-init 不可用:

注意: 下面所有的 dlthub ai 命令都使用 uv run dlthub ... 语法。如果你已在全局或当前虚拟环境中安装了 dlthub,则可以省略 uv run 并直接调用 dlthub。我们建议使用 uv。

# Initialize the environment 
uv init 

# Install dlthub
uv add "dlt[hub]"

# Initialize the dlthub workspace and follow its instructions (most importantly `uv sync`)
uv run dlthub init

# Set up AI support (auto-detects your coding assistant)
uv run dlthub ai init

# If multiple coding assistants are detected, specify one explicitly:
uv run dlthub ai init --agent <agent>  # <agent>: claude | cursor | codex

dlthub ai init 会从环境变量和配置文件中检测你的编码助手,然后将技能、规则和 MCP 服务器安装到该工具的相应位置。

Claude Code 注意: 将以下内容添加到你的 CLAUDE.md 中,以强制实施安全的凭据处理:

CRITICAL: never ask for credentials in chat. Always let the user edit secrets directly and do not attempt to read them.

Cursor 注意: 运行命令后,请在 Cursor Settings > MCP 中手动启用 dlt-workspace-mcp 服务器。将以下内容添加到你的 .cursor/rules/security.mdc 中,以强制实施安全的凭据处理:

CRITICAL: never ask for credentials in chat. Always let the user edit secrets directly and do not attempt to read them.

Codex 注意: Codex 不支持命令和规则,因此安装程序会将这些内容转换为技能和 AGENTS.md。Codex 还在严格沙箱中运行——请考虑在项目或全局配置中启用网络访问:

# .codex/config.toml
web_search = "live"

将以下内容添加到你的 AGENTS.md 中,以强制实施安全的凭据处理:

CRITICAL: never ask for credentials in chat. Always let the user edit secrets directly and do not attempt to read them.

首次入门(想尝试或学习 dltHub)

刚接触 dltHub,只想尝试或学习它?请亲自运行 dlthub-start —— 它会搭建一个全新的试用工作区(不用于生产,也不用于设置真实项目):

uvx dlthub-start@latest

请亲自运行——不要让你的编码助手代劳。 uvx dlthub-start 必须由真人运行,因为它需要交互以进行身份验证;它只能在真实终端中运行(不能在 ! 模式下运行)。对于由智能体驱动的设置,请使用上面的 dlthub-init

浏览并安装工具包

还没有配置好 dlthub? 请先按照上面的 新项目现有项目 操作(或使用 bootstrap 工具包的 /init-workspace,该命令可由助手驱动)。下面的工具包命令假定你的环境中已安装 dlthub

uv run dlthub ai toolkit list

安装工具包(如果你不确定要安装哪些工具包,我们建议全部安装):

uv run dlthub ai toolkit install quick-start
uv run dlthub ai toolkit install bootstrap
uv run dlthub ai toolkit install rest-api-pipeline
uv run dlthub ai toolkit install sql-database-pipeline
uv run dlthub ai toolkit install filesystem-pipeline
uv run dlthub ai toolkit install dlthub-platform
uv run dlthub ai toolkit install data-exploration
uv run dlthub ai toolkit install transformations
uv run dlthub ai toolkit install data-quality
uv run dlthub ai toolkit install performance

启动 harness

使用上方 可用工具包 表格中的示例提示之一来启动工作流。

Claude Code —— 通过终端中的 claude 启动新会话。安装后重新启动,以便技能和 MCP 生效。

Cursor —— 在 Cursor 中打开项目,并使用聊天面板(Cmd+L)。已安装的技能和规则会自动加载。

Codex —— 通过 codex 启动 Codex CLI,或在 UI 中使用 Codex 聊天。设置完成后重新启动 Codex,以使 MCP 服务器生效。

Claude Code 市场插件(早期访问)

早期访问: Claude Code 插件目前处于早期访问阶段,可能无法在不同工具包之间提供最佳的衔接体验。如果你是 dltHub 新手,想尝试或学习它,请参阅 首次入门 —— 你需要亲自运行 uvx dlthub-start@latest。当你希望通过 bootstrap 工具包从 Claude Code 内部初始化一个现有/空项目时,下面的市场路径会很有用(该工具包优先使用 uvx dlthub-init@latest —— 这是一种可由智能体运行的命令,用于配置一个干净的全新或现有 dlthub 项目 —— 并回退到就地安装步骤)。

该 harness 也可通过市场作为 Claude Code 插件使用。启动一个 Claude Code 会话并运行:

/plugin marketplace add dlt-hub/dlthub-ai-harness
/plugin install init@dlthub-ai-harness --scope project
/plugin install quick-start@dlthub-ai-harness --scope project
/plugin install bootstrap@dlthub-ai-harness --scope project
/plugin install rest-api-pipeline@dlthub-ai-harness --scope project
/plugin install sql-database-pipeline@dlthub-ai-harness --scope project
/plugin install dlthub-platform@dlthub-ai-harness --scope project
/plugin install data-exploration@dlthub-ai-harness --scope project
/plugin install transformations@dlthub-ai-harness --scope project
/plugin install data-quality@dlthub-ai-harness --scope project

启动一个新会话 —— 插件只有在重新启动 Claude Code 后才会生效:claude

正在恢复会话? 在会话中途安装的插件在启动新会话之前不会生效。

dlthub ai 命令行工具

dlthub ai 子命令是 harness 与你的编码助手之间的桥梁。dlthub ai init 会安装项目规则、一个机密管理技能、适当的忽略文件,并为你的智能体配置 dlt MCP 服务器。dlthub ai toolkit install 会将额外的工具包组件(技能、规则、命令)复制到你的助手的正确位置。

工具包管理 —— 将技能、规则、命令和 MCP 配置从 harness 复制到你的项目的智能体配置目录(.claude/.cursor/.agents/ 等):

uv run dlthub ai status                        # show installed agent, dlthub version, active toolkits
uv run dlthub ai toolkit list                  # list available toolkits from the harness
uv run dlthub ai toolkit info <name>           # show a toolkit's skills, commands, and workflow
uv run dlthub ai toolkit install <name>        # install a toolkit for the detected agent
uv run dlthub ai toolkit install <name> --agent <agent>  # <agent>: claude | cursor | codex  - override agent detection

机密管理 —— dlt 将凭据存储在 TOML 文件中;这些命令让助手无需读取原始机密值即可检查和更新这些凭据:

uv run dlthub ai secrets list                  # show which secret files exist and where
uv run dlthub ai secrets view-redacted         # print secrets with values masked
uv run dlthub ai secrets update-fragment --path <file> '<toml>'  # merge a TOML snippet into a secrets file

MCP 服务器 —— 启动一个本地服务器,将你的 dlthub 工作区(管道、模式、表、机密)作为可供助手调用的工具暴露出来:

uv run dlthub ai mcp run                       # run in SSE mode (default)
uv run dlthub ai mcp run --stdio               # run in stdio mode (for assistants that require it)
uv run dlthub ai mcp install                   # register the MCP server in the agent's config

MCP 服务器让助手能够回答诸如“加载了哪些表?”或“显示 schema”之类的问题,而无需你将输出复制粘贴到聊天中。

许可证

本项目采用 dltHub AI Harness License 许可。

Install Server
F
license - not found
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.

  • AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.

  • Free OpenAI-compatible inference with signed provenance receipts and 3 focused MCP tools.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dlt-hub/dlthub-ai-harness'

If you have feedback or need assistance with the MCP directory API, please join our Discord server