@curviate/cli 0.23.0 → 0.23.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/CHANGELOG.md +20 -1
- package/README.md +65 -23
- package/dist/{account-MIPWTAG5.js → account-NZZLUI4E.js} +8 -9
- package/dist/{chunk-H6XD3F66.js → chunk-766W25QS.js} +1 -1
- package/dist/{chunk-ZYURL5VK.js → chunk-AHYUM2XQ.js} +93 -1
- package/dist/{chunk-56ORAZJO.js → chunk-LCIUD7S2.js} +1 -1
- package/dist/{chunk-3BO6GVS2.js → chunk-LCLYFE54.js} +1 -1
- package/dist/{chunk-MBO4LBLY.js → chunk-S6VAMUCC.js} +4 -6
- package/dist/{chunk-CUTMZWL6.js → chunk-SYRFLZ4D.js} +2 -94
- package/dist/{chunk-JA3NNST6.js → chunk-TKWW6BV6.js} +2 -2
- package/dist/cli.js +107 -68
- package/dist/{comment-TUXC7K72.js → comment-SXYTJPXI.js} +6 -7
- package/dist/{company-LHYDAO2C.js → company-GZ2QR2CZ.js} +8 -9
- package/dist/{config-FPWWYG7G.js → config-YKQ4QEBI.js} +4 -3
- package/dist/{connect-5S4TFQAF.js → connect-3LTKVRGM.js} +5 -5
- package/dist/{feed-ISNH4NXB.js → feed-ZY27EY52.js} +5 -5
- package/dist/{group-PHGUOOJE.js → group-DBE25EID.js} +5 -5
- package/dist/{inbox-3IQPPQMH.js → inbox-E6ME3ROZ.js} +5 -5
- package/dist/{inboxes-JK36F6SK.js → inboxes-JRX3J32A.js} +5 -5
- package/dist/{job-JQG34ATV.js → job-U5YIJ7KB.js} +5 -5
- package/dist/{login-ZLDDIAFW.js → login-ERQVI27Q.js} +3 -3
- package/dist/{message-2WIZESSM.js → message-NPX7UX46.js} +5 -5
- package/dist/{notification-ORSZY2IJ.js → notification-XSSA5QOJ.js} +5 -5
- package/dist/{post-JRJMGV2I.js → post-OSM7JH65.js} +6 -7
- package/dist/{profile-SUKHRWQP.js → profile-LQXOC7HY.js} +7 -7
- package/dist/{recruiter-NIKKDGMR.js → recruiter-ZUTWJHO5.js} +7 -8
- package/dist/{sales-nav-4MFL2JSE.js → sales-nav-LSUBIJWZ.js} +6 -6
- package/dist/{search-MZQJDJTX.js → search-FEHXVTQ3.js} +18 -18
- package/dist/{webhook-7ESDSIRU.js → webhook-C43C5BK7.js} +5 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,26 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
|
6
6
|
Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html):
|
|
7
7
|
a new command or flag is a minor; a breaking command/flag/exit-code change is a major; a fix is a patch.
|
|
8
8
|
|
|
9
|
-
## [
|
|
9
|
+
## [0.23.1] - 2026-08-10
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **A global flag placed before the subcommand was rejected, and any flag
|
|
14
|
+
value beginning with `-` was rejected.** `curviate --api-key <key> account
|
|
15
|
+
list` exited 2 with "unknown command", and a value like `--api-key
|
|
16
|
+
-something` exited 2 with "unknown flag". Both shared one root cause: the
|
|
17
|
+
dispatcher's flag scan never tracked which tokens it had already consumed
|
|
18
|
+
as another flag's value, so it re-inspected a value token as if it were
|
|
19
|
+
fresh input, misreading a flag's value as the subcommand name in the first
|
|
20
|
+
case and re-scanning a dash-prefixed value as its own (unknown) flag in the
|
|
21
|
+
second. Fixing the scan surfaced a second, more serious defect on the same
|
|
22
|
+
path: once a leading global flag was correctly found, the token AFTER it
|
|
23
|
+
was dropped entirely on the way to the resolved command, so the flag's
|
|
24
|
+
value silently never reached the request at all (a stored profile or
|
|
25
|
+
environment variable answered instead, with no error). All three are
|
|
26
|
+
fixed. Global flags now work in any position, and a flag value starting
|
|
27
|
+
with `-` (an API key, a negative `--limit`, a message beginning with a
|
|
28
|
+
dash) is bound exactly as typed.
|
|
10
29
|
|
|
11
30
|
## [0.23.0] - 2026-08-10
|
|
12
31
|
|
package/README.md
CHANGED
|
@@ -47,12 +47,14 @@ curviate --api-key <your-api-key> account list
|
|
|
47
47
|
> history. Prefer `curviate login` or the `CURVIATE_API_KEY` environment
|
|
48
48
|
> variable; reserve `--api-key` for one-off, low-trust contexts.
|
|
49
49
|
|
|
50
|
-
Get your API key from the [Curviate dashboard](https://
|
|
50
|
+
Get your API key from the [Curviate dashboard](https://app.curviate.com).
|
|
51
51
|
|
|
52
52
|
## Usage
|
|
53
53
|
|
|
54
54
|
```
|
|
55
|
-
curviate [command] [subcommand] [flags]
|
|
55
|
+
curviate [flags] [command] [subcommand] [flags]
|
|
56
|
+
|
|
57
|
+
Global flags may appear anywhere in the invocation, before the command or after it.
|
|
56
58
|
|
|
57
59
|
Global flags available on every command:
|
|
58
60
|
--account Target a specific account ID
|
|
@@ -62,9 +64,11 @@ Global flags available on every command:
|
|
|
62
64
|
--fields Comma-separated list of fields to include in JSON output
|
|
63
65
|
--limit Maximum number of results to return per page
|
|
64
66
|
--cursor Pagination cursor from a previous response
|
|
65
|
-
--all
|
|
67
|
+
--all Stream all pages as NDJSON
|
|
66
68
|
--max-pages Cap on the number of pages fetched with --all
|
|
69
|
+
--page-delay Milliseconds to pause between pages when --all is used (default 400)
|
|
67
70
|
--preview Show what would happen without sending any write request
|
|
71
|
+
--verbose Output the full SDK response instead of the slim default
|
|
68
72
|
--base-url Override the API base URL (for testing)
|
|
69
73
|
--timeout Request timeout in milliseconds (default: 30000)
|
|
70
74
|
```
|
|
@@ -77,44 +81,59 @@ These examples show how coding agents compose the CLI in real workflows.
|
|
|
77
81
|
|
|
78
82
|
### 1. Find people and send connection requests
|
|
79
83
|
|
|
80
|
-
Search for matching profiles, preview the invitations, then send them once satisfied
|
|
84
|
+
Search for matching profiles, preview the invitations, then send them once satisfied.
|
|
85
|
+
`--location` on `search people` takes location **ids**, not free text; resolve a
|
|
86
|
+
human-readable place name to an id first with `curviate search parameters --type LOCATION`:
|
|
81
87
|
|
|
82
88
|
```bash
|
|
83
|
-
|
|
89
|
+
curviate search parameters --type LOCATION --keywords "Berlin" --account acc_1 --json
|
|
90
|
+
# {"items":[{"id":"103035651","name":"Berlin, Germany"}, {"id":"106967730","name":"Berlin, Berlin, Germany"}, ...]}
|
|
91
|
+
|
|
92
|
+
# Look first, a search is a read, so it just runs (no --preview on reads)
|
|
84
93
|
curviate search people \
|
|
85
94
|
--keywords "AI engineer" \
|
|
86
|
-
--location
|
|
95
|
+
--location 103035651 \
|
|
96
|
+
--account acc_1 \
|
|
87
97
|
--limit 10 \
|
|
88
98
|
--json
|
|
89
99
|
|
|
90
100
|
# Preview a single write before sending, then pipe IDs into connect, one request per person
|
|
91
|
-
curviate connect "$SOME_ID" --note "Hi, I'd love to connect." --preview
|
|
101
|
+
curviate connect "$SOME_ID" --account acc_1 --note "Hi, I'd love to connect." --preview
|
|
92
102
|
|
|
93
|
-
curviate search people --keywords "AI engineer" --location
|
|
103
|
+
curviate search people --keywords "AI engineer" --location 103035651 --account acc_1 --all \
|
|
94
104
|
| jq -r '.id' \
|
|
95
105
|
| head -5 \
|
|
96
|
-
| xargs -I{} curviate connect {} --note "Hi, I'd love to connect."
|
|
106
|
+
| xargs -I{} curviate connect {} --account acc_1 --note "Hi, I'd love to connect."
|
|
97
107
|
```
|
|
98
108
|
|
|
99
109
|
### 2. Triage the inbox and extract unread threads
|
|
100
110
|
|
|
101
|
-
Pull the inbox
|
|
111
|
+
Pull the inbox, filter unread chats, and surface the most recent message from each.
|
|
112
|
+
`--all` streams **NDJSON** (one JSON object per line), not a `{items:[...]}` envelope or a
|
|
113
|
+
bare array, so pipe each line straight into `jq` with no `.[]`. The chat's own id is `id`
|
|
114
|
+
(`chat_id` only appears nested inside `last_message`, pointing back at its own chat); the
|
|
115
|
+
unread signal is the integer `unread_count`, not a boolean `unread`; and `last_message` has
|
|
116
|
+
no `sender` object, only `sender_id` (a provider id, not a display name), so a
|
|
117
|
+
human-readable sender comes from the chat's own `user.display_name` instead (present on
|
|
118
|
+
1:1 chats):
|
|
102
119
|
|
|
103
120
|
```bash
|
|
104
|
-
curviate inbox list --json --all \
|
|
105
|
-
| jq '
|
|
121
|
+
curviate inbox list --json --all --account acc_1 \
|
|
122
|
+
| jq -c 'select(.unread_count > 0) | {chat_id: .id, sender: (.user.display_name // .last_message.sender_id), preview: .last_message.text[0:80]}'
|
|
106
123
|
```
|
|
107
124
|
|
|
108
125
|
### 3. Warm up a prospect by reacting to their recent posts
|
|
109
126
|
|
|
110
|
-
Read recent posts from a profile, then react to each,
|
|
127
|
+
Read recent posts from a profile, then react to each, useful for ambient warm-up before outreach.
|
|
128
|
+
A post's id is `id` (there is no `post_id` field), and `--posts` returns a `{items:[...]}`
|
|
129
|
+
envelope, not a bare array:
|
|
111
130
|
|
|
112
131
|
```bash
|
|
113
132
|
PROFILE_URL="https://www.linkedin.com/in/example"
|
|
114
133
|
|
|
115
|
-
curviate profile "$PROFILE_URL" --posts --fields
|
|
116
|
-
| jq -r '.[].
|
|
117
|
-
| xargs -I{} curviate post react {} --reaction like
|
|
134
|
+
curviate profile "$PROFILE_URL" --posts --fields id --account acc_1 --json \
|
|
135
|
+
| jq -r '.items[].id' \
|
|
136
|
+
| xargs -I{} curviate post react {} --account acc_1 --reaction like
|
|
118
137
|
```
|
|
119
138
|
|
|
120
139
|
### 4. Check tier entitlement before a Sales Navigator sweep
|
|
@@ -122,7 +141,7 @@ curviate profile "$PROFILE_URL" --posts --fields post_id --json \
|
|
|
122
141
|
Exit code `5` means the account lacks the required add-on. Branch on it in a script:
|
|
123
142
|
|
|
124
143
|
```bash
|
|
125
|
-
curviate sales-nav search people --keywords "VP Engineering" --json \
|
|
144
|
+
curviate sales-nav search people --keywords "VP Engineering" --account acc_1 --json \
|
|
126
145
|
|| {
|
|
127
146
|
code=$?
|
|
128
147
|
if [ "$code" -eq 5 ]; then
|
|
@@ -152,11 +171,13 @@ Exit `2` means the signature is invalid or the replay window has expired.
|
|
|
152
171
|
|
|
153
172
|
### 6. Export all accounts to a CSV (agent-friendly pipeline)
|
|
154
173
|
|
|
155
|
-
List every connected account, select key fields, and format as CSV with `jq
|
|
174
|
+
List every connected account, select key fields, and format as CSV with `jq`. `--all` streams
|
|
175
|
+
NDJSON, so slurp it into an array first with `jq -s`; the fields are `account_id` and
|
|
176
|
+
`full_name`, not `id` / `name`:
|
|
156
177
|
|
|
157
178
|
```bash
|
|
158
179
|
curviate account list --all --json \
|
|
159
|
-
| jq -r '["
|
|
180
|
+
| jq -s -r '["account_id","full_name","status"], (.[] | [.account_id, .full_name, .status]) | @csv' \
|
|
160
181
|
> accounts.csv
|
|
161
182
|
```
|
|
162
183
|
|
|
@@ -229,10 +250,13 @@ curviate sales-nav save-lead ACwAAA1234567 --account acc_1 --list 987654
|
|
|
229
250
|
|
|
230
251
|
### 3. Start a new Sales Navigator chat
|
|
231
252
|
|
|
253
|
+
`--subject` is required for Sales Navigator messaging.
|
|
254
|
+
|
|
232
255
|
```bash
|
|
233
256
|
curviate sales-nav message new \
|
|
234
257
|
--to ACwAAA1234567 \
|
|
235
258
|
--account acc_1 \
|
|
259
|
+
--subject "An opportunity at our company" \
|
|
236
260
|
"Hi, I'd love to connect about an opportunity at our company."
|
|
237
261
|
```
|
|
238
262
|
|
|
@@ -314,8 +338,12 @@ curviate recruiter project-job get "$PROJECT_ID" --account acc_1 --json
|
|
|
314
338
|
|
|
315
339
|
### 3. Create a job posting draft, then publish it
|
|
316
340
|
|
|
317
|
-
`recruiter job create` requires `--project-name` (the hiring project the posting opens)
|
|
318
|
-
|
|
341
|
+
`recruiter job create` requires `--project-name` (the hiring project the posting opens) plus the
|
|
342
|
+
full v2 job body: `--job-title`, `--company-id`/`--company-name`, `--workplace-type`, `--location`,
|
|
343
|
+
`--employment-status`, `--seniority-level`, `--description` (200 characters minimum), `--industry`,
|
|
344
|
+
`--job-function`, and `--apply-method`. `--location`/`--industry`/`--job-function` take resolved
|
|
345
|
+
parameter ids, the same `search parameters --type LOCATION`/`--type INDUSTRY`/`--type JOB_FUNCTION`
|
|
346
|
+
resolution from example 1 above. `recruiter job publish` is project-scoped and requires `--mode`
|
|
319
347
|
(`FREE | PROMOTED | PROMOTED_PLUS`); the paid modes also require the full `--budget-*` triple.
|
|
320
348
|
|
|
321
349
|
```bash
|
|
@@ -323,8 +351,15 @@ curviate recruiter job create \
|
|
|
323
351
|
--account acc_1 \
|
|
324
352
|
--project-name "Backend Hiring 2026" \
|
|
325
353
|
--job-title "Senior Backend Engineer" \
|
|
326
|
-
--
|
|
354
|
+
--company-name "Curviate GmbH" \
|
|
355
|
+
--workplace-type REMOTE \
|
|
356
|
+
--location 103035651 \
|
|
327
357
|
--employment-status FULL_TIME \
|
|
358
|
+
--seniority-level MID_SENIOR_LEVEL \
|
|
359
|
+
--description "We are looking for a senior backend engineer to join our remote-first team building the core platform that powers agent-native LinkedIn automation for thousands of developers and their AI agents worldwide." \
|
|
360
|
+
--industry 96 \
|
|
361
|
+
--job-function 15 \
|
|
362
|
+
--apply-method linkedin \
|
|
328
363
|
--json
|
|
329
364
|
|
|
330
365
|
curviate recruiter job publish "$PROJECT_ID" "$JOB_ID" --account acc_1 --mode FREE --json
|
|
@@ -380,7 +415,7 @@ curviate recruiter message new \
|
|
|
380
415
|
--to AEM789 \
|
|
381
416
|
--account acc_1 \
|
|
382
417
|
--subject "A role you'd be a great fit for" \
|
|
383
|
-
--signature "
|
|
418
|
+
--signature "Alex, Talent Team" \
|
|
384
419
|
"Hi, I came across your profile and think you'd be a great fit for a role we're hiring for."
|
|
385
420
|
```
|
|
386
421
|
|
|
@@ -407,6 +442,13 @@ curviate recruiter job get "https://www.linkedin.com/jobs/view/4428113858" --acc
|
|
|
407
442
|
| 3 | Authentication or authorization failure |
|
|
408
443
|
| 4 | Resource not found |
|
|
409
444
|
| 5 | Feature requires an add-on or higher plan |
|
|
445
|
+
| 6 | Rate limited |
|
|
446
|
+
| 7 | Transient platform error (retry likely to succeed) |
|
|
447
|
+
| 8 | Account or connection state blocks the request |
|
|
448
|
+
| 9 | Checkpoint flow error (expired, invalid code, or too many attempts) |
|
|
449
|
+
| 10 | Messaging window expired or recipient unreachable |
|
|
450
|
+
| 11 | Billing issue (payment required, failed, or seat cancelled) |
|
|
451
|
+
| 12 | Auth action needed (a pending checkpoint; not an error) |
|
|
410
452
|
|
|
411
453
|
## License
|
|
412
454
|
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
pageDelayFromFlags,
|
|
12
12
|
streamAll
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-766W25QS.js";
|
|
14
14
|
import {
|
|
15
15
|
buildPreviewOutput
|
|
16
16
|
} from "./chunk-R3VLWLVV.js";
|
|
@@ -20,15 +20,14 @@ import {
|
|
|
20
20
|
renderSuccess,
|
|
21
21
|
renderUnexpectedError,
|
|
22
22
|
resolveEffectiveConfig
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-TKWW6BV6.js";
|
|
24
|
+
import "./chunk-SYRFLZ4D.js";
|
|
24
25
|
import {
|
|
25
26
|
GLOBAL_FLAGS,
|
|
26
27
|
READ_SINGLE_FLAGS,
|
|
27
|
-
WRITE_SINGLE_FLAGS
|
|
28
|
-
} from "./chunk-CUTMZWL6.js";
|
|
29
|
-
import {
|
|
28
|
+
WRITE_SINGLE_FLAGS,
|
|
30
29
|
defaultReadStdin
|
|
31
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-AHYUM2XQ.js";
|
|
32
31
|
import {
|
|
33
32
|
AUTH_NEEDED
|
|
34
33
|
} from "./chunk-PMRQXBCP.js";
|
|
@@ -1101,11 +1100,11 @@ var accountCheckpointPollCommand = defineCommand({
|
|
|
1101
1100
|
},
|
|
1102
1101
|
// Override WRITE_SINGLE_FLAGS.timeout: on this command --timeout is the
|
|
1103
1102
|
// --wait loop's own wall-clock bound in MILLISECONDS (requires --wait),
|
|
1104
|
-
// NOT the SDK request timeout
|
|
1105
|
-
//
|
|
1103
|
+
// NOT the SDK request timeout. Default: the time remaining to the
|
|
1104
|
+
// checkpoint's own expiry.
|
|
1106
1105
|
timeout: {
|
|
1107
1106
|
type: "string",
|
|
1108
|
-
description: "Wait-loop timeout in milliseconds (requires --wait; default: time remaining to the checkpoint's expiry).
|
|
1107
|
+
description: "Wait-loop timeout in milliseconds (requires --wait; default: time remaining to the checkpoint's expiry)."
|
|
1109
1108
|
}
|
|
1110
1109
|
},
|
|
1111
1110
|
async run({ args }) {
|
|
@@ -73,11 +73,103 @@ async function resolveTextOrStdin(rawText, out, readStdin) {
|
|
|
73
73
|
return text;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
// src/lib/global-flags.ts
|
|
77
|
+
var GLOBAL_FLAGS = {
|
|
78
|
+
// Auth / config
|
|
79
|
+
"api-key": {
|
|
80
|
+
type: "string",
|
|
81
|
+
description: "API key (overrides env and profile). Note: a key passed on the command line is visible to other processes via `ps` and is saved in shell history; prefer the CURVIATE_API_KEY env var or `curviate login`."
|
|
82
|
+
},
|
|
83
|
+
profile: {
|
|
84
|
+
type: "string",
|
|
85
|
+
description: "Named profile to use from the config file."
|
|
86
|
+
},
|
|
87
|
+
account: {
|
|
88
|
+
type: "string",
|
|
89
|
+
description: "Account id for account-scoped commands."
|
|
90
|
+
},
|
|
91
|
+
"base-url": {
|
|
92
|
+
type: "string",
|
|
93
|
+
description: "Override the API base URL."
|
|
94
|
+
},
|
|
95
|
+
timeout: {
|
|
96
|
+
type: "string",
|
|
97
|
+
description: "Request timeout in milliseconds."
|
|
98
|
+
},
|
|
99
|
+
// Output
|
|
100
|
+
json: {
|
|
101
|
+
type: "boolean",
|
|
102
|
+
description: "Emit JSON output (default when stdout is not a TTY).",
|
|
103
|
+
default: false
|
|
104
|
+
},
|
|
105
|
+
fields: {
|
|
106
|
+
type: "string",
|
|
107
|
+
description: "Comma-separated dot-path field projection (e.g. id,name)."
|
|
108
|
+
},
|
|
109
|
+
limit: {
|
|
110
|
+
type: "string",
|
|
111
|
+
description: "Maximum items per page."
|
|
112
|
+
},
|
|
113
|
+
cursor: {
|
|
114
|
+
type: "string",
|
|
115
|
+
description: "Pagination cursor (opaque token from a previous response)."
|
|
116
|
+
},
|
|
117
|
+
all: {
|
|
118
|
+
type: "boolean",
|
|
119
|
+
description: "Stream all pages as NDJSON.",
|
|
120
|
+
default: false
|
|
121
|
+
},
|
|
122
|
+
"max-pages": {
|
|
123
|
+
type: "string",
|
|
124
|
+
description: "Maximum number of pages to fetch when --all is used."
|
|
125
|
+
},
|
|
126
|
+
"page-delay": {
|
|
127
|
+
type: "string",
|
|
128
|
+
description: "Milliseconds to pause between pages when --all is used (default 400; pass 0 to disable). A modest delay keeps a long stream under the platform rate gate."
|
|
129
|
+
},
|
|
130
|
+
preview: {
|
|
131
|
+
type: "boolean",
|
|
132
|
+
description: "Render the request that would be sent without calling the API.",
|
|
133
|
+
default: false
|
|
134
|
+
},
|
|
135
|
+
verbose: {
|
|
136
|
+
type: "boolean",
|
|
137
|
+
description: "Output the full SDK response instead of the slim default.",
|
|
138
|
+
default: false
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
var WRITE_FLAGS = {
|
|
142
|
+
"api-key": GLOBAL_FLAGS["api-key"],
|
|
143
|
+
profile: GLOBAL_FLAGS.profile,
|
|
144
|
+
account: GLOBAL_FLAGS.account,
|
|
145
|
+
"base-url": GLOBAL_FLAGS["base-url"],
|
|
146
|
+
timeout: GLOBAL_FLAGS.timeout,
|
|
147
|
+
json: GLOBAL_FLAGS.json,
|
|
148
|
+
preview: GLOBAL_FLAGS.preview,
|
|
149
|
+
verbose: GLOBAL_FLAGS.verbose
|
|
150
|
+
};
|
|
151
|
+
var READ_SINGLE_FLAGS = {
|
|
152
|
+
"api-key": GLOBAL_FLAGS["api-key"],
|
|
153
|
+
profile: GLOBAL_FLAGS.profile,
|
|
154
|
+
account: GLOBAL_FLAGS.account,
|
|
155
|
+
"base-url": GLOBAL_FLAGS["base-url"],
|
|
156
|
+
timeout: GLOBAL_FLAGS.timeout,
|
|
157
|
+
json: GLOBAL_FLAGS.json,
|
|
158
|
+
fields: GLOBAL_FLAGS.fields,
|
|
159
|
+
preview: GLOBAL_FLAGS.preview,
|
|
160
|
+
verbose: GLOBAL_FLAGS.verbose
|
|
161
|
+
};
|
|
162
|
+
var WRITE_SINGLE_FLAGS = READ_SINGLE_FLAGS;
|
|
163
|
+
|
|
76
164
|
export {
|
|
77
165
|
STDIN_SENTINEL,
|
|
78
166
|
defaultReadStdin,
|
|
79
167
|
isStdinToken,
|
|
80
168
|
restoreLiteralDashes,
|
|
81
169
|
assertNoStdinPlaceholder,
|
|
82
|
-
resolveTextOrStdin
|
|
170
|
+
resolveTextOrStdin,
|
|
171
|
+
GLOBAL_FLAGS,
|
|
172
|
+
WRITE_FLAGS,
|
|
173
|
+
READ_SINGLE_FLAGS,
|
|
174
|
+
WRITE_SINGLE_FLAGS
|
|
83
175
|
};
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-UEAX6KUB.js";
|
|
19
19
|
import {
|
|
20
20
|
requireAccount
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-LCLYFE54.js";
|
|
22
22
|
import {
|
|
23
23
|
buildPreviewOutput
|
|
24
24
|
} from "./chunk-R3VLWLVV.js";
|
|
@@ -28,14 +28,12 @@ import {
|
|
|
28
28
|
renderSuccess,
|
|
29
29
|
renderUnexpectedError,
|
|
30
30
|
resolveEffectiveConfig
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-TKWW6BV6.js";
|
|
32
32
|
import {
|
|
33
33
|
READ_SINGLE_FLAGS,
|
|
34
|
-
WRITE_FLAGS
|
|
35
|
-
} from "./chunk-CUTMZWL6.js";
|
|
36
|
-
import {
|
|
34
|
+
WRITE_FLAGS,
|
|
37
35
|
resolveTextOrStdin
|
|
38
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-AHYUM2XQ.js";
|
|
39
37
|
|
|
40
38
|
// src/commands/message.ts
|
|
41
39
|
import { defineCommand } from "citty";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
assertNoStdinPlaceholder
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AHYUM2XQ.js";
|
|
5
5
|
|
|
6
6
|
// src/lib/config.ts
|
|
7
7
|
import {
|
|
@@ -130,94 +130,6 @@ async function updateProfileField(profileName, field, value) {
|
|
|
130
130
|
await writeConfig(cfg);
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
// src/lib/global-flags.ts
|
|
134
|
-
var GLOBAL_FLAGS = {
|
|
135
|
-
// Auth / config
|
|
136
|
-
"api-key": {
|
|
137
|
-
type: "string",
|
|
138
|
-
description: "API key (overrides env and profile). Note: a key passed on the command line is visible to other processes via `ps` and is saved in shell history; prefer the CURVIATE_API_KEY env var or `curviate login`."
|
|
139
|
-
},
|
|
140
|
-
profile: {
|
|
141
|
-
type: "string",
|
|
142
|
-
description: "Named profile to use from the config file."
|
|
143
|
-
},
|
|
144
|
-
account: {
|
|
145
|
-
type: "string",
|
|
146
|
-
description: "Account id for account-scoped commands."
|
|
147
|
-
},
|
|
148
|
-
"base-url": {
|
|
149
|
-
type: "string",
|
|
150
|
-
description: "Override the API base URL."
|
|
151
|
-
},
|
|
152
|
-
timeout: {
|
|
153
|
-
type: "string",
|
|
154
|
-
description: "Request timeout in milliseconds."
|
|
155
|
-
},
|
|
156
|
-
// Output
|
|
157
|
-
json: {
|
|
158
|
-
type: "boolean",
|
|
159
|
-
description: "Emit JSON output (default when stdout is not a TTY).",
|
|
160
|
-
default: false
|
|
161
|
-
},
|
|
162
|
-
fields: {
|
|
163
|
-
type: "string",
|
|
164
|
-
description: "Comma-separated dot-path field projection (e.g. id,name)."
|
|
165
|
-
},
|
|
166
|
-
limit: {
|
|
167
|
-
type: "string",
|
|
168
|
-
description: "Maximum items per page."
|
|
169
|
-
},
|
|
170
|
-
cursor: {
|
|
171
|
-
type: "string",
|
|
172
|
-
description: "Pagination cursor (opaque token from a previous response)."
|
|
173
|
-
},
|
|
174
|
-
all: {
|
|
175
|
-
type: "boolean",
|
|
176
|
-
description: "Stream all pages as NDJSON.",
|
|
177
|
-
default: false
|
|
178
|
-
},
|
|
179
|
-
"max-pages": {
|
|
180
|
-
type: "string",
|
|
181
|
-
description: "Maximum number of pages to fetch when --all is used."
|
|
182
|
-
},
|
|
183
|
-
"page-delay": {
|
|
184
|
-
type: "string",
|
|
185
|
-
description: "Milliseconds to pause between pages when --all is used (default 400; pass 0 to disable). A modest delay keeps a long stream under the platform rate gate."
|
|
186
|
-
},
|
|
187
|
-
preview: {
|
|
188
|
-
type: "boolean",
|
|
189
|
-
description: "Render the request that would be sent without calling the API.",
|
|
190
|
-
default: false
|
|
191
|
-
},
|
|
192
|
-
verbose: {
|
|
193
|
-
type: "boolean",
|
|
194
|
-
description: "Output the full SDK response instead of the slim default.",
|
|
195
|
-
default: false
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
var WRITE_FLAGS = {
|
|
199
|
-
"api-key": GLOBAL_FLAGS["api-key"],
|
|
200
|
-
profile: GLOBAL_FLAGS.profile,
|
|
201
|
-
account: GLOBAL_FLAGS.account,
|
|
202
|
-
"base-url": GLOBAL_FLAGS["base-url"],
|
|
203
|
-
timeout: GLOBAL_FLAGS.timeout,
|
|
204
|
-
json: GLOBAL_FLAGS.json,
|
|
205
|
-
preview: GLOBAL_FLAGS.preview,
|
|
206
|
-
verbose: GLOBAL_FLAGS.verbose
|
|
207
|
-
};
|
|
208
|
-
var READ_SINGLE_FLAGS = {
|
|
209
|
-
"api-key": GLOBAL_FLAGS["api-key"],
|
|
210
|
-
profile: GLOBAL_FLAGS.profile,
|
|
211
|
-
account: GLOBAL_FLAGS.account,
|
|
212
|
-
"base-url": GLOBAL_FLAGS["base-url"],
|
|
213
|
-
timeout: GLOBAL_FLAGS.timeout,
|
|
214
|
-
json: GLOBAL_FLAGS.json,
|
|
215
|
-
fields: GLOBAL_FLAGS.fields,
|
|
216
|
-
preview: GLOBAL_FLAGS.preview,
|
|
217
|
-
verbose: GLOBAL_FLAGS.verbose
|
|
218
|
-
};
|
|
219
|
-
var WRITE_SINGLE_FLAGS = READ_SINGLE_FLAGS;
|
|
220
|
-
|
|
221
133
|
export {
|
|
222
134
|
getConfigPath,
|
|
223
135
|
readConfig,
|
|
@@ -225,9 +137,5 @@ export {
|
|
|
225
137
|
setActiveProfile,
|
|
226
138
|
renameProfile,
|
|
227
139
|
removeProfile,
|
|
228
|
-
updateProfileField
|
|
229
|
-
GLOBAL_FLAGS,
|
|
230
|
-
WRITE_FLAGS,
|
|
231
|
-
READ_SINGLE_FLAGS,
|
|
232
|
-
WRITE_SINGLE_FLAGS
|
|
140
|
+
updateProfileField
|
|
233
141
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readConfig
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SYRFLZ4D.js";
|
|
5
5
|
import {
|
|
6
6
|
assertNoStdinPlaceholder
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AHYUM2XQ.js";
|
|
8
8
|
|
|
9
9
|
// src/lib/resolve.ts
|
|
10
10
|
var DEFAULT_BASE_URL = "https://api.curviate.com";
|