@curviate/cli 0.1.0
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 +22 -0
- package/LICENSE +21 -0
- package/README.md +174 -0
- package/dist/account-YOW2MCZS.js +639 -0
- package/dist/chunk-2NCPJJPC.js +140 -0
- package/dist/chunk-6JNCLLNY.js +195 -0
- package/dist/chunk-BNUTM6KD.js +33 -0
- package/dist/chunk-Q43HZUN3.js +29 -0
- package/dist/chunk-R3VLWLVV.js +23 -0
- package/dist/chunk-SND3NHCT.js +46 -0
- package/dist/chunk-UWO2D4HW.js +34 -0
- package/dist/cli.js +159 -0
- package/dist/company-IKVDW7MX.js +82 -0
- package/dist/config-4JOXBFYX.js +262 -0
- package/dist/connect-HLDHFBGX.js +348 -0
- package/dist/exit-codes-NFIR57ZA.js +57 -0
- package/dist/inbox-JBLYJMV2.js +294 -0
- package/dist/login-VWJEBBFU.js +122 -0
- package/dist/message-IK7VGB63.js +566 -0
- package/dist/post-EAAGVR5D.js +496 -0
- package/dist/profile-WXA3NC7D.js +352 -0
- package/dist/recruiter-TGCV36EH.js +984 -0
- package/dist/sales-nav-XGFO5I6F.js +488 -0
- package/dist/search-LHPTHPWH.js +354 -0
- package/dist/webhook-QM5LGAUF.js +445 -0
- package/package.json +54 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@curviate/cli` are documented here.
|
|
4
|
+
|
|
5
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
6
|
+
Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html):
|
|
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
|
+
|
|
9
|
+
## [Unreleased]
|
|
10
|
+
|
|
11
|
+
## [0.1.0] - 2026-06-22
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Initial public release — full SDK-surface parity CLI over the Curviate API.
|
|
16
|
+
- `curviate` root command with `--help` and `--version`.
|
|
17
|
+
- Global flags: `--account`, `--json`, `--fields`, `--limit`, `--cursor`, `--all`,
|
|
18
|
+
`--max-pages`, `--preview`, `--base-url`, `--timeout`, `--api-key`, `--profile`.
|
|
19
|
+
- SDK-client factory: resolves config and constructs a `Curviate` instance.
|
|
20
|
+
- Lazy command loading for a fast cold start.
|
|
21
|
+
- White-label leak gate (`scripts/check-clean.mjs`) wired as `prepack`.
|
|
22
|
+
- Build-output smoke gate (`scripts/verify-dist.mjs`).
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Redmer Holding GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# @curviate/cli
|
|
2
|
+
|
|
3
|
+
Official command-line interface for the [Curviate API](https://docs.curviate.com).
|
|
4
|
+
|
|
5
|
+
Built for coding agents and power users: JSON output on pipes, structured exit codes,
|
|
6
|
+
and shell-native composition with `jq`, `xargs`, and `curl`.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
**Global install** (recommended for interactive use):
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install -g @curviate/cli
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
**One-off via npx** (no install required):
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx @curviate/cli --help
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Requires Node.js 18 or later.
|
|
23
|
+
|
|
24
|
+
## Authentication
|
|
25
|
+
|
|
26
|
+
**Option 1 — interactive login** (stores a profile in `~/.config/curviate/`):
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
curviate login
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Option 2 — environment variable** (preferred in CI and agent loops):
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
export CURVIATE_API_KEY=<your-api-key>
|
|
36
|
+
curviate account list
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Option 3 — per-command flag**:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
curviate --api-key <your-api-key> account list
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
> **Security note:** a key passed via `--api-key` is visible to other users on
|
|
46
|
+
> the machine through `ps`/process listings and is recorded in your shell
|
|
47
|
+
> history. Prefer `curviate login` or the `CURVIATE_API_KEY` environment
|
|
48
|
+
> variable; reserve `--api-key` for one-off, low-trust contexts.
|
|
49
|
+
|
|
50
|
+
Get your API key from the [Curviate dashboard](https://docs.curviate.com).
|
|
51
|
+
|
|
52
|
+
## Usage
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
curviate [command] [subcommand] [flags]
|
|
56
|
+
|
|
57
|
+
Global flags available on every command:
|
|
58
|
+
--account Target a specific account ID
|
|
59
|
+
--api-key Override the API key for this invocation
|
|
60
|
+
--profile Use a named profile from ~/.config/curviate/
|
|
61
|
+
--json Force JSON output even when stdout is a TTY
|
|
62
|
+
--fields Comma-separated list of fields to include in JSON output
|
|
63
|
+
--limit Maximum number of results to return per page
|
|
64
|
+
--cursor Pagination cursor from a previous response
|
|
65
|
+
--all Fetch all pages (streams results)
|
|
66
|
+
--max-pages Cap on the number of pages fetched with --all
|
|
67
|
+
--preview Show what would happen without sending any write request
|
|
68
|
+
--base-url Override the API base URL (for testing)
|
|
69
|
+
--timeout Request timeout in milliseconds (default: 30000)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
For full command reference see [docs.curviate.com](https://docs.curviate.com).
|
|
73
|
+
|
|
74
|
+
## Examples
|
|
75
|
+
|
|
76
|
+
These examples show how coding agents compose the CLI in real workflows.
|
|
77
|
+
|
|
78
|
+
### 1. Find people and send connection requests
|
|
79
|
+
|
|
80
|
+
Search for matching profiles, preview the invitations, then send them once satisfied:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Preview first — see who would be targeted
|
|
84
|
+
curviate search people \
|
|
85
|
+
--keywords "AI engineer" \
|
|
86
|
+
--location "Berlin" \
|
|
87
|
+
--limit 10 \
|
|
88
|
+
--preview
|
|
89
|
+
|
|
90
|
+
# Pipe IDs into connect — one request per person
|
|
91
|
+
curviate search people --keywords "AI engineer" --location "Berlin" --all \
|
|
92
|
+
| jq -r '.id' \
|
|
93
|
+
| head -5 \
|
|
94
|
+
| xargs -I{} curviate connect {} --note "Hi, I'd love to connect."
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 2. Triage the inbox and extract unread threads
|
|
98
|
+
|
|
99
|
+
Pull the inbox as JSON, filter unread chats, and surface the most recent message from each:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
curviate inbox list --json --all \
|
|
103
|
+
| jq '[.[] | select(.unread == true) | {chat_id, sender: .last_message.sender, preview: .last_message.text[0:80]}]'
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### 3. Warm up a prospect by reacting to their recent posts
|
|
107
|
+
|
|
108
|
+
Read recent posts from a profile, then react to each — useful for ambient warm-up before outreach:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
PROFILE_URL="https://www.linkedin.com/in/example"
|
|
112
|
+
|
|
113
|
+
curviate profile "$PROFILE_URL" --posts --fields post_id --json \
|
|
114
|
+
| jq -r '.[].post_id' \
|
|
115
|
+
| xargs -I{} curviate post react {} --type LIKE
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### 4. Check tier entitlement before a Sales Navigator sweep
|
|
119
|
+
|
|
120
|
+
Exit code `5` means the account lacks the required add-on. Branch on it in a script:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
curviate sales-nav search people --keywords "VP Engineering" --json \
|
|
124
|
+
|| {
|
|
125
|
+
code=$?
|
|
126
|
+
if [ "$code" -eq 5 ]; then
|
|
127
|
+
echo "Sales Navigator add-on required — upgrade at https://docs.curviate.com"
|
|
128
|
+
else
|
|
129
|
+
echo "Search failed with exit code $code"
|
|
130
|
+
exit "$code"
|
|
131
|
+
fi
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### 5. Verify an inbound webhook signature offline
|
|
136
|
+
|
|
137
|
+
Validate a webhook payload before processing it — works without a network call:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
# Pipe the raw request body from stdin; pass the signature header and secret as flags
|
|
141
|
+
cat webhook-payload.json \
|
|
142
|
+
| curviate webhook verify \
|
|
143
|
+
--secret "$CURVIATE_WEBHOOK_SECRET" \
|
|
144
|
+
--header "$CURVIATE_SIG_HEADER" \
|
|
145
|
+
--body -
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Exit `0` means the signature is valid and the parsed event is written to stdout as JSON.
|
|
149
|
+
Exit `2` means the signature is invalid or the replay window has expired.
|
|
150
|
+
|
|
151
|
+
### 6. Export all accounts to a CSV (agent-friendly pipeline)
|
|
152
|
+
|
|
153
|
+
List every connected account, select key fields, and format as CSV with `jq`:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
curviate account list --all --json \
|
|
157
|
+
| jq -r '["id","name","status"], (.[] | [.id, .name, .status]) | @csv' \
|
|
158
|
+
> accounts.csv
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Exit codes
|
|
162
|
+
|
|
163
|
+
| Code | Meaning |
|
|
164
|
+
|------|---------|
|
|
165
|
+
| 0 | Success |
|
|
166
|
+
| 1 | Unexpected error |
|
|
167
|
+
| 2 | Usage / argument error |
|
|
168
|
+
| 3 | Authentication or authorization failure |
|
|
169
|
+
| 4 | Resource not found |
|
|
170
|
+
| 5 | Feature requires an add-on or higher plan |
|
|
171
|
+
|
|
172
|
+
## License
|
|
173
|
+
|
|
174
|
+
MIT — see [LICENSE](LICENSE).
|