@indiekitai/pg-dash 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -3
- package/README.zh-CN.md +8 -3
- package/dist/cli.js +672 -0
- package/dist/cli.js.map +1 -1
- package/dist/mcp.js +692 -0
- package/dist/mcp.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# pg-dash
|
|
4
4
|
|
|
5
|
-
**The AI-native PostgreSQL health checker.** One command to audit your database,
|
|
5
|
+
**The AI-native PostgreSQL health checker.** One command to audit your database, 25 MCP tools for AI-assisted optimization, CI integration for automated checks.
|
|
6
6
|
|
|
7
7
|
📖 **[Read the full writeup on Dev.to](https://dev.to/fan_yang_670d82db29664c9e/i-built-a-free-postgresql-health-checker-with-23-mcp-tools-and-ci-integration-2abc)**
|
|
8
8
|
|
|
@@ -55,7 +55,7 @@ The Dashboard is there when you need it. But the real power is in the CLI, MCP,
|
|
|
55
55
|
| pganalyze | $149+/mo | SaaS signup | ❌ | ❌ |
|
|
56
56
|
| Grafana+Prometheus | Free | 3 services | ❌ | ❌ |
|
|
57
57
|
| pgAdmin | Free | Complex UI | ❌ | ❌ |
|
|
58
|
-
| **pg-dash** | **Free** | **One command** | **
|
|
58
|
+
| **pg-dash** | **Free** | **One command** | **25 MCP tools** | **`--ci --diff`** |
|
|
59
59
|
|
|
60
60
|
## Features
|
|
61
61
|
|
|
@@ -263,6 +263,8 @@ Options:
|
|
|
263
263
|
--discord-webhook <url> Discord webhook URL for alert notifications
|
|
264
264
|
--ci Output GitHub Actions annotations (check, check-migration, diff-env)
|
|
265
265
|
--diff Compare with last snapshot (check command)
|
|
266
|
+
--ai-suggest Use AI to generate fix suggestions (requires LLM config)
|
|
267
|
+
--ai-explain Use AI to explain schema diff business impact (requires LLM config)
|
|
266
268
|
--snapshot-path <path> Path to snapshot file for --diff
|
|
267
269
|
--health Include health comparison (diff-env)
|
|
268
270
|
-v, --version Show version
|
|
@@ -280,7 +282,7 @@ pg-dash-mcp postgres://user:pass@host/db
|
|
|
280
282
|
PG_DASH_CONNECTION_STRING=postgres://... pg-dash-mcp
|
|
281
283
|
```
|
|
282
284
|
|
|
283
|
-
### Available Tools (
|
|
285
|
+
### Available Tools (25)
|
|
284
286
|
|
|
285
287
|
| Tool | Description |
|
|
286
288
|
|------|-------------|
|
|
@@ -307,6 +309,9 @@ PG_DASH_CONNECTION_STRING=postgres://... pg-dash-mcp
|
|
|
307
309
|
| `pg_dash_autovacuum` | Check autovacuum health — which tables are stale or never vacuumed |
|
|
308
310
|
| `pg_dash_locks` | Show active lock waits and long-running blocking queries |
|
|
309
311
|
| `pg_dash_config_check` | Audit PostgreSQL configuration and get tuning recommendations |
|
|
312
|
+
| `fetch_db_context` | Comprehensive DB context for AI agents: all table structures, columns, types, PKs/FKs, indexes, business intent inference, and health summary (single call for full context) |
|
|
313
|
+
| `pg_dash_query_natural` | Query database using natural language — LLM converts your question to SQL and returns results. Example: "show me slow queries last hour", "find missing indexes", "what's the health score", "list all tables with their sizes" |
|
|
314
|
+
| `ci_health_summary` | Generate a CI-friendly health summary with AI-powered prioritization. Input: health check result (from pg_dash_health). Output: one-sentence summary + prioritized issue list. Perfect for GitHub Actions/GitLab CI integration. |
|
|
310
315
|
|
|
311
316
|
## MCP Setup
|
|
312
317
|
|
package/README.zh-CN.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# pg-dash
|
|
4
4
|
|
|
5
|
-
**AI 原生的 PostgreSQL 健康检查工具。** 一条命令审计数据库,
|
|
5
|
+
**AI 原生的 PostgreSQL 健康检查工具。** 一条命令审计数据库,25 个 MCP 工具让 AI 帮你优化,CI 集成自动检查。
|
|
6
6
|
|
|
7
7
|
📖 **[在 Dev.to 阅读完整介绍](https://dev.to/fan_yang_670d82db29664c9e/i-built-a-free-postgresql-health-checker-with-23-mcp-tools-and-ci-integration-2abc)**
|
|
8
8
|
|
|
@@ -55,7 +55,7 @@ Dashboard 需要时可以用。但真正的核心能力在 CLI、MCP 和 CI。
|
|
|
55
55
|
| pganalyze | $149+/月 | SaaS 注册 | ❌ | ❌ |
|
|
56
56
|
| Grafana+Prometheus | 免费 | 配置 3 个服务 | ❌ | ❌ |
|
|
57
57
|
| pgAdmin | 免费 | 界面复杂 | ❌ | ❌ |
|
|
58
|
-
| **pg-dash** | **免费** | **一条命令** | **
|
|
58
|
+
| **pg-dash** | **免费** | **一条命令** | **25 个 MCP 工具** | **`--ci --diff`** |
|
|
59
59
|
|
|
60
60
|
## 功能
|
|
61
61
|
|
|
@@ -204,6 +204,8 @@ Options:
|
|
|
204
204
|
--discord-webhook <url> Discord webhook URL,用于告警通知
|
|
205
205
|
--ci 输出 GitHub Actions 注解(check、check-migration、diff-env)
|
|
206
206
|
--diff 与上次快照对比(check 命令)
|
|
207
|
+
--ai-suggest 使用 AI 生成修复建议(需要配置 LLM)
|
|
208
|
+
--ai-explain 使用 AI 解释 Schema 差异的业务影响(需要配置 LLM)
|
|
207
209
|
--snapshot-path <path> --diff 使用的快照文件路径
|
|
208
210
|
--health 包含健康对比(diff-env)
|
|
209
211
|
-v, --version 显示版本
|
|
@@ -221,7 +223,7 @@ pg-dash-mcp postgres://user:pass@host/db
|
|
|
221
223
|
PG_DASH_CONNECTION_STRING=postgres://... pg-dash-mcp
|
|
222
224
|
```
|
|
223
225
|
|
|
224
|
-
### 可用工具(
|
|
226
|
+
### 可用工具(25 个)
|
|
225
227
|
|
|
226
228
|
| 工具 | 描述 |
|
|
227
229
|
|------|------|
|
|
@@ -248,6 +250,9 @@ PG_DASH_CONNECTION_STRING=postgres://... pg-dash-mcp
|
|
|
248
250
|
| `pg_dash_autovacuum` | Autovacuum 健康状态——哪些表长期未 vacuum |
|
|
249
251
|
| `pg_dash_locks` | 显示活跃锁等待链和长时间阻塞的查询 |
|
|
250
252
|
| `pg_dash_config_check` | 审计 PostgreSQL 配置,给出调优建议 |
|
|
253
|
+
| `fetch_db_context` | AI Agent 用的完整数据库上下文:所有表结构、列类型、主键外键、索引、业务意图推断、健康摘要(一次调用获取全部信息) |
|
|
254
|
+
| `pg_dash_query_natural` | 自然语言查询数据库——LLM 将你的问题转换为 SQL 并返回结果。示例:"显示最近一小时的慢查询"、"查找缺失的索引"、"健康评分是多少"、"列出所有表及其大小" |
|
|
255
|
+
| `ci_health_summary` | 生成 CI 友好的健康摘要(AI 辅助优先级排序)。输入:健康检查结果。输出:一句自然语言总结 + 优先级排序的问题列表。非常适合集成到 GitHub Actions/GitLab CI。 |
|
|
251
256
|
|
|
252
257
|
## MCP 配置
|
|
253
258
|
|