reply-cli 0.1.0 → 0.1.2

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.
Files changed (2) hide show
  1. package/README.md +441 -0
  2. package/package.json +25 -1
package/README.md ADDED
@@ -0,0 +1,441 @@
1
+ <h1 align="center">Reply.io CLI</h1>
2
+
3
+ <p align="center">
4
+ Manage sequences, contacts, email accounts, and schedules — directly from your terminal.
5
+ </p>
6
+
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/reply-cli"><img src="https://img.shields.io/npm/v/reply-cli?color=black&label=npm" alt="npm version" /></a>
9
+ <img src="https://img.shields.io/badge/node-%3E%3D20-black" alt="node requirement" />
10
+ <img src="https://img.shields.io/badge/license-MIT-black" alt="license" />
11
+ </p>
12
+
13
+ ---
14
+
15
+ ## Overview
16
+
17
+ `reply-cli` is the command-line interface for [Reply.io](https://reply.io). It installs the `reply` command for managing your outreach from the terminal:
18
+
19
+ | Command | What it does |
20
+ |---|---|
21
+ | `reply sequences` | List, create, clone, start, pause, and archive outreach sequences |
22
+ | `reply sequences stats` | View per-step performance, top performers, and aggregate summary |
23
+ | `reply sequence-contacts` | Add and remove contacts from sequences |
24
+ | `reply contacts` | Create, update, delete, and search contacts with lifecycle actions |
25
+ | `reply accounts` | List connected email accounts |
26
+ | `reply schedules` | Manage sending schedules |
27
+ | `reply import` | Import contacts from CSV with column mapping |
28
+
29
+ ---
30
+
31
+ ## Table of Contents
32
+
33
+ - [Installation](#installation)
34
+ - [Quick Start](#quick-start)
35
+ - [Authentication](#authentication)
36
+ - [Commands](#commands)
37
+ - [sequences](#sequences)
38
+ - [sequences stats](#sequences-stats)
39
+ - [sequence-contacts](#sequence-contacts)
40
+ - [contacts](#contacts)
41
+ - [import](#import)
42
+ - [accounts](#accounts)
43
+ - [schedules](#schedules)
44
+ - [Output Modes](#output-modes)
45
+ - [Pipe-Friendly Usage](#pipe-friendly-usage)
46
+ - [Troubleshooting](#troubleshooting)
47
+
48
+ ---
49
+
50
+ ## Installation
51
+
52
+ > **Requires [Node.js](https://nodejs.org/) >= 20**
53
+
54
+ ```bash
55
+ npm install -g reply-cli
56
+ ```
57
+
58
+ Or run without installing:
59
+
60
+ ```bash
61
+ npx reply-cli sequences list
62
+ ```
63
+
64
+ ---
65
+
66
+ ## Quick Start
67
+
68
+ ```bash
69
+ # 1. Set your API key
70
+ export REPLY_API_KEY=your-api-key
71
+
72
+ # 2. List your sequences
73
+ reply sequences list
74
+
75
+ # 3. Create a contact
76
+ reply contacts create --email john@example.com --first-name John --company Acme
77
+
78
+ # 4. Add the contact to a sequence
79
+ reply sequence-contacts add --contact john@example.com --sequence 12345
80
+
81
+ # 5. Check sequence performance
82
+ reply sequences stats 12345
83
+
84
+ # 6. View aggregate stats
85
+ reply sequences stats --summary
86
+ ```
87
+
88
+ ---
89
+
90
+ ## Authentication
91
+
92
+ Get your API key from [Reply.io Settings > API](https://run.reply.io/Dashboard/Material#/settings/api).
93
+
94
+ ```bash
95
+ # Environment variable
96
+ export REPLY_API_KEY=your-api-key
97
+
98
+ # Or pass directly to any command
99
+ reply sequences list --api-key your-api-key
100
+
101
+ # Or put it in a .env file in your project directory
102
+ echo "REPLY_API_KEY=your-api-key" >> .env
103
+ ```
104
+
105
+ **Resolution order** (highest priority first):
106
+
107
+ ```
108
+ --api-key flag → REPLY_API_KEY env var → .env file (walks up directories)
109
+ ```
110
+
111
+ ---
112
+
113
+ ## Commands
114
+
115
+ ### `sequences`
116
+
117
+ Manage outreach sequences (campaigns).
118
+
119
+ ```bash
120
+ reply sequences list # List all sequences with stats
121
+ reply sequences get <id> # Get details and email steps
122
+ reply sequences create # Create from stdin JSON
123
+ reply sequences update <id> # Update settings from stdin JSON
124
+ reply sequences clone <id> --name "New Name" # Clone with all steps
125
+ reply sequences start <id> # Start sending emails
126
+ reply sequences pause <id> # Pause sending
127
+ reply sequences archive <id> # Archive sequence
128
+ ```
129
+
130
+ **Examples**
131
+
132
+ ```bash
133
+ # List all sequences
134
+ reply sequences list
135
+
136
+ # Get sequence details as JSON
137
+ reply sequences get 12345 --json
138
+
139
+ # Create a sequence from a config file
140
+ cat config.json | reply sequences create
141
+
142
+ # Clone a sequence
143
+ reply sequences clone 12345 --name "Q2 Outreach"
144
+
145
+ # Start a paused sequence
146
+ reply sequences start 12345
147
+ ```
148
+
149
+ **Create sequence JSON format:**
150
+
151
+ ```json
152
+ {
153
+ "name": "My Sequence",
154
+ "emailAccounts": ["sender@company.com"],
155
+ "settings": {
156
+ "emailsCountPerDay": 50,
157
+ "daysToFinishProspect": 7,
158
+ "EmailSendingDelaySeconds": 55
159
+ },
160
+ "steps": [
161
+ {
162
+ "number": "1",
163
+ "InMinutesCount": "0",
164
+ "templates": [{ "subject": "Quick question", "body": "Hi {{FirstName}}!" }]
165
+ },
166
+ {
167
+ "number": "2",
168
+ "InMinutesCount": "1440",
169
+ "templates": [{ "subject": "Following up", "body": "Hi {{FirstName}}, just checking in." }]
170
+ }
171
+ ]
172
+ }
173
+ ```
174
+
175
+ ---
176
+
177
+ ### `sequences stats`
178
+
179
+ View sequence performance statistics.
180
+
181
+ ```bash
182
+ reply sequences stats <id> # Detailed per-step stats for a sequence
183
+ reply sequences stats --top # Top 3 sequences by reply rate
184
+ reply sequences stats --summary # Aggregate performance across all sequences
185
+ ```
186
+
187
+ **Examples**
188
+
189
+ ```bash
190
+ # Per-step breakdown: sent, opens, replies, bounces, clicks
191
+ reply sequences stats 12345
192
+
193
+ # Top performers
194
+ reply sequences stats --top
195
+
196
+ # Account-wide summary as JSON
197
+ reply sequences stats --summary --json
198
+ ```
199
+
200
+ ---
201
+
202
+ ### `sequence-contacts`
203
+
204
+ Add or remove contacts from sequences.
205
+
206
+ ```bash
207
+ reply sequence-contacts add --contact <email> --sequence <id> [--force]
208
+ reply sequence-contacts add-new --contact <email> --first-name <name> --sequence <id>
209
+ reply sequence-contacts add-bulk --contacts <ids> --sequence <id> [--overwrite]
210
+ reply sequence-contacts remove --contact <email> --sequence <id>
211
+ reply sequence-contacts remove-all --contact <email>
212
+ ```
213
+
214
+ | Subcommand | What it does |
215
+ |---|---|
216
+ | `add` | Enroll an existing contact in a sequence. `--force` moves from another active sequence |
217
+ | `add-new` | Create a contact and enroll in one step |
218
+ | `add-bulk` | Enroll multiple contacts by ID (comma-separated) |
219
+ | `remove` | Remove from a specific sequence |
220
+ | `remove-all` | Remove from all sequences |
221
+
222
+ **Examples**
223
+
224
+ ```bash
225
+ # Add existing contact to sequence
226
+ reply sequence-contacts add --contact john@co.com --sequence 12345
227
+
228
+ # Create + enroll in one step
229
+ reply sequence-contacts add-new --contact jane@co.com --first-name Jane --sequence 12345
230
+
231
+ # Bulk enroll by contact IDs
232
+ reply sequence-contacts add-bulk --contacts 111,222,333 --sequence 12345
233
+
234
+ # Remove from all sequences
235
+ reply sequence-contacts remove-all --contact john@co.com
236
+ ```
237
+
238
+ ---
239
+
240
+ ### `contacts`
241
+
242
+ Manage contacts (prospects).
243
+
244
+ ```bash
245
+ reply contacts list [--page N --limit N] # Paginated contact list
246
+ reply contacts get <id|email> # Contact details
247
+ reply contacts create --email <email> --first-name <name> [options]
248
+ reply contacts update --email <email> [options]
249
+ reply contacts delete <id|email> # Delete a contact
250
+ reply contacts search --email <email> # Search by email
251
+ reply contacts search --linkedin <url> # Lookup by LinkedIn URL
252
+ reply contacts mark-replied <email> # Mark as replied in all sequences
253
+ reply contacts mark-finished <email> # Mark as finished in all sequences
254
+ reply contacts opt-out <email> # Remove from all sequences
255
+ reply contacts stats <email> # Campaign history and email activity
256
+ ```
257
+
258
+ | Flag | Description |
259
+ |---|---|
260
+ | `--email <email>` | Email address (required for create/update) |
261
+ | `--first-name <name>` | First name (required for create) |
262
+ | `--last-name <name>` | Last name |
263
+ | `--company <company>` | Company name |
264
+ | `--title <title>` | Job title |
265
+ | `--phone <phone>` | Phone number |
266
+ | `--linkedin <url>` | LinkedIn profile URL |
267
+ | `--city`, `--state`, `--country` | Location fields |
268
+ | `--custom <fields>` | Custom fields: `Key1=Val1,Key2=Val2` |
269
+
270
+ **Examples**
271
+
272
+ ```bash
273
+ # Create a contact
274
+ reply contacts create --email john@co.com --first-name John --company Acme --title CEO
275
+
276
+ # Update company
277
+ reply contacts update --email john@co.com --company "New Corp"
278
+
279
+ # View contact performance
280
+ reply contacts stats john@co.com
281
+
282
+ # Mark as finished
283
+ reply contacts mark-finished john@co.com
284
+ ```
285
+
286
+ ---
287
+
288
+ ### `import`
289
+
290
+ Import contacts from CSV files.
291
+
292
+ ```bash
293
+ reply import preview --file <path> # Preview CSV and available fields
294
+ reply import upload --file <path> --mapping <json> [opts] # Upload with column mapping
295
+ ```
296
+
297
+ | Flag | Description |
298
+ |---|---|
299
+ | `--file <path>` | Path to CSV file |
300
+ | `--mapping <json>` | JSON mapping Reply fields to CSV column names |
301
+ | `--list-id <id>` | Assign contacts to a list |
302
+ | `--overwrite` | Overwrite existing contacts |
303
+
304
+ **Examples**
305
+
306
+ ```bash
307
+ # Preview CSV structure and available Reply.io fields
308
+ reply import preview --file contacts.csv
309
+
310
+ # Upload with mapping
311
+ reply import upload \
312
+ --file contacts.csv \
313
+ --mapping '{"email":"Email Address","firstName":"First Name","company":"Company"}' \
314
+ --overwrite
315
+ ```
316
+
317
+ ---
318
+
319
+ ### `accounts`
320
+
321
+ Manage connected email accounts.
322
+
323
+ ```bash
324
+ reply accounts list # List all connected email accounts
325
+ reply accounts check # Machine-readable check (ACCOUNTS_FOUND:<n> or NO_ACCOUNTS)
326
+ ```
327
+
328
+ ---
329
+
330
+ ### `schedules`
331
+
332
+ Manage sending schedules.
333
+
334
+ ```bash
335
+ reply schedules list # List all schedules
336
+ reply schedules get <id> # Schedule details
337
+ reply schedules create # Create from stdin JSON
338
+ reply schedules delete <id> # Delete a schedule
339
+ reply schedules set-default <id> # Set as the default schedule
340
+ ```
341
+
342
+ **Examples**
343
+
344
+ ```bash
345
+ # List schedules
346
+ reply schedules list
347
+
348
+ # Create a schedule
349
+ echo '{
350
+ "name": "Business Hours",
351
+ "timezoneId": "Eastern Standard Time",
352
+ "mainTimings": [
353
+ {"weekDay":"Monday","isActive":true,"timeRanges":[{"fromTime":{"hour":9,"minute":0},"toTime":{"hour":17,"minute":0}}]},
354
+ {"weekDay":"Tuesday","isActive":true,"timeRanges":[{"fromTime":{"hour":9,"minute":0},"toTime":{"hour":17,"minute":0}}]}
355
+ ]
356
+ }' | reply schedules create
357
+
358
+ # Set as default
359
+ reply schedules set-default 12345
360
+ ```
361
+
362
+ ---
363
+
364
+ ## Output Modes
365
+
366
+ Every command supports:
367
+
368
+ | Mode | Flag | Behavior |
369
+ |---|---|---|
370
+ | Human-readable | *(default)* | Formatted table with colors |
371
+ | JSON | `--json` | Compact JSON to stdout |
372
+ | Pretty JSON | `--pretty` | Indented JSON to stdout |
373
+
374
+ ```bash
375
+ # Table output (default)
376
+ reply sequences list
377
+
378
+ # Compact JSON
379
+ reply sequences list --json
380
+
381
+ # Pretty JSON
382
+ reply sequences list --pretty
383
+ ```
384
+
385
+ ---
386
+
387
+ ## Pipe-Friendly Usage
388
+
389
+ When stdout is not a TTY, colors are automatically disabled. Errors go to `stderr`, data to `stdout`.
390
+
391
+ ```bash
392
+ # Get all sequence IDs
393
+ reply sequences list --json | jq '.[].id'
394
+
395
+ # Export contacts as JSON
396
+ reply contacts list --limit 100 --json > contacts.json
397
+
398
+ # Check if accounts exist in a script
399
+ if reply accounts check 2>/dev/null; then
400
+ echo "Accounts connected"
401
+ fi
402
+ ```
403
+
404
+ ---
405
+
406
+ ## Troubleshooting
407
+
408
+ **`REPLY_API_KEY not found`**
409
+
410
+ ```bash
411
+ export REPLY_API_KEY=your-api-key
412
+ # or
413
+ echo "REPLY_API_KEY=your-api-key" >> .env
414
+ ```
415
+
416
+ **`Invalid API key`**
417
+
418
+ Check your key at [Reply.io Settings > API](https://run.reply.io/Dashboard/Material#/settings/api).
419
+
420
+ **`Rate limit exceeded`**
421
+
422
+ Reply.io allows 15,000 API calls/month. Some endpoints (campaign list, stats) have a 10-second throttle between requests.
423
+
424
+ **`Access denied`**
425
+
426
+ You may need the owner/master API key for this operation.
427
+
428
+ ---
429
+
430
+ ## Links
431
+
432
+ - [Reply.io](https://reply.io)
433
+ - [Reply.io API Documentation](https://apidocs.reply.io)
434
+ - [API Key Settings](https://run.reply.io/Dashboard/Material#/settings/api)
435
+ - [Report an Issue](https://github.com/replyio/reply-cli/issues)
436
+
437
+ ---
438
+
439
+ <p align="center">
440
+ <sub>MIT License</sub>
441
+ </p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reply-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Command-line interface for Reply.io. Manage sequences, contacts, email accounts, and schedules from your terminal.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -17,6 +17,30 @@
17
17
  },
18
18
  "author": "Reply.io",
19
19
  "license": "MIT",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/replyio/reply-cli.git"
23
+ },
24
+ "bugs": {
25
+ "url": "https://github.com/replyio/reply-cli/issues"
26
+ },
27
+ "homepage": "https://github.com/replyio/reply-cli#readme",
28
+ "keywords": [
29
+ "reply",
30
+ "reply-io",
31
+ "replyio",
32
+ "cli",
33
+ "sales-engagement",
34
+ "outreach",
35
+ "email-automation",
36
+ "sequences",
37
+ "campaigns",
38
+ "contacts",
39
+ "cold-email",
40
+ "sales-automation",
41
+ "email-outreach",
42
+ "crm"
43
+ ],
20
44
  "engines": {
21
45
  "node": ">=20.0.0"
22
46
  },