peakurl 1.0.3 → 1.1.1
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 +72 -28
- package/bin/peakurl.js +1464 -503
- package/man/peakurl.1 +48 -0
- package/package.json +14 -5
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ The official command-line interface for PeakURL.
|
|
|
6
6
|
|
|
7
7
|
Use `peakurl` to create short links, inspect existing links, and manage your PeakURL account from the terminal.
|
|
8
8
|
|
|
9
|
-
Learn more in the full CLI docs: <https://peakurl.org/
|
|
9
|
+
Learn more in the full CLI docs: <https://go.peakurl.org/7a0e0b>
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
@@ -42,12 +42,12 @@ peakurl logout
|
|
|
42
42
|
|
|
43
43
|
## Authentication
|
|
44
44
|
|
|
45
|
-
The CLI
|
|
45
|
+
The CLI authenticates with PeakURL bearer API keys and verifies credentials with your instance before saving them locally.
|
|
46
46
|
|
|
47
47
|
- `--base-url` expects the explicit API base URL, such as `https://example.com/api/v1`
|
|
48
|
-
- API keys are
|
|
49
|
-
- Credentials are stored in the standard per-user
|
|
50
|
-
- `peakurl logout` removes the saved
|
|
48
|
+
- API keys are 48-character hexadecimal tokens generated from your PeakURL dashboard
|
|
49
|
+
- Credentials are stored in the standard per-user configuration directory for `peakurl`
|
|
50
|
+
- `peakurl logout` removes the saved configuration, while environment variables take precedence when set
|
|
51
51
|
|
|
52
52
|
For CI or automation, you can also authenticate with environment variables:
|
|
53
53
|
|
|
@@ -58,21 +58,23 @@ export PEAKURL_API_KEY=0123456789abcdef0123456789abcdef0123456789abcdef
|
|
|
58
58
|
|
|
59
59
|
## Commands
|
|
60
60
|
|
|
61
|
-
| Command
|
|
62
|
-
|
|
|
63
|
-
| `peakurl login`
|
|
64
|
-
| `peakurl whoami`
|
|
65
|
-
| `peakurl logout`
|
|
66
|
-
| `peakurl status`
|
|
67
|
-
| `peakurl core download`
|
|
68
|
-
| `peakurl create <url>`
|
|
69
|
-
| `peakurl import <file>`
|
|
70
|
-
| `peakurl export`
|
|
71
|
-
| `peakurl list`
|
|
72
|
-
| `peakurl get <id-or-alias>`
|
|
73
|
-
| `peakurl delete
|
|
74
|
-
| `peakurl
|
|
75
|
-
| `peakurl
|
|
61
|
+
| Command | Description |
|
|
62
|
+
| --------------------------------- | ----------------------------------------------------------- |
|
|
63
|
+
| `peakurl login` | Validate and save your PeakURL credentials. |
|
|
64
|
+
| `peakurl whoami` | Show the current authenticated account. |
|
|
65
|
+
| `peakurl logout` | Remove saved local CLI credentials. |
|
|
66
|
+
| `peakurl status` | Show the current system status snapshot for the site. |
|
|
67
|
+
| `peakurl core download` | Download and extract the latest PeakURL core package. |
|
|
68
|
+
| `peakurl create <url>` | Create a new short link. |
|
|
69
|
+
| `peakurl import <file>` | Import links from a local CSV, JSON, or XML file. |
|
|
70
|
+
| `peakurl export` | Export accessible links as CSV, JSON, or XML. |
|
|
71
|
+
| `peakurl list` | List links in your account. |
|
|
72
|
+
| `peakurl get <id-or-alias>` | Fetch a single link by ID or alias. |
|
|
73
|
+
| `peakurl delete [id-or-alias...]` | Delete links by ID or alias, in bulk, or clear all links. |
|
|
74
|
+
| `peakurl activity <subcommand>` | View audit logs, delete activity records, or clear history. |
|
|
75
|
+
| `peakurl webhook <subcommand>` | List, create, delete, and inspect supported webhook events. |
|
|
76
|
+
| `peakurl job <cmd>` | Manage server-side scheduled jobs. |
|
|
77
|
+
| `peakurl update` | Show the latest available CLI version and install command. |
|
|
76
78
|
|
|
77
79
|
## Examples
|
|
78
80
|
|
|
@@ -111,11 +113,11 @@ Show the current system status:
|
|
|
111
113
|
peakurl status
|
|
112
114
|
```
|
|
113
115
|
|
|
114
|
-
|
|
116
|
+
Displays comprehensive system diagnostics, including health checks, site configuration, server metrics, database information, storage usage, mail settings, location analytics, cache diagnostics, and data counts.
|
|
115
117
|
|
|
116
|
-
This
|
|
118
|
+
This command typically requires an administrator account on the PeakURL instance.
|
|
117
119
|
|
|
118
|
-
|
|
120
|
+
To output the complete diagnostics as JSON:
|
|
119
121
|
|
|
120
122
|
```bash
|
|
121
123
|
peakurl status --json
|
|
@@ -135,13 +137,42 @@ Use `--force` only when you intentionally want those files replaced:
|
|
|
135
137
|
peakurl core download --force
|
|
136
138
|
```
|
|
137
139
|
|
|
138
|
-
Delete
|
|
140
|
+
Delete one or more links, or clear all links:
|
|
139
141
|
|
|
140
142
|
```bash
|
|
143
|
+
# Delete a single link
|
|
141
144
|
peakurl delete example
|
|
145
|
+
|
|
146
|
+
# Bulk delete multiple links
|
|
147
|
+
peakurl delete docs pricing blog launch
|
|
148
|
+
|
|
149
|
+
# Bulk delete with comma-separated IDs
|
|
150
|
+
peakurl delete --ids url_1,url_2,url_3
|
|
151
|
+
|
|
152
|
+
# Empty all short links in trash
|
|
153
|
+
peakurl delete --empty-trash
|
|
154
|
+
|
|
155
|
+
# Delete all accessible short links
|
|
156
|
+
peakurl delete --all
|
|
142
157
|
```
|
|
143
158
|
|
|
144
|
-
When `delete` receives
|
|
159
|
+
When `delete` receives aliases or short codes, the CLI resolves them to the underlying PeakURL row IDs before deleting them.
|
|
160
|
+
|
|
161
|
+
List, inspect, and delete audit log activity:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
# List recent activity records
|
|
165
|
+
peakurl activity list
|
|
166
|
+
|
|
167
|
+
# Filter and paginate activity logs
|
|
168
|
+
peakurl activity list --search delete --limit 25 --page 1
|
|
169
|
+
|
|
170
|
+
# Delete specific activity log entries
|
|
171
|
+
peakurl activity delete act_123 act_456
|
|
172
|
+
|
|
173
|
+
# Clear all activity log history
|
|
174
|
+
peakurl activity clear
|
|
175
|
+
```
|
|
145
176
|
|
|
146
177
|
Import links from a local file:
|
|
147
178
|
|
|
@@ -149,7 +180,7 @@ Import links from a local file:
|
|
|
149
180
|
peakurl import ./links.csv
|
|
150
181
|
```
|
|
151
182
|
|
|
152
|
-
The import command accepts
|
|
183
|
+
The import command accepts CSV, JSON, and XML files, validates and normalizes the link records locally, and imports them in bulk.
|
|
153
184
|
|
|
154
185
|
Export links as CSV:
|
|
155
186
|
|
|
@@ -198,6 +229,19 @@ Check the latest available CLI version:
|
|
|
198
229
|
peakurl update --check
|
|
199
230
|
```
|
|
200
231
|
|
|
232
|
+
Manage scheduled jobs:
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
# List all registered scheduled jobs
|
|
236
|
+
peakurl job list
|
|
237
|
+
|
|
238
|
+
# Force a job to run immediately
|
|
239
|
+
peakurl job run peakurl_version_check
|
|
240
|
+
|
|
241
|
+
# Trigger all currently due jobs
|
|
242
|
+
peakurl job run-due
|
|
243
|
+
```
|
|
244
|
+
|
|
201
245
|
Show the recommended install command:
|
|
202
246
|
|
|
203
247
|
```bash
|
|
@@ -225,7 +269,7 @@ export PEAKURL_DISABLE_UPDATE_CHECK=1
|
|
|
225
269
|
## Links
|
|
226
270
|
|
|
227
271
|
- Website: <https://peakurl.org/>
|
|
228
|
-
- CLI docs: <https://peakurl.org/
|
|
229
|
-
- API docs: <https://peakurl.org/
|
|
272
|
+
- CLI docs: <https://go.peakurl.org/7a0e0b>
|
|
273
|
+
- API docs: <https://go.peakurl.org/d373f6>
|
|
230
274
|
- npm package: <https://www.npmjs.com/package/peakurl>
|
|
231
275
|
- Issues: <https://github.com/PeakURL/CLI/issues>
|