postgresai 0.11.0-alpha.9 → 0.12.0-alpha.13

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
@@ -47,7 +47,7 @@ This will:
47
47
 
48
48
  Start monitoring with demo database:
49
49
  ```bash
50
- postgres-ai quickstart --demo
50
+ postgres-ai mon quickstart --demo
51
51
  ```
52
52
 
53
53
  This will:
@@ -57,27 +57,66 @@ This will:
57
57
 
58
58
  ## Commands
59
59
 
60
- ### Monitoring services
60
+ ### Monitoring services management (`mon` group)
61
+
62
+ #### Service lifecycle
63
+ ```bash
64
+ postgres-ai mon quickstart [--demo] # Complete setup (generate config, start services)
65
+ postgres-ai mon start # Start monitoring services
66
+ postgres-ai mon stop # Stop monitoring services
67
+ postgres-ai mon restart [service] # Restart all or specific monitoring service
68
+ postgres-ai mon status # Show monitoring services status
69
+ postgres-ai mon health [--wait <sec>] # Check monitoring services health
70
+ ```
71
+
72
+ #### Monitoring target databases (`mon targets` subgroup)
73
+ ```bash
74
+ postgres-ai mon targets list # List databases to monitor
75
+ postgres-ai mon targets add <conn-string> <name> # Add database to monitor
76
+ postgres-ai mon targets remove <name> # Remove monitoring target
77
+ postgres-ai mon targets test <name> # Test target connectivity
78
+ ```
79
+
80
+ #### Configuration and maintenance
61
81
  ```bash
62
- postgres-ai start # Start all services
63
- postgres-ai stop # Stop all services
64
- postgres-ai restart # Restart all services
65
- postgres-ai status # Show service status
66
- postgres-ai logs [service] # Show logs
82
+ postgres-ai mon config # Show monitoring configuration
83
+ postgres-ai mon update-config # Apply configuration changes
84
+ postgres-ai mon update # Update monitoring stack
85
+ postgres-ai mon reset [service] # Reset service data
86
+ postgres-ai mon clean # Cleanup artifacts
87
+ postgres-ai mon check # System readiness check
88
+ postgres-ai mon shell <service> # Open shell to monitoring service
67
89
  ```
68
90
 
69
- ### Instance management
91
+ ### MCP server (`mcp` group)
92
+
70
93
  ```bash
71
- postgres-ai list-instances # List configured instances
72
- postgres-ai add-instance <conn-string> <name> # Add new instance
73
- postgres-ai remove-instance <name> # Remove instance
74
- postgres-ai update-config # Regenerate config files
94
+ pgai mcp start # Start MCP stdio server exposing list_issues tool
95
+ ```
96
+
97
+ Cursor configuration example (Settings → MCP):
98
+
99
+ ```json
100
+ {
101
+ "mcpServers": {
102
+ "PostgresAI": {
103
+ "command": "pgai",
104
+ "args": ["mcp", "start"],
105
+ "env": {
106
+ "PGAI_API_BASE_URL": "https://postgres.ai/api/general/"
107
+ }
108
+ }
109
+ }
110
+ }
75
111
  ```
76
112
 
77
- ### Configuration
113
+ Tools exposed:
114
+ - list_issues: returns the same JSON as `pgai issues list`.
115
+
116
+ #### Grafana management
78
117
  ```bash
79
- postgres-ai config # Show current configuration
80
- postgres-ai check # Verify prerequisites
118
+ postgres-ai mon generate-grafana-password # Generate new Grafana password
119
+ postgres-ai mon show-grafana-credentials # Show Grafana credentials
81
120
  ```
82
121
 
83
122
  ### Authentication and API key management
@@ -103,6 +142,20 @@ API key resolution order:
103
142
  3. User config file (`~/.config/postgresai/config.json`)
104
143
  4. Legacy project config (`.pgwatch-config`)
105
144
 
145
+ Base URL resolution order:
146
+ - API base URL (`apiBaseUrl`):
147
+ 1. Command line option (`--api-base-url`)
148
+ 2. Environment variable (`PGAI_API_BASE_URL`)
149
+ 3. User config file `baseUrl` (`~/.config/postgresai/config.json`)
150
+ 4. Default: `https://postgres.ai/api/general/`
151
+ - UI base URL (`uiBaseUrl`):
152
+ 1. Command line option (`--ui-base-url`)
153
+ 2. Environment variable (`PGAI_UI_BASE_URL`)
154
+ 3. Default: `https://console.postgres.ai`
155
+
156
+ Normalization:
157
+ - A single trailing `/` is removed to ensure consistent path joining.
158
+
106
159
  ### Environment variables
107
160
 
108
161
  - `PGAI_API_KEY` - API key for PostgresAI services