360 Secure SkillHub
360 安全技能中心

Warehouse UI

面向多数据库的命令行工具 warehouse-ui:支持连接 PostgreSQL、MySQL、SQLite、BigQuery 与 MongoDB,列出库表并查看字段结构,执行 SQL 或从 SQL 文件查询并输出 JSON,对 BigQuery 做 dry-run 成本预估,还可借助配置的 AI 服务把自然语言转成 SQL 并执行,附带连接管理、历史查询与表格格式输出。

olegnazarov23
olegnazarov23
热度 62.48
最近更新 2026-05-18 12:14:48
分类:数据依赖:代码执行 / 第三方 API / 读写文件 / 内部调用大模型应用场景:数据处理 / 代码生成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add warehouse-ui
Metadata
name
warehouse-ui
description
Universal database IDE CLI — query PostgreSQL, MySQL, SQLite, BigQuery, MongoDB with cost projection
version
0.10.0
homepage
https://github.com/olegnazarov23/warehouse-ui
metadata
{"openclaw":{"emoji":"db","requires":{"bins":["warehouse-ui"]},"primaryEnv":"DATABASE_URL","os":["darwin","linux","win32"],"install":[{"kind":"github-release","repo":"olegnazarov23/warehouse-ui","bins":["warehouse-ui"],"label":"Download from GitHub Releases"}]}}

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:

# From a connection URL
warehouse-ui connect --url "postgres://user:pass@localhost:5432/mydb"

# With explicit parameters
warehouse-ui connect --type postgres --host localhost:5432 --database mydb --user admin --password secret

# SQLite (local file)
warehouse-ui connect --type sqlite --database /path/to/data.db

# BigQuery (service account)
warehouse-ui connect --type bigquery --database my-gcp-project --option sa_json_path=/path/to/sa.json

# MySQL
warehouse-ui connect --url "mysql://user:pass@localhost:3306/mydb"

Check Connection Status

warehouse-ui status

Explore Schema

# List all databases
warehouse-ui schema list-databases

# List tables in a database
warehouse-ui schema list-tables --database mydb

# Describe a table (columns, types, nullability)
warehouse-ui schema describe users --database mydb

Run Queries

# SQL as argument
warehouse-ui query "SELECT * FROM users LIMIT 10"

# With explicit limit
warehouse-ui query --sql "SELECT count(*) FROM orders WHERE created_at > '2024-01-01'" --limit 1000

# From a SQL file
warehouse-ui query --file path/to/report.sql

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:

warehouse-ui dry-run "SELECT * FROM big_dataset.events WHERE date > '2024-01-01'"

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 OPENAI_API_KEY or ANTHROPIC_API_KEY):

# Generate SQL only
warehouse-ui ai "show me the top 10 customers by total revenue"

# Generate and execute
warehouse-ui ai "find all orders from last week that were cancelled" --execute

List Saved Connections

warehouse-ui connections

Query History

warehouse-ui history --limit 10
warehouse-ui history --search "SELECT"

Disconnect

warehouse-ui disconnect

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://)
  • OPENAI_API_KEY — Required for ai command with OpenAI
  • ANTHROPIC_API_KEY — 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