@oneuptime/cli 11.0.9 → 11.0.12
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 +34 -34
- package/package.json +42 -42
package/README.md
CHANGED
|
@@ -76,27 +76,27 @@ oneuptime context delete old-context
|
|
|
76
76
|
|
|
77
77
|
### Authentication
|
|
78
78
|
|
|
79
|
-
| Command
|
|
80
|
-
|
|
79
|
+
| Command | Description |
|
|
80
|
+
| --------------------------------- | --------------------------------- |
|
|
81
81
|
| `oneuptime login <api-key> <url>` | Authenticate and create a context |
|
|
82
|
-
| `oneuptime context list`
|
|
83
|
-
| `oneuptime context use <name>`
|
|
84
|
-
| `oneuptime context current`
|
|
85
|
-
| `oneuptime context delete <name>` | Remove a context
|
|
86
|
-
| `oneuptime whoami`
|
|
82
|
+
| `oneuptime context list` | List all contexts |
|
|
83
|
+
| `oneuptime context use <name>` | Switch active context |
|
|
84
|
+
| `oneuptime context current` | Show current context |
|
|
85
|
+
| `oneuptime context delete <name>` | Remove a context |
|
|
86
|
+
| `oneuptime whoami` | Show current auth info |
|
|
87
87
|
|
|
88
88
|
### Resource Operations
|
|
89
89
|
|
|
90
90
|
Every discovered resource supports these subcommands:
|
|
91
91
|
|
|
92
|
-
| Subcommand
|
|
93
|
-
|
|
94
|
-
| `<resource> list [options]`
|
|
95
|
-
| `<resource> get <id>`
|
|
96
|
-
| `<resource> create --data <json>`
|
|
97
|
-
| `<resource> update <id> --data <json>` | Update an existing resource
|
|
98
|
-
| `<resource> delete <id>`
|
|
99
|
-
| `<resource> count [--query <json>]`
|
|
92
|
+
| Subcommand | Description |
|
|
93
|
+
| -------------------------------------- | -------------------------------------------- |
|
|
94
|
+
| `<resource> list [options]` | List resources with filtering and pagination |
|
|
95
|
+
| `<resource> get <id>` | Get a single resource by ID |
|
|
96
|
+
| `<resource> create --data <json>` | Create a new resource |
|
|
97
|
+
| `<resource> update <id> --data <json>` | Update an existing resource |
|
|
98
|
+
| `<resource> delete <id>` | Delete a resource |
|
|
99
|
+
| `<resource> count [--query <json>]` | Count resources |
|
|
100
100
|
|
|
101
101
|
### List Options
|
|
102
102
|
|
|
@@ -110,19 +110,19 @@ Every discovered resource supports these subcommands:
|
|
|
110
110
|
|
|
111
111
|
### Utility Commands
|
|
112
112
|
|
|
113
|
-
| Command
|
|
114
|
-
|
|
115
|
-
| `oneuptime version`
|
|
116
|
-
| `oneuptime whoami`
|
|
113
|
+
| Command | Description |
|
|
114
|
+
| --------------------- | --------------------------------- |
|
|
115
|
+
| `oneuptime version` | Print CLI version |
|
|
116
|
+
| `oneuptime whoami` | Show current authentication info |
|
|
117
117
|
| `oneuptime resources` | List all available resource types |
|
|
118
118
|
|
|
119
119
|
## Output Formats
|
|
120
120
|
|
|
121
|
-
| Format
|
|
122
|
-
|
|
121
|
+
| Format | Description |
|
|
122
|
+
| ------- | --------------------------------------- |
|
|
123
123
|
| `table` | Formatted ASCII table (default for TTY) |
|
|
124
|
-
| `json`
|
|
125
|
-
| `wide`
|
|
124
|
+
| `json` | Raw JSON (default when piped) |
|
|
125
|
+
| `wide` | Table with all columns shown |
|
|
126
126
|
|
|
127
127
|
```bash
|
|
128
128
|
# Explicit format
|
|
@@ -152,11 +152,11 @@ ONEUPTIME_API_KEY=sk-xxx ONEUPTIME_URL=https://oneuptime.com oneuptime incident
|
|
|
152
152
|
|
|
153
153
|
## Environment Variables
|
|
154
154
|
|
|
155
|
-
| Variable
|
|
156
|
-
|
|
155
|
+
| Variable | Description |
|
|
156
|
+
| ------------------- | -------------------------- |
|
|
157
157
|
| `ONEUPTIME_API_KEY` | API key for authentication |
|
|
158
|
-
| `ONEUPTIME_URL`
|
|
159
|
-
| `NO_COLOR`
|
|
158
|
+
| `ONEUPTIME_URL` | OneUptime instance URL |
|
|
159
|
+
| `NO_COLOR` | Disable colored output |
|
|
160
160
|
|
|
161
161
|
## Configuration File
|
|
162
162
|
|
|
@@ -181,13 +181,13 @@ The CLI stores configuration at `~/.oneuptime/config.json` with `0600` permissio
|
|
|
181
181
|
|
|
182
182
|
## Global Options
|
|
183
183
|
|
|
184
|
-
| Option
|
|
185
|
-
|
|
186
|
-
| `--api-key <key>`
|
|
187
|
-
| `--url <url>`
|
|
188
|
-
| `--context <name>`
|
|
189
|
-
| `-o, --output <format>` | Output format: json, table, wide
|
|
190
|
-
| `--no-color`
|
|
184
|
+
| Option | Description |
|
|
185
|
+
| ----------------------- | --------------------------------------- |
|
|
186
|
+
| `--api-key <key>` | Override API key for this command |
|
|
187
|
+
| `--url <url>` | Override instance URL for this command |
|
|
188
|
+
| `--context <name>` | Use a specific context for this command |
|
|
189
|
+
| `-o, --output <format>` | Output format: json, table, wide |
|
|
190
|
+
| `--no-color` | Disable colored output |
|
|
191
191
|
|
|
192
192
|
## Supported Resources
|
|
193
193
|
|
package/package.json
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
2
|
+
"name": "@oneuptime/cli",
|
|
3
|
+
"version": "11.0.12",
|
|
4
|
+
"description": "OneUptime CLI - Command-line interface for managing OneUptime resources",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/OneUptime/oneuptime"
|
|
8
|
+
},
|
|
9
|
+
"main": "./build/dist/Index.js",
|
|
10
|
+
"bin": {
|
|
11
|
+
"oneuptime": "build/dist/Index.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"build/dist/**/*"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"start": "node --require ts-node/register Index.ts",
|
|
18
|
+
"build": "npm run compile",
|
|
19
|
+
"compile": "tsc",
|
|
20
|
+
"clear-modules": "rm -rf node_modules && rm package-lock.json && npm install",
|
|
21
|
+
"dev": "npx nodemon",
|
|
22
|
+
"audit": "npm audit --audit-level=low",
|
|
23
|
+
"dep-check": "npm install -g depcheck && depcheck ./ --skip-missing=true",
|
|
24
|
+
"test": "jest --passWithNoTests --runInBand",
|
|
25
|
+
"link": "npm link"
|
|
26
|
+
},
|
|
27
|
+
"author": "OneUptime <hello@oneuptime.com> (https://oneuptime.com/)",
|
|
28
|
+
"license": "Apache-2.0",
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"Common": "npm:@oneuptime/common@11.0.12",
|
|
31
|
+
"commander": "^12.1.0",
|
|
32
|
+
"chalk": "^4.1.2",
|
|
33
|
+
"cli-table3": "^0.6.5",
|
|
34
|
+
"ts-node": "^10.9.2"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/jest": "^29.5.14",
|
|
38
|
+
"@types/node": "^22.15.21",
|
|
39
|
+
"jest": "^29.7.0",
|
|
40
|
+
"nodemon": "^3.1.11",
|
|
41
|
+
"ts-jest": "^29.4.6",
|
|
42
|
+
"typescript": "^5.9.3"
|
|
43
|
+
}
|
|
44
44
|
}
|