Warehouse UI — Database Query Tool
Use this skill to connect to databases, explore schemas, run queries, estimate costs, and generate SQL from natural language.
Installation
Download from GitHub Releases: https://github.com/olegnazarov23/warehouse-ui/releases
- - macOS: Download the DMG, drag to Applications, then add to PATH:
ln -s /Applications/warehouse-ui.app/Contents/MacOS/warehouse-ui /usr/local/bin/warehouse-ui
- - Windows: Run the installer EXE, it adds to PATH automatically
Supported Databases
- - PostgreSQL
- MySQL
- SQLite
- BigQuery (with cost projection)
- MongoDB
Connect to a Database
Before running queries, establish a connection:
CODEBLOCK0
Check Connection Status
CODEBLOCK1
Explore Schema
CODEBLOCK2
Run Queries
CODEBLOCK3
Output is JSON with columns, rows, row count, duration, and (for BigQuery) bytes processed and cost.
Cost Estimation (Dry Run)
Check query cost before executing — especially useful for BigQuery:
CODEBLOCK4
Returns: estimated bytes, estimated cost (USD), statement type, referenced tables, and warnings.
AI-Powered Queries
Generate SQL from natural language using a configured AI provider (set OPENAIAPIKEY or ANTHROPICAPIKEY):
CODEBLOCK5
List Saved Connections
CODEBLOCK6
Query History
CODEBLOCK7
Disconnect
CODEBLOCK8
Output Format
All commands output JSON to stdout by default. Add --format table for human-readable output. Errors are JSON on stderr with exit code 1.
Environment Variables
- -
DATABASE_URL — Auto-connect without explicit connect step (supports postgres://, mysql://, sqlite://, mongodb://) - INLINECODE4 — Required for
ai command with OpenAI - INLINECODE6 — Required for
ai command with Anthropic
Tips
- - Set
DATABASE_URL to skip the connect step entirely - Use
schema describe <table> to understand table structure before querying - Use
dry-run on BigQuery to check costs before executing expensive queries - Use
--limit to control result size for large tables - Use
connections to see databases already configured in the desktop app
Warehouse UI — 数据库查询工具
使用此技能连接数据库、浏览模式、运行查询、估算成本,以及从自然语言生成 SQL。
安装
从 GitHub Releases 下载:https://github.com/olegnazarov23/warehouse-ui/releases
- - macOS:下载 DMG 文件,拖入应用程序文件夹,然后添加到 PATH:
ln -s /Applications/warehouse-ui.app/Contents/MacOS/warehouse-ui /usr/local/bin/warehouse-ui
- - Windows:运行安装程序 EXE,它会自动添加到 PATH
支持的数据库
- - PostgreSQL
- MySQL
- SQLite
- BigQuery(含成本预估)
- MongoDB
连接数据库
在运行查询之前,先建立连接:
bash
通过连接 URL
warehouse-ui connect --url postgres://user:pass@localhost:5432/mydb
使用显式参数
warehouse-ui connect --type postgres --host localhost:5432 --database mydb --user admin --password secret
SQLite(本地文件)
warehouse-ui connect --type sqlite --database /path/to/data.db
BigQuery(服务账号)
warehouse-ui connect --type bigquery --database my-gcp-project --option sa
jsonpath=/path/to/sa.json
MySQL
warehouse-ui connect --url mysql://user:pass@localhost:3306/mydb
检查连接状态
bash
warehouse-ui status
浏览模式
bash
列出所有数据库
warehouse-ui schema list-databases
列出数据库中的表
warehouse-ui schema list-tables --database mydb
描述表结构(列、类型、可空性)
warehouse-ui schema describe users --database mydb
运行查询
bash
SQL 作为参数
warehouse-ui query SELECT * FROM users LIMIT 10
带显式限制
warehouse-ui query --sql SELECT count(*) FROM orders WHERE created_at > 2024-01-01 --limit 1000
从 SQL 文件读取
warehouse-ui query --file path/to/report.sql
输出为 JSON 格式,包含列、行、行数、耗时,以及(针对 BigQuery)处理字节数和成本。
成本估算(预运行)
在执行前检查查询成本——对 BigQuery 尤其有用:
bash
warehouse-ui dry-run SELECT * FROM big_dataset.events WHERE date > 2024-01-01
返回:预估字节数、预估成本(美元)、语句类型、引用的表以及警告信息。
AI 驱动查询
使用已配置的 AI 提供商(设置 OPENAIAPIKEY 或 ANTHROPICAPIKEY)从自然语言生成 SQL:
bash
仅生成 SQL
warehouse-ui ai 显示按总收入排名前 10 的客户
生成并执行
warehouse-ui ai 查找上周所有已取消的订单 --execute
列出已保存的连接
bash
warehouse-ui connections
查询历史
bash
warehouse-ui history --limit 10
warehouse-ui history --search SELECT
断开连接
bash
warehouse-ui disconnect
输出格式
默认情况下,所有命令以 JSON 格式输出到标准输出。添加 --format table 可输出人类可读的格式。错误信息以 JSON 格式输出到标准错误,退出码为 1。
环境变量
- - DATABASEURL — 自动连接,无需显式执行 connect 步骤(支持 postgres://、mysql://、sqlite://、mongodb://)
- OPENAIAPIKEY — 使用 OpenAI 执行 ai 命令时必需
- ANTHROPICAPI_KEY — 使用 Anthropic 执行 ai 命令时必需
提示
- - 设置 DATABASE_URL 可完全跳过 connect 步骤
- 在查询前使用 schema describe
了解表结构- 在 BigQuery 上使用 dry-run 检查执行昂贵查询前的成本
- 使用 --limit 控制大表的结果集大小
- 使用 connections 查看已在桌面应用中配置的数据库
标签
skill
ai
通过对话安装
该技能支持在以下平台通过对话安装:
OpenClaw
WorkBuddy
QClaw
Kimi
Claude
方式一:安装 SkillHub 和技能
帮我安装 SkillHub 和 warehouse-ui-1776204534 技能
方式二:设置 SkillHub 为优先技能安装源
设置 SkillHub 为我的优先技能安装源,然后帮我安装 warehouse-ui-1776204534 技能
通过命令行安装
skillhub install warehouse-ui-1776204534
下载
⬇ 下载 warehouse-ui v0.10.0(免费)
文件大小: 2.37 KB |
发布时间: 2026-4-15 11:12