pingera-cli 0.1.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.0/.gitignore +150 -0
- pingera_cli-0.1.0/.replit +41 -0
- pingera_cli-0.1.0/LICENSE +22 -0
- pingera_cli-0.1.0/PKG-INFO +199 -0
- pingera_cli-0.1.0/README.md +153 -0
- pingera_cli-0.1.0/assert +0 -0
- pingera_cli-0.1.0/docs/cli-commands.md +401 -0
- pingera_cli-0.1.0/pingera_cli/__init__.py +11 -0
- pingera_cli-0.1.0/pingera_cli/__main__.py +9 -0
- pingera_cli-0.1.0/pingera_cli/commands/__init__.py +11 -0
- pingera_cli-0.1.0/pingera_cli/commands/auth.py +214 -0
- pingera_cli-0.1.0/pingera_cli/commands/base.py +251 -0
- pingera_cli-0.1.0/pingera_cli/commands/checks.py +1011 -0
- pingera_cli-0.1.0/pingera_cli/commands/on_demand_checks.py +646 -0
- pingera_cli-0.1.0/pingera_cli/formatters/__init__.py +13 -0
- pingera_cli-0.1.0/pingera_cli/formatters/base_formatter.py +45 -0
- pingera_cli-0.1.0/pingera_cli/formatters/generic_formatter.py +51 -0
- pingera_cli-0.1.0/pingera_cli/formatters/multistep_formatter.py +141 -0
- pingera_cli-0.1.0/pingera_cli/formatters/registry.py +35 -0
- pingera_cli-0.1.0/pingera_cli/formatters/ssl_formatter.py +104 -0
- pingera_cli-0.1.0/pingera_cli/formatters/synthetic_formatter.py +350 -0
- pingera_cli-0.1.0/pingera_cli/formatters/web_formatter.py +78 -0
- pingera_cli-0.1.0/pingera_cli/main.py +214 -0
- pingera_cli-0.1.0/pingera_cli/utils/__init__.py +8 -0
- pingera_cli-0.1.0/pingera_cli/utils/config.py +187 -0
- pingera_cli-0.1.0/pingera_cli/utils/console.py +87 -0
- pingera_cli-0.1.0/pingera_cli.egg-info/PKG-INFO +199 -0
- pingera_cli-0.1.0/pingera_cli.egg-info/SOURCES.txt +42 -0
- pingera_cli-0.1.0/pingera_cli.egg-info/dependency_links.txt +1 -0
- pingera_cli-0.1.0/pingera_cli.egg-info/entry_points.txt +2 -0
- pingera_cli-0.1.0/pingera_cli.egg-info/requires.txt +11 -0
- pingera_cli-0.1.0/pingera_cli.egg-info/top_level.txt +1 -0
- pingera_cli-0.1.0/pyproject.toml +112 -0
- pingera_cli-0.1.0/replit.md +67 -0
- pingera_cli-0.1.0/run_tests.py +45 -0
- pingera_cli-0.1.0/setup.cfg +4 -0
- pingera_cli-0.1.0/setup.py +74 -0
- pingera_cli-0.1.0/tests/__init__.py +4 -0
- pingera_cli-0.1.0/tests/conftest.py +179 -0
- pingera_cli-0.1.0/tests/requirements.txt +5 -0
- pingera_cli-0.1.0/tests/test_auth.py +231 -0
- pingera_cli-0.1.0/tests/test_checks.py +364 -0
- pingera_cli-0.1.0/tests/test_config.py +296 -0
- pingera_cli-0.1.0/tests/test_on_demand_checks.py +368 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
|
|
2
|
+
# Byte-compiled / optimized / DLL files
|
|
3
|
+
__pycache__/
|
|
4
|
+
*.py[cod]
|
|
5
|
+
*$py.class
|
|
6
|
+
|
|
7
|
+
# C extensions
|
|
8
|
+
*.so
|
|
9
|
+
|
|
10
|
+
# Distribution / packaging
|
|
11
|
+
.Python
|
|
12
|
+
build/
|
|
13
|
+
develop-eggs/
|
|
14
|
+
dist/
|
|
15
|
+
downloads/
|
|
16
|
+
eggs/
|
|
17
|
+
.eggs/
|
|
18
|
+
lib/
|
|
19
|
+
lib64/
|
|
20
|
+
parts/
|
|
21
|
+
sdist/
|
|
22
|
+
var/
|
|
23
|
+
wheels/
|
|
24
|
+
pip-wheel-metadata/
|
|
25
|
+
share/python-wheels/
|
|
26
|
+
*.egg-info/
|
|
27
|
+
.installed.cfg
|
|
28
|
+
*.egg
|
|
29
|
+
MANIFEST
|
|
30
|
+
|
|
31
|
+
# PyInstaller
|
|
32
|
+
# Usually these files are written by a python script from a template
|
|
33
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
34
|
+
*.manifest
|
|
35
|
+
*.spec
|
|
36
|
+
|
|
37
|
+
# Installer logs
|
|
38
|
+
pip-log.txt
|
|
39
|
+
pip-delete-this-directory.txt
|
|
40
|
+
|
|
41
|
+
# Unit test / coverage reports
|
|
42
|
+
htmlcov/
|
|
43
|
+
.tox/
|
|
44
|
+
.nox/
|
|
45
|
+
.coverage
|
|
46
|
+
.coverage.*
|
|
47
|
+
.cache
|
|
48
|
+
nosetests.xml
|
|
49
|
+
coverage.xml
|
|
50
|
+
*.cover
|
|
51
|
+
*.py,cover
|
|
52
|
+
.hypothesis/
|
|
53
|
+
.pytest_cache/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
.python-version
|
|
87
|
+
|
|
88
|
+
# pipenv
|
|
89
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
90
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
91
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
92
|
+
# install all needed dependencies.
|
|
93
|
+
#Pipfile.lock
|
|
94
|
+
|
|
95
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
96
|
+
__pypackages__/
|
|
97
|
+
|
|
98
|
+
# Celery stuff
|
|
99
|
+
celerybeat-schedule
|
|
100
|
+
celerybeat.pid
|
|
101
|
+
|
|
102
|
+
# SageMath parsed files
|
|
103
|
+
*.sage.py
|
|
104
|
+
|
|
105
|
+
# Environments
|
|
106
|
+
.env
|
|
107
|
+
.venv
|
|
108
|
+
env/
|
|
109
|
+
venv/
|
|
110
|
+
ENV/
|
|
111
|
+
env.bak/
|
|
112
|
+
venv.bak/
|
|
113
|
+
|
|
114
|
+
# Spyder project settings
|
|
115
|
+
.spyderproject
|
|
116
|
+
.spyproject
|
|
117
|
+
|
|
118
|
+
# Rope project settings
|
|
119
|
+
.ropeproject
|
|
120
|
+
|
|
121
|
+
# mkdocs documentation
|
|
122
|
+
/site
|
|
123
|
+
|
|
124
|
+
# mypy
|
|
125
|
+
.mypy_cache/
|
|
126
|
+
.dmypy.json
|
|
127
|
+
dmypy.json
|
|
128
|
+
|
|
129
|
+
# Pyre type checker
|
|
130
|
+
.pyre/
|
|
131
|
+
|
|
132
|
+
# Project-specific exclusions
|
|
133
|
+
attached_assets/
|
|
134
|
+
.config/
|
|
135
|
+
|
|
136
|
+
# IDE files
|
|
137
|
+
.vscode/
|
|
138
|
+
.idea/
|
|
139
|
+
*.swp
|
|
140
|
+
*.swo
|
|
141
|
+
*~
|
|
142
|
+
|
|
143
|
+
# OS files
|
|
144
|
+
.DS_Store
|
|
145
|
+
.DS_Store?
|
|
146
|
+
._*
|
|
147
|
+
.Spotlight-V100
|
|
148
|
+
.Trashes
|
|
149
|
+
ehthumbs.db
|
|
150
|
+
Thumbs.db
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
modules = ["python-3.11"]
|
|
2
|
+
[agent]
|
|
3
|
+
expertMode = true
|
|
4
|
+
|
|
5
|
+
[nix]
|
|
6
|
+
channel = "stable-25_05"
|
|
7
|
+
|
|
8
|
+
[workflows]
|
|
9
|
+
runButton = "Project"
|
|
10
|
+
|
|
11
|
+
[[workflows.workflow]]
|
|
12
|
+
name = "Project"
|
|
13
|
+
mode = "parallel"
|
|
14
|
+
author = "agent"
|
|
15
|
+
|
|
16
|
+
[[workflows.workflow.tasks]]
|
|
17
|
+
task = "workflow.run"
|
|
18
|
+
args = "PingeraCLI"
|
|
19
|
+
|
|
20
|
+
[[workflows.workflow.tasks]]
|
|
21
|
+
task = "workflow.run"
|
|
22
|
+
args = "test_cli"
|
|
23
|
+
|
|
24
|
+
[[workflows.workflow]]
|
|
25
|
+
name = "PingeraCLI"
|
|
26
|
+
author = "agent"
|
|
27
|
+
|
|
28
|
+
[[workflows.workflow.tasks]]
|
|
29
|
+
task = "shell.exec"
|
|
30
|
+
args = "pip install -e . && python -m pingera_cli.main --help"
|
|
31
|
+
|
|
32
|
+
[workflows.workflow.metadata]
|
|
33
|
+
outputType = "console"
|
|
34
|
+
|
|
35
|
+
[[workflows.workflow]]
|
|
36
|
+
name = "test_cli"
|
|
37
|
+
author = "agent"
|
|
38
|
+
|
|
39
|
+
[[workflows.workflow.tasks]]
|
|
40
|
+
task = "shell.exec"
|
|
41
|
+
args = "pip install typer rich click && python -m pingera_cli.main --help"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
MIT License
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2025 Pingera Team
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pingera-cli
|
|
3
|
+
Version: 0.1.0
|
|
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
|
+
Author-email: Pingera Team <privet@pingera.ru>
|
|
8
|
+
Maintainer-email: Pingera Team <privet@pingera.ru>
|
|
9
|
+
License: MIT
|
|
10
|
+
Project-URL: Homepage, https://github.com/pingera/pingera-cli
|
|
11
|
+
Project-URL: Documentation, https://docs.pingera.com/cli
|
|
12
|
+
Project-URL: Repository, https://github.com/pingera/pingera-cli
|
|
13
|
+
Project-URL: Bug Tracker, https://github.com/pingera/pingera-cli/issues
|
|
14
|
+
Keywords: cli,pingera,network,monitoring,typer,rich,terminal
|
|
15
|
+
Classifier: Development Status :: 3 - Alpha
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Intended Audience :: System Administrators
|
|
18
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
19
|
+
Classifier: Operating System :: OS Independent
|
|
20
|
+
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
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
26
|
+
Classifier: Topic :: System :: Networking
|
|
27
|
+
Classifier: Topic :: Utilities
|
|
28
|
+
Classifier: Environment :: Console
|
|
29
|
+
Requires-Python: >=3.7
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
License-File: LICENSE
|
|
32
|
+
Requires-Dist: typer[all]>=0.9.0
|
|
33
|
+
Requires-Dist: rich>=13.0.0
|
|
34
|
+
Requires-Dist: pingera-sdk
|
|
35
|
+
Requires-Dist: click>=8.0.0
|
|
36
|
+
Provides-Extra: dev
|
|
37
|
+
Requires-Dist: pytest>=6.0; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
39
|
+
Requires-Dist: black; extra == "dev"
|
|
40
|
+
Requires-Dist: flake8; extra == "dev"
|
|
41
|
+
Requires-Dist: mypy; extra == "dev"
|
|
42
|
+
Dynamic: author
|
|
43
|
+
Dynamic: home-page
|
|
44
|
+
Dynamic: license-file
|
|
45
|
+
Dynamic: requires-python
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
# Pingera Platform CLI 🚀
|
|
49
|
+
|
|
50
|
+
A beautiful Python CLI tool for the [Pingera Platform](https://pingera.ru) - built with typer and rich, distributed via pip and based on Pingera SDK.
|
|
51
|
+
|
|
52
|
+
[](https://badge.fury.io/py/pingera-cli)
|
|
53
|
+
[](https://pypi.org/project/pingera-cli/)
|
|
54
|
+
[](https://opensource.org/licenses/MIT)
|
|
55
|
+
|
|
56
|
+
## ✨ Features
|
|
57
|
+
|
|
58
|
+
- **Beautiful Terminal Output**: Powered by Rich library for colorful, formatted output
|
|
59
|
+
- **Modern CLI Interface**: Built with Typer for intuitive command-line interactions
|
|
60
|
+
- **Pingera Platform Integration**: Seamlessly integrates with Pingera SDK for network monitoring
|
|
61
|
+
- **Cross-Platform**: Works on Windows, macOS, and Linux
|
|
62
|
+
- **Easy Installation**: Simple pip install with all dependencies managed
|
|
63
|
+
- **Configuration Management**: Flexible configuration with environment variables and config files
|
|
64
|
+
|
|
65
|
+
## 🚀 Installation
|
|
66
|
+
|
|
67
|
+
Install Pingera Platform CLI using pip:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
pip install pingera-cli
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## 🔐 Authentication
|
|
74
|
+
|
|
75
|
+
Before using the CLI, you need to authenticate with the Pingera Platform:
|
|
76
|
+
|
|
77
|
+
1. **Get your API key**: Visit [app.pingera.ru](https://app.pingera.ru) and create an API token in your account settings
|
|
78
|
+
2. **Login to the CLI**:
|
|
79
|
+
```bash
|
|
80
|
+
pngr auth login --api-key your-api-key-here
|
|
81
|
+
```
|
|
82
|
+
3. **Verify authentication**:
|
|
83
|
+
```bash
|
|
84
|
+
pngr auth status
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Alternatively, you can set the API key as an environment variable:
|
|
88
|
+
```bash
|
|
89
|
+
export PINGERA_API_KEY=your-api-key-here
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## 📖 Basic Usage
|
|
93
|
+
|
|
94
|
+
### List all monitoring checks
|
|
95
|
+
```bash
|
|
96
|
+
pngr checks list
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Get details of a specific check
|
|
100
|
+
```bash
|
|
101
|
+
pngr checks get <check-id>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Create a new web check
|
|
105
|
+
```bash
|
|
106
|
+
pngr checks create \
|
|
107
|
+
--name "My Website" \
|
|
108
|
+
--type web \
|
|
109
|
+
--url https://example.com \
|
|
110
|
+
--interval 300
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Get check results
|
|
114
|
+
```bash
|
|
115
|
+
pngr checks results <check-id>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Run an on-demand check
|
|
119
|
+
```bash
|
|
120
|
+
pngr checks run custom \
|
|
121
|
+
--type web \
|
|
122
|
+
--url https://example.com \
|
|
123
|
+
--name "Quick Test"
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### List available regions
|
|
127
|
+
```bash
|
|
128
|
+
pngr checks list-regions
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Filter regions by check type
|
|
132
|
+
```bash
|
|
133
|
+
pngr checks list-regions --check-type web
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## 🔧 Configuration
|
|
137
|
+
|
|
138
|
+
The CLI stores configuration in `~/.config/pingera-cli/config.json`. You can manage settings with:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# Show current configuration
|
|
142
|
+
pngr config show
|
|
143
|
+
|
|
144
|
+
# Set default output format
|
|
145
|
+
pngr config set output_format json
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## 📊 Output Formats
|
|
149
|
+
|
|
150
|
+
The CLI supports multiple output formats:
|
|
151
|
+
|
|
152
|
+
- **table** (default): Human-readable tables
|
|
153
|
+
- **json**: JSON format for scripting
|
|
154
|
+
- **yaml**: YAML format
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
# JSON output
|
|
158
|
+
pngr checks list --output json
|
|
159
|
+
|
|
160
|
+
# YAML output
|
|
161
|
+
pngr checks list --output yaml
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## 🌐 Platform Links
|
|
165
|
+
|
|
166
|
+
- **Pingera Platform**: [https://pingera.ru](https://pingera.ru)
|
|
167
|
+
- **Web Application**: [https://app.pingera.ru](https://app.pingera.ru)
|
|
168
|
+
- **Documentation**: [https://docs.pingera.ru](https://docs.pingera.ru)
|
|
169
|
+
|
|
170
|
+
## 🛠️ Development
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# Clone the repository
|
|
174
|
+
git clone https://github.com/pingera/pingera-cli.git
|
|
175
|
+
cd pingera-cli
|
|
176
|
+
|
|
177
|
+
# Install in development mode
|
|
178
|
+
pip install -e .
|
|
179
|
+
|
|
180
|
+
# Test the CLI (after installation)
|
|
181
|
+
pngr --help
|
|
182
|
+
|
|
183
|
+
# Run tests
|
|
184
|
+
python -m pytest tests/
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## 📝 License
|
|
188
|
+
|
|
189
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
190
|
+
|
|
191
|
+
## 🤝 Contributing
|
|
192
|
+
|
|
193
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
194
|
+
|
|
195
|
+
## 📞 Support
|
|
196
|
+
|
|
197
|
+
- **Issues**: [GitHub Issues](https://github.com/pingera/pingera-cli/issues)
|
|
198
|
+
- **Documentation**: [Pingera CLI Docs](https://docs.pingera.ru/devs/cli)
|
|
199
|
+
- **Platform Support**: [app.pingera.ru](https://app.pingera.ru)
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
|
|
2
|
+
# Pingera Platform CLI 🚀
|
|
3
|
+
|
|
4
|
+
A beautiful Python CLI tool for the [Pingera Platform](https://pingera.ru) - built with typer and rich, distributed via pip and based on Pingera SDK.
|
|
5
|
+
|
|
6
|
+
[](https://badge.fury.io/py/pingera-cli)
|
|
7
|
+
[](https://pypi.org/project/pingera-cli/)
|
|
8
|
+
[](https://opensource.org/licenses/MIT)
|
|
9
|
+
|
|
10
|
+
## ✨ Features
|
|
11
|
+
|
|
12
|
+
- **Beautiful Terminal Output**: Powered by Rich library for colorful, formatted output
|
|
13
|
+
- **Modern CLI Interface**: Built with Typer for intuitive command-line interactions
|
|
14
|
+
- **Pingera Platform Integration**: Seamlessly integrates with Pingera SDK for network monitoring
|
|
15
|
+
- **Cross-Platform**: Works on Windows, macOS, and Linux
|
|
16
|
+
- **Easy Installation**: Simple pip install with all dependencies managed
|
|
17
|
+
- **Configuration Management**: Flexible configuration with environment variables and config files
|
|
18
|
+
|
|
19
|
+
## 🚀 Installation
|
|
20
|
+
|
|
21
|
+
Install Pingera Platform CLI using pip:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install pingera-cli
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## 🔐 Authentication
|
|
28
|
+
|
|
29
|
+
Before using the CLI, you need to authenticate with the Pingera Platform:
|
|
30
|
+
|
|
31
|
+
1. **Get your API key**: Visit [app.pingera.ru](https://app.pingera.ru) and create an API token in your account settings
|
|
32
|
+
2. **Login to the CLI**:
|
|
33
|
+
```bash
|
|
34
|
+
pngr auth login --api-key your-api-key-here
|
|
35
|
+
```
|
|
36
|
+
3. **Verify authentication**:
|
|
37
|
+
```bash
|
|
38
|
+
pngr auth status
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Alternatively, you can set the API key as an environment variable:
|
|
42
|
+
```bash
|
|
43
|
+
export PINGERA_API_KEY=your-api-key-here
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 📖 Basic Usage
|
|
47
|
+
|
|
48
|
+
### List all monitoring checks
|
|
49
|
+
```bash
|
|
50
|
+
pngr checks list
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Get details of a specific check
|
|
54
|
+
```bash
|
|
55
|
+
pngr checks get <check-id>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Create a new web check
|
|
59
|
+
```bash
|
|
60
|
+
pngr checks create \
|
|
61
|
+
--name "My Website" \
|
|
62
|
+
--type web \
|
|
63
|
+
--url https://example.com \
|
|
64
|
+
--interval 300
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Get check results
|
|
68
|
+
```bash
|
|
69
|
+
pngr checks results <check-id>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Run an on-demand check
|
|
73
|
+
```bash
|
|
74
|
+
pngr checks run custom \
|
|
75
|
+
--type web \
|
|
76
|
+
--url https://example.com \
|
|
77
|
+
--name "Quick Test"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### List available regions
|
|
81
|
+
```bash
|
|
82
|
+
pngr checks list-regions
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Filter regions by check type
|
|
86
|
+
```bash
|
|
87
|
+
pngr checks list-regions --check-type web
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## 🔧 Configuration
|
|
91
|
+
|
|
92
|
+
The CLI stores configuration in `~/.config/pingera-cli/config.json`. You can manage settings with:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Show current configuration
|
|
96
|
+
pngr config show
|
|
97
|
+
|
|
98
|
+
# Set default output format
|
|
99
|
+
pngr config set output_format json
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## 📊 Output Formats
|
|
103
|
+
|
|
104
|
+
The CLI supports multiple output formats:
|
|
105
|
+
|
|
106
|
+
- **table** (default): Human-readable tables
|
|
107
|
+
- **json**: JSON format for scripting
|
|
108
|
+
- **yaml**: YAML format
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# JSON output
|
|
112
|
+
pngr checks list --output json
|
|
113
|
+
|
|
114
|
+
# YAML output
|
|
115
|
+
pngr checks list --output yaml
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## 🌐 Platform Links
|
|
119
|
+
|
|
120
|
+
- **Pingera Platform**: [https://pingera.ru](https://pingera.ru)
|
|
121
|
+
- **Web Application**: [https://app.pingera.ru](https://app.pingera.ru)
|
|
122
|
+
- **Documentation**: [https://docs.pingera.ru](https://docs.pingera.ru)
|
|
123
|
+
|
|
124
|
+
## 🛠️ Development
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# Clone the repository
|
|
128
|
+
git clone https://github.com/pingera/pingera-cli.git
|
|
129
|
+
cd pingera-cli
|
|
130
|
+
|
|
131
|
+
# Install in development mode
|
|
132
|
+
pip install -e .
|
|
133
|
+
|
|
134
|
+
# Test the CLI (after installation)
|
|
135
|
+
pngr --help
|
|
136
|
+
|
|
137
|
+
# Run tests
|
|
138
|
+
python -m pytest tests/
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## 📝 License
|
|
142
|
+
|
|
143
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
144
|
+
|
|
145
|
+
## 🤝 Contributing
|
|
146
|
+
|
|
147
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
148
|
+
|
|
149
|
+
## 📞 Support
|
|
150
|
+
|
|
151
|
+
- **Issues**: [GitHub Issues](https://github.com/pingera/pingera-cli/issues)
|
|
152
|
+
- **Documentation**: [Pingera CLI Docs](https://docs.pingera.ru/devs/cli)
|
|
153
|
+
- **Platform Support**: [app.pingera.ru](https://app.pingera.ru)
|
pingera_cli-0.1.0/assert
ADDED
|
File without changes
|