postgresai 0.12.0-beta.5 → 0.12.0-beta.7

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 CHANGED
@@ -55,7 +55,19 @@ Start monitoring with demo database:
55
55
  postgres-ai mon quickstart --demo
56
56
  ```
57
57
 
58
+ Start monitoring with your own database:
59
+ ```bash
60
+ postgres-ai mon quickstart --db-url postgresql://user:pass@host:5432/db
61
+ ```
62
+
63
+ Complete automated setup with API key and database:
64
+ ```bash
65
+ postgres-ai mon quickstart --api-key your_key --db-url postgresql://user:pass@host:5432/db -y
66
+ ```
67
+
58
68
  This will:
69
+ - Configure API key for automated report uploads (if provided)
70
+ - Add PostgreSQL instance to monitor (if provided)
59
71
  - Generate secure Grafana password
60
72
  - Start all monitoring services
61
73
  - Open Grafana at http://localhost:3000
@@ -66,7 +78,15 @@ This will:
66
78
 
67
79
  #### Service lifecycle
68
80
  ```bash
69
- postgres-ai mon quickstart [--demo] # Complete setup (generate config, start services)
81
+ # Complete setup with various options
82
+ postgres-ai mon quickstart # Interactive setup for production
83
+ postgres-ai mon quickstart --demo # Demo mode with sample database
84
+ postgres-ai mon quickstart --api-key <key> # Setup with API key
85
+ postgres-ai mon quickstart --db-url <url> # Setup with database URL
86
+ postgres-ai mon quickstart --api-key <key> --db-url <url> # Complete automated setup
87
+ postgres-ai mon quickstart -y # Auto-accept all defaults
88
+
89
+ # Service management
70
90
  postgres-ai mon start # Start monitoring services
71
91
  postgres-ai mon stop # Stop monitoring services
72
92
  postgres-ai mon restart [service] # Restart all or specific monitoring service
@@ -74,6 +94,12 @@ postgres-ai mon status # Show monitoring services status
74
94
  postgres-ai mon health [--wait <sec>] # Check monitoring services health
75
95
  ```
76
96
 
97
+ ##### Quickstart options
98
+ - `--demo` - Demo mode with sample database (testing only, cannot use with --api-key)
99
+ - `--api-key <key>` - Postgres AI API key for automated report uploads
100
+ - `--db-url <url>` - PostgreSQL connection URL to monitor (format: `postgresql://user:pass@host:port/db`)
101
+ - `-y, --yes` - Accept all defaults and skip interactive prompts
102
+
77
103
  #### Monitoring target databases (`mon targets` subgroup)
78
104
  ```bash
79
105
  postgres-ai mon targets list # List databases to monitor
@@ -96,7 +122,7 @@ postgres-ai mon shell <service> # Open shell to monitoring servic
96
122
  ### MCP server (`mcp` group)
97
123
 
98
124
  ```bash
99
- pgai mcp start # Start MCP stdio server exposing list_issues tool
125
+ pgai mcp start # Start MCP stdio server exposing tools
100
126
  ```
101
127
 
102
128
  Cursor configuration example (Settings → MCP):
@@ -117,6 +143,36 @@ Cursor configuration example (Settings → MCP):
117
143
 
118
144
  Tools exposed:
119
145
  - list_issues: returns the same JSON as `pgai issues list`.
146
+ - view_issue: view a single issue with its comments (args: { issue_id, debug? })
147
+ - post_issue_comment: post a comment (args: { issue_id, content, parent_comment_id?, debug? })
148
+
149
+ ### Issues management (`issues` group)
150
+
151
+ ```bash
152
+ pgai issues list # List issues (shows: id, title, status, created_at)
153
+ pgai issues view <issueId> # View issue details and comments
154
+ pgai issues post_comment <issueId> <content> # Post a comment to an issue
155
+ # Options:
156
+ # --parent <uuid> Parent comment ID (for replies)
157
+ # --debug Enable debug output
158
+ # --json Output raw JSON (overrides default YAML)
159
+ ```
160
+
161
+ #### Output format for issues commands
162
+
163
+ By default, issues commands print human-friendly YAML when writing to a terminal. For scripting, you can:
164
+
165
+ - Use `--json` to force JSON output:
166
+
167
+ ```bash
168
+ pgai issues list --json | jq '.[] | {id, title}'
169
+ ```
170
+
171
+ - Rely on auto-detection: when stdout is not a TTY (e.g., piped or redirected), output is JSON automatically:
172
+
173
+ ```bash
174
+ pgai issues view <issueId> > issue.json
175
+ ```
120
176
 
121
177
  #### Grafana management
122
178
  ```bash