pingera-cli 0.1.16__tar.gz → 0.2.0__tar.gz
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.
- {pingera_cli-0.1.16/pingera_cli.egg-info → pingera_cli-0.2.0}/PKG-INFO +84 -22
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/README.md +76 -9
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/__init__.py +1 -1
- pingera_cli-0.2.0/pingera_cli/commands/alert_channels.py +566 -0
- pingera_cli-0.2.0/pingera_cli/commands/alert_common.py +210 -0
- pingera_cli-0.2.0/pingera_cli/commands/alert_rules.py +476 -0
- pingera_cli-0.2.0/pingera_cli/commands/alerts.py +358 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/commands/auth.py +8 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/commands/base.py +100 -38
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/commands/check_groups.py +27 -4
- pingera_cli-0.2.0/pingera_cli/commands/check_metrics.py +360 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/commands/check_secrets.py +14 -4
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/commands/checks.py +120 -26
- pingera_cli-0.2.0/pingera_cli/commands/component_extras.py +161 -0
- pingera_cli-0.2.0/pingera_cli/commands/component_groups.py +291 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/commands/components.py +40 -16
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/commands/execution_groups.py +9 -4
- pingera_cli-0.2.0/pingera_cli/commands/incident_extras.py +238 -0
- pingera_cli-0.2.0/pingera_cli/commands/incident_updates.py +340 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/commands/incidents.py +39 -6
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/commands/on_demand_checks.py +21 -8
- pingera_cli-0.2.0/pingera_cli/commands/page_email_domain.py +152 -0
- pingera_cli-0.2.0/pingera_cli/commands/page_passwords.py +219 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/commands/pages.py +87 -1
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/commands/secrets.py +17 -5
- pingera_cli-0.2.0/pingera_cli/commands/status_page_common.py +153 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/main.py +33 -17
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/utils/config.py +29 -8
- pingera_cli-0.2.0/pingera_cli/utils/time_utils.py +65 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0/pingera_cli.egg-info}/PKG-INFO +84 -22
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli.egg-info/SOURCES.txt +17 -14
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli.egg-info/requires.txt +2 -1
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pyproject.toml +15 -14
- pingera_cli-0.2.0/setup.py +7 -0
- pingera_cli-0.2.0/tests/test_alerts.py +563 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/tests/test_auth.py +43 -26
- pingera_cli-0.2.0/tests/test_check_metrics.py +188 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/tests/test_checks.py +167 -69
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/tests/test_config.py +10 -11
- pingera_cli-0.2.0/tests/test_on_demand_checks.py +381 -0
- pingera_cli-0.2.0/tests/test_status_pages.py +623 -0
- pingera_cli-0.1.16/.gitignore +0 -150
- pingera_cli-0.1.16/.replit +0 -41
- pingera_cli-0.1.16/assert +0 -0
- pingera_cli-0.1.16/docs/cli-commands.md +0 -579
- pingera_cli-0.1.16/docs/example-check.yaml +0 -21
- pingera_cli-0.1.16/docs/example-synthetic-screenshot.json +0 -21
- pingera_cli-0.1.16/docs/example-web-check.json +0 -23
- pingera_cli-0.1.16/pwscript.js +0 -14
- pingera_cli-0.1.16/replit.md +0 -67
- pingera_cli-0.1.16/run_tests.py +0 -45
- pingera_cli-0.1.16/setup.py +0 -74
- pingera_cli-0.1.16/tests/__init__.py +0 -4
- pingera_cli-0.1.16/tests/conftest.py +0 -179
- pingera_cli-0.1.16/tests/requirements.txt +0 -5
- pingera_cli-0.1.16/tests/test_on_demand_checks.py +0 -365
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/LICENSE +0 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/__main__.py +0 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/commands/__init__.py +0 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/formatters/__init__.py +0 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/formatters/base_formatter.py +0 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/formatters/dns_formatter.py +0 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/formatters/generic_formatter.py +0 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/formatters/icmp_formatter.py +0 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/formatters/multistep_formatter.py +0 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/formatters/portscan_formatter.py +0 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/formatters/registry.py +0 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/formatters/ssl_formatter.py +0 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/formatters/synthetic_formatter.py +0 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/formatters/web_formatter.py +0 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/utils/__init__.py +0 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/utils/console.py +0 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli/utils/file_utils.py +0 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli.egg-info/dependency_links.txt +0 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli.egg-info/entry_points.txt +0 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/pingera_cli.egg-info/top_level.txt +0 -0
- {pingera_cli-0.1.16 → pingera_cli-0.2.0}/setup.cfg +0 -0
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pingera-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: A beautiful Python CLI tool built with typer and rich, distributed via pip and based on Pingera SDK
|
|
5
|
-
Home-page: https://github.com/pingera/pingera-cli
|
|
6
|
-
Author: PingeraCLI Team
|
|
7
5
|
Author-email: Pingera Team <privet@pingera.ru>
|
|
8
6
|
Maintainer-email: Pingera Team <privet@pingera.ru>
|
|
9
|
-
License: MIT
|
|
7
|
+
License-Expression: MIT
|
|
10
8
|
Project-URL: Homepage, https://github.com/pingera/pingera-cli
|
|
11
9
|
Project-URL: Documentation, https://docs.pingera.com/cli
|
|
12
10
|
Project-URL: Repository, https://github.com/pingera/pingera-cli
|
|
@@ -15,34 +13,31 @@ Keywords: cli,pingera,network,monitoring,typer,rich,terminal
|
|
|
15
13
|
Classifier: Development Status :: 3 - Alpha
|
|
16
14
|
Classifier: Intended Audience :: Developers
|
|
17
15
|
Classifier: Intended Audience :: System Administrators
|
|
18
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
19
16
|
Classifier: Operating System :: OS Independent
|
|
20
17
|
Classifier: Programming Language :: Python :: 3
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
22
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
23
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
24
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
25
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
26
23
|
Classifier: Topic :: System :: Networking
|
|
27
24
|
Classifier: Topic :: Utilities
|
|
28
25
|
Classifier: Environment :: Console
|
|
29
|
-
Requires-Python: >=3.
|
|
26
|
+
Requires-Python: >=3.10
|
|
30
27
|
Description-Content-Type: text/markdown
|
|
31
28
|
License-File: LICENSE
|
|
32
29
|
Requires-Dist: typer[all]>=0.9.0
|
|
33
30
|
Requires-Dist: rich>=13.0.0
|
|
34
|
-
Requires-Dist: pingera-sdk
|
|
31
|
+
Requires-Dist: pingera-sdk<2,>=1.2.0
|
|
35
32
|
Requires-Dist: click>=8.0.0
|
|
33
|
+
Requires-Dist: pyyaml>=6.0
|
|
36
34
|
Provides-Extra: dev
|
|
37
35
|
Requires-Dist: pytest>=6.0; extra == "dev"
|
|
38
36
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
39
37
|
Requires-Dist: black; extra == "dev"
|
|
40
38
|
Requires-Dist: flake8; extra == "dev"
|
|
41
39
|
Requires-Dist: mypy; extra == "dev"
|
|
42
|
-
Dynamic: author
|
|
43
|
-
Dynamic: home-page
|
|
44
40
|
Dynamic: license-file
|
|
45
|
-
Dynamic: requires-python
|
|
46
41
|
|
|
47
42
|
# Pingera Platform CLI 🚀
|
|
48
43
|
|
|
@@ -56,7 +51,7 @@ A beautiful Python CLI tool for the [Pingera Platform](https://pingera.ru) - bui
|
|
|
56
51
|
|
|
57
52
|
- **Beautiful Terminal Output**: Powered by Rich library for colorful, formatted output
|
|
58
53
|
- **Modern CLI Interface**: Built with Typer for intuitive command-line interactions
|
|
59
|
-
- **Pingera Platform Integration**:
|
|
54
|
+
- **Pingera Platform Integration**: Manage checks, uptime and performance analytics, alert rules and channels, and status pages (components, incidents, maintenance, postmortems) through the Pingera SDK
|
|
60
55
|
- **Cross-Platform**: Works on Windows, macOS, and Linux
|
|
61
56
|
- **Easy Installation**: Simple pip install with all dependencies managed
|
|
62
57
|
- **Configuration Management**: Flexible configuration with environment variables and config files
|
|
@@ -64,12 +59,14 @@ A beautiful Python CLI tool for the [Pingera Platform](https://pingera.ru) - bui
|
|
|
64
59
|
|
|
65
60
|
## 🚀 Installation
|
|
66
61
|
|
|
67
|
-
Install Pingera Platform CLI using pip:
|
|
62
|
+
Install Pingera Platform CLI using pip (requires Python 3.10+):
|
|
68
63
|
|
|
69
64
|
```bash
|
|
70
65
|
pip install pingera-cli
|
|
71
66
|
```
|
|
72
67
|
|
|
68
|
+
The CLI is built on [pingera-sdk](https://pypi.org/project/pingera-sdk/) 1.2+, which is installed automatically.
|
|
69
|
+
|
|
73
70
|
## 🔐 Authentication
|
|
74
71
|
|
|
75
72
|
Before using the CLI, you need to authenticate with the Pingera Platform:
|
|
@@ -110,11 +107,33 @@ pngr checks create \
|
|
|
110
107
|
--interval 300
|
|
111
108
|
```
|
|
112
109
|
|
|
110
|
+
### Schedule a check with cron
|
|
111
|
+
```bash
|
|
112
|
+
# Run on weekdays at 09:00 instead of a fixed interval
|
|
113
|
+
pngr checks create --name "Morning check" --type web --url https://example.com --cron "0 9 * * 1-5"
|
|
114
|
+
|
|
115
|
+
# Switch an existing check between cron and interval scheduling
|
|
116
|
+
pngr checks update <check-id> --cron "*/15 * * * *"
|
|
117
|
+
pngr checks update <check-id> --interval 300
|
|
118
|
+
```
|
|
119
|
+
|
|
113
120
|
### Get check results
|
|
114
121
|
```bash
|
|
115
122
|
pngr checks results <check-id>
|
|
116
123
|
```
|
|
117
124
|
|
|
125
|
+
### Uptime and performance
|
|
126
|
+
```bash
|
|
127
|
+
# Uptime over the last 7 days, with hour-by-hour detail
|
|
128
|
+
pngr checks uptime <check-id> --from 7d --hourly
|
|
129
|
+
|
|
130
|
+
# p95/p99 response times per region
|
|
131
|
+
pngr checks response-times <check-id> --from 24h
|
|
132
|
+
|
|
133
|
+
# Success rate per region across all checks
|
|
134
|
+
pngr checks stats --from 7d
|
|
135
|
+
```
|
|
136
|
+
|
|
118
137
|
### Run an on-demand check
|
|
119
138
|
```bash
|
|
120
139
|
pngr checks run custom \
|
|
@@ -141,6 +160,32 @@ pngr checks assign-group check_123 --group-id group_456
|
|
|
141
160
|
pngr checks assign-group check_123 --group-id null
|
|
142
161
|
```
|
|
143
162
|
|
|
163
|
+
### Alerts
|
|
164
|
+
```bash
|
|
165
|
+
# Create a notification channel and a rule that alerts after 3 consecutive failures
|
|
166
|
+
pngr alerts channels create --name "On-call" --email oncall@example.com
|
|
167
|
+
pngr alerts rules create --name "API down" --check <check-id> --count 3 --channel <channel-id>
|
|
168
|
+
|
|
169
|
+
# See what is firing and acknowledge it
|
|
170
|
+
pngr alerts list --status firing
|
|
171
|
+
pngr alerts ack <alert-id>
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Status pages
|
|
175
|
+
```bash
|
|
176
|
+
# Post an incident and follow-up updates
|
|
177
|
+
pngr pages incidents create --page-id <page-id> --name "API errors" --status investigating --impact major
|
|
178
|
+
pngr pages incidents updates add <incident-id> --page-id <page-id> --status resolved --body "Fixed"
|
|
179
|
+
|
|
180
|
+
# Schedule maintenance
|
|
181
|
+
pngr pages incidents schedule-maintenance --page-id <page-id> --name "DB upgrade" --start +24h --end +26h
|
|
182
|
+
|
|
183
|
+
# Component uptime for the whole page
|
|
184
|
+
pngr pages components uptime-report --page-id <page-id> --from 2026-01-01
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
See [docs/cli-commands.md](docs/cli-commands.md) for the full command reference.
|
|
188
|
+
|
|
144
189
|
### Secrets Management
|
|
145
190
|
|
|
146
191
|
```bash
|
|
@@ -169,14 +214,17 @@ pngr checks list-regions --check-type web
|
|
|
169
214
|
|
|
170
215
|
## 🔧 Configuration
|
|
171
216
|
|
|
172
|
-
The CLI stores configuration in `~/.config/pingera-cli/config.json
|
|
217
|
+
The CLI stores configuration in `~/.config/pingera-cli/config.json` (or `$XDG_CONFIG_HOME/pingera-cli/config.json`). You can manage settings with:
|
|
173
218
|
|
|
174
219
|
```bash
|
|
175
220
|
# Show current configuration
|
|
176
|
-
pngr config show
|
|
221
|
+
pngr config --show
|
|
222
|
+
|
|
223
|
+
# Set the default output format
|
|
224
|
+
pngr config --output-format json
|
|
177
225
|
|
|
178
|
-
#
|
|
179
|
-
pngr config
|
|
226
|
+
# Point the CLI at a different API endpoint
|
|
227
|
+
pngr config --base-url https://api.pingera.ru
|
|
180
228
|
```
|
|
181
229
|
|
|
182
230
|
## 📊 Output Formats
|
|
@@ -187,14 +235,18 @@ The CLI supports multiple output formats:
|
|
|
187
235
|
- **json**: JSON format for scripting
|
|
188
236
|
- **yaml**: YAML format
|
|
189
237
|
|
|
238
|
+
`--output`/`-o` is a global option, so it goes before the command. It applies to that invocation only; use `pngr config --output-format` to change the default.
|
|
239
|
+
|
|
190
240
|
```bash
|
|
191
241
|
# JSON output
|
|
192
|
-
pngr checks list
|
|
242
|
+
pngr -o json checks list
|
|
193
243
|
|
|
194
|
-
# YAML output
|
|
195
|
-
pngr checks list
|
|
244
|
+
# YAML output
|
|
245
|
+
pngr -o yaml checks list
|
|
196
246
|
```
|
|
197
247
|
|
|
248
|
+
In `json`/`yaml` mode, stdout contains only the data, and status messages go to stderr, so output can be piped safely (for example, `pngr -o json checks list | jq '.checks[].id'`).
|
|
249
|
+
|
|
198
250
|
## 🌐 Platform Links
|
|
199
251
|
|
|
200
252
|
- **Pingera Platform**: [https://pingera.ru](https://pingera.ru)
|
|
@@ -218,6 +270,16 @@ pngr --help
|
|
|
218
270
|
python -m pytest tests/
|
|
219
271
|
```
|
|
220
272
|
|
|
273
|
+
### Releasing
|
|
274
|
+
|
|
275
|
+
Bump `__version__` in `pingera_cli/__init__.py`, merge to `main`, then push a matching tag:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
git tag v0.2.0 && git push origin v0.2.0
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
The [release workflow](.github/workflows/release.yml) runs the tests, builds the package, publishes it to PyPI (Trusted Publishing) and creates a GitHub release.
|
|
282
|
+
|
|
221
283
|
## 📝 License
|
|
222
284
|
|
|
223
285
|
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
@@ -10,7 +10,7 @@ A beautiful Python CLI tool for the [Pingera Platform](https://pingera.ru) - bui
|
|
|
10
10
|
|
|
11
11
|
- **Beautiful Terminal Output**: Powered by Rich library for colorful, formatted output
|
|
12
12
|
- **Modern CLI Interface**: Built with Typer for intuitive command-line interactions
|
|
13
|
-
- **Pingera Platform Integration**:
|
|
13
|
+
- **Pingera Platform Integration**: Manage checks, uptime and performance analytics, alert rules and channels, and status pages (components, incidents, maintenance, postmortems) through the Pingera SDK
|
|
14
14
|
- **Cross-Platform**: Works on Windows, macOS, and Linux
|
|
15
15
|
- **Easy Installation**: Simple pip install with all dependencies managed
|
|
16
16
|
- **Configuration Management**: Flexible configuration with environment variables and config files
|
|
@@ -18,12 +18,14 @@ A beautiful Python CLI tool for the [Pingera Platform](https://pingera.ru) - bui
|
|
|
18
18
|
|
|
19
19
|
## 🚀 Installation
|
|
20
20
|
|
|
21
|
-
Install Pingera Platform CLI using pip:
|
|
21
|
+
Install Pingera Platform CLI using pip (requires Python 3.10+):
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
24
|
pip install pingera-cli
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
+
The CLI is built on [pingera-sdk](https://pypi.org/project/pingera-sdk/) 1.2+, which is installed automatically.
|
|
28
|
+
|
|
27
29
|
## 🔐 Authentication
|
|
28
30
|
|
|
29
31
|
Before using the CLI, you need to authenticate with the Pingera Platform:
|
|
@@ -64,11 +66,33 @@ pngr checks create \
|
|
|
64
66
|
--interval 300
|
|
65
67
|
```
|
|
66
68
|
|
|
69
|
+
### Schedule a check with cron
|
|
70
|
+
```bash
|
|
71
|
+
# Run on weekdays at 09:00 instead of a fixed interval
|
|
72
|
+
pngr checks create --name "Morning check" --type web --url https://example.com --cron "0 9 * * 1-5"
|
|
73
|
+
|
|
74
|
+
# Switch an existing check between cron and interval scheduling
|
|
75
|
+
pngr checks update <check-id> --cron "*/15 * * * *"
|
|
76
|
+
pngr checks update <check-id> --interval 300
|
|
77
|
+
```
|
|
78
|
+
|
|
67
79
|
### Get check results
|
|
68
80
|
```bash
|
|
69
81
|
pngr checks results <check-id>
|
|
70
82
|
```
|
|
71
83
|
|
|
84
|
+
### Uptime and performance
|
|
85
|
+
```bash
|
|
86
|
+
# Uptime over the last 7 days, with hour-by-hour detail
|
|
87
|
+
pngr checks uptime <check-id> --from 7d --hourly
|
|
88
|
+
|
|
89
|
+
# p95/p99 response times per region
|
|
90
|
+
pngr checks response-times <check-id> --from 24h
|
|
91
|
+
|
|
92
|
+
# Success rate per region across all checks
|
|
93
|
+
pngr checks stats --from 7d
|
|
94
|
+
```
|
|
95
|
+
|
|
72
96
|
### Run an on-demand check
|
|
73
97
|
```bash
|
|
74
98
|
pngr checks run custom \
|
|
@@ -95,6 +119,32 @@ pngr checks assign-group check_123 --group-id group_456
|
|
|
95
119
|
pngr checks assign-group check_123 --group-id null
|
|
96
120
|
```
|
|
97
121
|
|
|
122
|
+
### Alerts
|
|
123
|
+
```bash
|
|
124
|
+
# Create a notification channel and a rule that alerts after 3 consecutive failures
|
|
125
|
+
pngr alerts channels create --name "On-call" --email oncall@example.com
|
|
126
|
+
pngr alerts rules create --name "API down" --check <check-id> --count 3 --channel <channel-id>
|
|
127
|
+
|
|
128
|
+
# See what is firing and acknowledge it
|
|
129
|
+
pngr alerts list --status firing
|
|
130
|
+
pngr alerts ack <alert-id>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Status pages
|
|
134
|
+
```bash
|
|
135
|
+
# Post an incident and follow-up updates
|
|
136
|
+
pngr pages incidents create --page-id <page-id> --name "API errors" --status investigating --impact major
|
|
137
|
+
pngr pages incidents updates add <incident-id> --page-id <page-id> --status resolved --body "Fixed"
|
|
138
|
+
|
|
139
|
+
# Schedule maintenance
|
|
140
|
+
pngr pages incidents schedule-maintenance --page-id <page-id> --name "DB upgrade" --start +24h --end +26h
|
|
141
|
+
|
|
142
|
+
# Component uptime for the whole page
|
|
143
|
+
pngr pages components uptime-report --page-id <page-id> --from 2026-01-01
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
See [docs/cli-commands.md](docs/cli-commands.md) for the full command reference.
|
|
147
|
+
|
|
98
148
|
### Secrets Management
|
|
99
149
|
|
|
100
150
|
```bash
|
|
@@ -123,14 +173,17 @@ pngr checks list-regions --check-type web
|
|
|
123
173
|
|
|
124
174
|
## 🔧 Configuration
|
|
125
175
|
|
|
126
|
-
The CLI stores configuration in `~/.config/pingera-cli/config.json
|
|
176
|
+
The CLI stores configuration in `~/.config/pingera-cli/config.json` (or `$XDG_CONFIG_HOME/pingera-cli/config.json`). You can manage settings with:
|
|
127
177
|
|
|
128
178
|
```bash
|
|
129
179
|
# Show current configuration
|
|
130
|
-
pngr config show
|
|
180
|
+
pngr config --show
|
|
181
|
+
|
|
182
|
+
# Set the default output format
|
|
183
|
+
pngr config --output-format json
|
|
131
184
|
|
|
132
|
-
#
|
|
133
|
-
pngr config
|
|
185
|
+
# Point the CLI at a different API endpoint
|
|
186
|
+
pngr config --base-url https://api.pingera.ru
|
|
134
187
|
```
|
|
135
188
|
|
|
136
189
|
## 📊 Output Formats
|
|
@@ -141,14 +194,18 @@ The CLI supports multiple output formats:
|
|
|
141
194
|
- **json**: JSON format for scripting
|
|
142
195
|
- **yaml**: YAML format
|
|
143
196
|
|
|
197
|
+
`--output`/`-o` is a global option, so it goes before the command. It applies to that invocation only; use `pngr config --output-format` to change the default.
|
|
198
|
+
|
|
144
199
|
```bash
|
|
145
200
|
# JSON output
|
|
146
|
-
pngr checks list
|
|
201
|
+
pngr -o json checks list
|
|
147
202
|
|
|
148
|
-
# YAML output
|
|
149
|
-
pngr checks list
|
|
203
|
+
# YAML output
|
|
204
|
+
pngr -o yaml checks list
|
|
150
205
|
```
|
|
151
206
|
|
|
207
|
+
In `json`/`yaml` mode, stdout contains only the data, and status messages go to stderr, so output can be piped safely (for example, `pngr -o json checks list | jq '.checks[].id'`).
|
|
208
|
+
|
|
152
209
|
## 🌐 Platform Links
|
|
153
210
|
|
|
154
211
|
- **Pingera Platform**: [https://pingera.ru](https://pingera.ru)
|
|
@@ -172,6 +229,16 @@ pngr --help
|
|
|
172
229
|
python -m pytest tests/
|
|
173
230
|
```
|
|
174
231
|
|
|
232
|
+
### Releasing
|
|
233
|
+
|
|
234
|
+
Bump `__version__` in `pingera_cli/__init__.py`, merge to `main`, then push a matching tag:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
git tag v0.2.0 && git push origin v0.2.0
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
The [release workflow](.github/workflows/release.yml) runs the tests, builds the package, publishes it to PyPI (Trusted Publishing) and creates a GitHub release.
|
|
241
|
+
|
|
175
242
|
## 📝 License
|
|
176
243
|
|
|
177
244
|
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Pingera CLI - A beautiful CLI tool for Pingera Platform
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
-
__version__ = "0.
|
|
5
|
+
__version__ = "0.2.0"
|
|
6
6
|
__author__ = "Pingera Team"
|
|
7
7
|
__description__ = "A beautiful Python CLI tool built with typer and rich, distributed via pip and based on Pingera SDK"
|
|
8
8
|
|