reply-cli 0.1.2 → 0.3.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/README.md +99 -393
- package/dist/api/headers.d.ts +4 -0
- package/dist/api/headers.js +13 -0
- package/dist/api/headers.js.map +1 -0
- package/dist/auth/oauth-flow.d.ts +38 -0
- package/dist/auth/oauth-flow.js +193 -0
- package/dist/auth/oauth-flow.js.map +1 -0
- package/dist/auth/pkce.d.ts +9 -0
- package/dist/auth/pkce.js +19 -0
- package/dist/auth/pkce.js.map +1 -0
- package/dist/auth/request-identity.d.ts +16 -0
- package/dist/auth/request-identity.js +67 -0
- package/dist/auth/request-identity.js.map +1 -0
- package/dist/auth/resolve.d.ts +23 -0
- package/dist/auth/resolve.js +55 -0
- package/dist/auth/resolve.js.map +1 -0
- package/dist/auth/status.d.ts +19 -0
- package/dist/auth/status.js +27 -0
- package/dist/auth/status.js.map +1 -0
- package/dist/auth/token.d.ts +29 -0
- package/dist/auth/token.js +39 -0
- package/dist/auth/token.js.map +1 -0
- package/dist/commands/api.d.ts +19 -0
- package/dist/commands/api.js +137 -0
- package/dist/commands/api.js.map +1 -0
- package/dist/commands/auth.d.ts +21 -0
- package/dist/commands/auth.js +266 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/authed.d.ts +13 -0
- package/dist/commands/authed.js +20 -0
- package/dist/commands/authed.js.map +1 -0
- package/dist/commands/profile.d.ts +31 -0
- package/dist/commands/profile.js +348 -0
- package/dist/commands/profile.js.map +1 -0
- package/dist/commands/team.d.ts +17 -0
- package/dist/commands/team.js +146 -0
- package/dist/commands/team.js.map +1 -0
- package/dist/config.d.ts +14 -0
- package/dist/config.js +80 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +15 -0
- package/dist/context.js +17 -0
- package/dist/context.js.map +1 -0
- package/dist/credentials/file-store.d.ts +13 -0
- package/dist/credentials/file-store.js +88 -0
- package/dist/credentials/file-store.js.map +1 -0
- package/dist/credentials/types.d.ts +25 -0
- package/dist/credentials/types.js +3 -0
- package/dist/credentials/types.js.map +1 -0
- package/dist/index.js +104 -41
- package/dist/index.js.map +1 -1
- package/dist/profile.d.ts +51 -0
- package/dist/profile.js +295 -0
- package/dist/profile.js.map +1 -0
- package/dist/teams.d.ts +14 -0
- package/dist/teams.js +103 -0
- package/dist/teams.js.map +1 -0
- package/dist/utils/client.d.ts +21 -9
- package/dist/utils/client.js +136 -88
- package/dist/utils/client.js.map +1 -1
- package/dist/utils/errors.d.ts +47 -0
- package/dist/utils/errors.js +86 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/output.d.ts +7 -10
- package/dist/utils/output.js +39 -71
- package/dist/utils/output.js.map +1 -1
- package/package.json +10 -25
- package/dist/commands/accounts.d.ts +0 -6
- package/dist/commands/accounts.js +0 -62
- package/dist/commands/accounts.js.map +0 -1
- package/dist/commands/contacts.d.ts +0 -20
- package/dist/commands/contacts.js +0 -321
- package/dist/commands/contacts.js.map +0 -1
- package/dist/commands/import.d.ts +0 -6
- package/dist/commands/import.js +0 -137
- package/dist/commands/import.js.map +0 -1
- package/dist/commands/schedules.d.ts +0 -9
- package/dist/commands/schedules.js +0 -119
- package/dist/commands/schedules.js.map +0 -1
- package/dist/commands/sequence-contacts.d.ts +0 -8
- package/dist/commands/sequence-contacts.js +0 -141
- package/dist/commands/sequence-contacts.js.map +0 -1
- package/dist/commands/sequences-stats.d.ts +0 -7
- package/dist/commands/sequences-stats.js +0 -183
- package/dist/commands/sequences-stats.js.map +0 -1
- package/dist/commands/sequences.d.ts +0 -12
- package/dist/commands/sequences.js +0 -225
- package/dist/commands/sequences.js.map +0 -1
- package/dist/utils/auth.d.ts +0 -2
- package/dist/utils/auth.js +0 -33
- package/dist/utils/auth.js.map +0 -1
- package/dist/utils/command.d.ts +0 -11
- package/dist/utils/command.js +0 -20
- package/dist/utils/command.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,441 +1,147 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
---
|
|
1
|
+
# Reply CLI
|
|
2
|
+
|
|
3
|
+
`reply` is the command-line interface for [Reply.io](https://reply.io). Sign in
|
|
4
|
+
once and every Reply.io API request runs as you — from your terminal or your
|
|
5
|
+
scripts. Today it handles authentication and identity, and `reply api` gives you
|
|
6
|
+
authenticated access to the full v3 API; higher-level commands for sequences,
|
|
7
|
+
contacts, and the inbox are on the way.
|
|
49
8
|
|
|
50
9
|
## Installation
|
|
51
10
|
|
|
52
|
-
|
|
11
|
+
Requires [Node.js](https://nodejs.org) 20 or newer. The CLI is published to
|
|
12
|
+
GitHub Packages under the `@reply-team` scope, so point that scope at the
|
|
13
|
+
registry once, then install globally:
|
|
53
14
|
|
|
54
|
-
```
|
|
55
|
-
npm
|
|
15
|
+
```sh
|
|
16
|
+
echo "@reply-team:registry=https://npm.pkg.github.com" >> ~/.npmrc
|
|
17
|
+
npm install -g @reply-team/reply-cli
|
|
56
18
|
```
|
|
57
19
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
npx reply-cli sequences list
|
|
20
|
+
```sh
|
|
21
|
+
reply --version
|
|
62
22
|
```
|
|
63
23
|
|
|
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
|
|
24
|
+
## Usage
|
|
77
25
|
|
|
78
|
-
|
|
79
|
-
reply
|
|
80
|
-
|
|
81
|
-
# 5. Check sequence performance
|
|
82
|
-
reply sequences stats 12345
|
|
83
|
-
|
|
84
|
-
# 6. View aggregate stats
|
|
85
|
-
reply sequences stats --summary
|
|
26
|
+
```sh
|
|
27
|
+
reply <command> [flags]
|
|
28
|
+
reply <command> --help
|
|
86
29
|
```
|
|
87
30
|
|
|
88
|
-
|
|
31
|
+
Run `reply --help` for the full command list. Add `--json` to any command for
|
|
32
|
+
machine-readable output suitable for scripts.
|
|
89
33
|
|
|
90
34
|
## Authentication
|
|
91
35
|
|
|
92
|
-
|
|
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):
|
|
36
|
+
Log in through your browser with OAuth:
|
|
106
37
|
|
|
38
|
+
```sh
|
|
39
|
+
reply auth login
|
|
107
40
|
```
|
|
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
41
|
|
|
136
|
-
|
|
137
|
-
reply sequences get 12345 --json
|
|
42
|
+
Or store an API key, read from stdin so it never lands in your shell history:
|
|
138
43
|
|
|
139
|
-
|
|
140
|
-
|
|
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
|
-
}
|
|
44
|
+
```sh
|
|
45
|
+
reply auth login --with-token
|
|
173
46
|
```
|
|
174
47
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
### `sequences stats`
|
|
178
|
-
|
|
179
|
-
View sequence performance statistics.
|
|
48
|
+
Inspect and manage the active credential:
|
|
180
49
|
|
|
181
|
-
```
|
|
182
|
-
reply
|
|
183
|
-
reply
|
|
184
|
-
reply
|
|
50
|
+
```sh
|
|
51
|
+
reply auth status # who you're signed in as, and how — no secrets shown
|
|
52
|
+
reply auth whoami # verify the stored credential against the API
|
|
53
|
+
reply auth logout # remove the stored credential
|
|
185
54
|
```
|
|
186
55
|
|
|
187
|
-
|
|
56
|
+
Pass a key for a single command with `--api-key` or the `REPLY_API_KEY`
|
|
57
|
+
environment variable; both take precedence over a stored login and are never
|
|
58
|
+
written to disk.
|
|
188
59
|
|
|
189
|
-
|
|
190
|
-
# Per-step breakdown: sent, opens, replies, bounces, clicks
|
|
191
|
-
reply sequences stats 12345
|
|
60
|
+
## Profiles
|
|
192
61
|
|
|
193
|
-
|
|
194
|
-
|
|
62
|
+
Profiles keep more than one Reply.io account signed in at once — each stores its
|
|
63
|
+
own credential. Name them however you like; account emails work well:
|
|
195
64
|
|
|
196
|
-
|
|
197
|
-
reply
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
---
|
|
201
|
-
|
|
202
|
-
### `sequence-contacts`
|
|
65
|
+
```sh
|
|
66
|
+
reply profile add alice@reply.io
|
|
67
|
+
reply profile use alice@reply.io # make it the active profile
|
|
68
|
+
reply auth login # signs in alice@reply.io
|
|
203
69
|
|
|
204
|
-
|
|
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>
|
|
70
|
+
reply profile list # '*' marks the active profile
|
|
71
|
+
reply --profile bob@reply.io auth whoami # override for a single command
|
|
212
72
|
```
|
|
213
73
|
|
|
214
|
-
|
|
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**
|
|
74
|
+
The active profile is resolved as `--profile` → `REPLY_PROFILE` → the profile
|
|
75
|
+
set with `profile use` → the built-in default.
|
|
223
76
|
|
|
224
|
-
|
|
225
|
-
# Add existing contact to sequence
|
|
226
|
-
reply sequence-contacts add --contact john@co.com --sequence 12345
|
|
77
|
+
Manage profiles after creating them:
|
|
227
78
|
|
|
228
|
-
|
|
229
|
-
reply
|
|
230
|
-
|
|
231
|
-
#
|
|
232
|
-
reply
|
|
233
|
-
|
|
234
|
-
# Remove from all sequences
|
|
235
|
-
reply sequence-contacts remove-all --contact john@co.com
|
|
79
|
+
```sh
|
|
80
|
+
reply profile show # inspect the current profile (no secrets)
|
|
81
|
+
reply profile show alice@reply.io # inspect a specific one
|
|
82
|
+
reply profile rename alice@reply.io ally # also moves the stored credential
|
|
83
|
+
reply profile unset ally team-id # clear a field (authority|api_base|team-id)
|
|
84
|
+
reply profile delete ally # remove it and its stored credential
|
|
236
85
|
```
|
|
237
86
|
|
|
238
|
-
|
|
87
|
+
`profile show` lists the backend URLs, pinned team, and which authorization
|
|
88
|
+
would be used (in priority order: `--api-key` → `REPLY_API_KEY` → stored
|
|
89
|
+
credential) — it never prints tokens or keys. `--authority` and `--api-base`
|
|
90
|
+
must be `http(s)` URLs.
|
|
239
91
|
|
|
240
|
-
|
|
92
|
+
## Teams
|
|
241
93
|
|
|
242
|
-
|
|
94
|
+
A profile can pin a team (workspace); it's sent as `X-TEAM-ID`, with precedence
|
|
95
|
+
`--team-id` → `REPLY_TEAM_ID` → the profile's team. The `team` command sees and
|
|
96
|
+
sets the **current profile's** team:
|
|
243
97
|
|
|
244
|
-
```
|
|
245
|
-
reply
|
|
246
|
-
reply
|
|
247
|
-
reply
|
|
248
|
-
reply
|
|
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
|
|
98
|
+
```sh
|
|
99
|
+
reply team list # teams you can act in (* marks the profile's team)
|
|
100
|
+
reply team current # the profile's pinned team + the effective team (from whoami)
|
|
101
|
+
reply team use 1045 # verify 1045 is one of your teams, then pin it on the current profile
|
|
102
|
+
reply team clear # remove the pin
|
|
256
103
|
```
|
|
257
104
|
|
|
258
|
-
|
|
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**
|
|
105
|
+
If a call needs a team and you're in more than one, the API answers with a
|
|
106
|
+
`TEAM_REQUIRED` error listing your teams — run `reply team use <id>` to pin one.
|
|
271
107
|
|
|
272
|
-
|
|
273
|
-
# Create a contact
|
|
274
|
-
reply contacts create --email john@co.com --first-name John --company Acme --title CEO
|
|
108
|
+
## Raw API access
|
|
275
109
|
|
|
276
|
-
|
|
277
|
-
|
|
110
|
+
`reply api` is a raw, authenticated passthrough to any v3 endpoint — the
|
|
111
|
+
agent/CI escape hatch. See the
|
|
112
|
+
[Reply API reference](https://docs.reply.io/api-reference/introduction) for the
|
|
113
|
+
full surface.
|
|
278
114
|
|
|
279
|
-
|
|
280
|
-
|
|
115
|
+
Use the path exactly as it appears in the docs (starting with `/v3`); the query
|
|
116
|
+
string goes in the path. The request URL is literally `api_base + path`, and the
|
|
117
|
+
profile stores the host **without** `/v3`, so the call's URL matches the docs. A
|
|
118
|
+
`--body` switches the method to POST (it also accepts `@file` or `-` for stdin).
|
|
281
119
|
|
|
282
|
-
|
|
283
|
-
reply
|
|
120
|
+
```sh
|
|
121
|
+
reply api /v3/whoami # your identity + team
|
|
122
|
+
reply api /v3/sequences # list sequences
|
|
123
|
+
reply api /v3/contacts --pretty # list contacts, indented
|
|
124
|
+
reply api /v3/sequences/12345 # one sequence by id
|
|
125
|
+
reply api /v3/contacts --body @contact.json # create a contact (POST; body schema per the docs)
|
|
126
|
+
echo '<json>' | reply api /v3/contacts --body - # body from stdin
|
|
127
|
+
reply api /v3/whoami --verbose # full request/response on stderr
|
|
284
128
|
```
|
|
285
129
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
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
|
-
---
|
|
130
|
+
It prints `{ "code": <status>, "data": <body> }` and exits non-zero on HTTP
|
|
131
|
+
`>= 400`. On a team/user-resolution conflict it adds a short fix-it hint on
|
|
132
|
+
stderr. Add `--verbose` for a full request/response trace on stderr with
|
|
133
|
+
credentials redacted; stdout stays the plain JSON, so pipes keep working.
|
|
429
134
|
|
|
430
|
-
##
|
|
135
|
+
## Environment variables
|
|
431
136
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
137
|
+
| Variable | Description |
|
|
138
|
+
|----------|-------------|
|
|
139
|
+
| `REPLY_API_KEY` | API key used as the credential for the current invocation |
|
|
140
|
+
| `REPLY_PROFILE` | Profile to use (same as `--profile`) |
|
|
141
|
+
| `REPLY_TEAM_ID` | Team/workspace id sent as `X-TEAM-ID` (same as `--team-id`) |
|
|
142
|
+
| `REPLY_CONFIG_DIR` | Config directory (default `~/.config/reply`; `%APPDATA%\reply` on Windows) |
|
|
436
143
|
|
|
437
|
-
|
|
144
|
+
## Contributing
|
|
438
145
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
</p>
|
|
146
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for building from source, running the
|
|
147
|
+
tests, credential-store internals, and the release process.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HEADER_USER_EMAIL = exports.HEADER_USER_ID = exports.HEADER_TEAM_ID = void 0;
|
|
4
|
+
// Reply.io request headers, mirroring the backend's ReplyKnownHeaders. They pin
|
|
5
|
+
// the team/workspace context and, for organization API keys, identify the user
|
|
6
|
+
// the request acts on behalf of. Casing matches the backend constants verbatim.
|
|
7
|
+
const HEADER_TEAM_ID = 'X-TEAM-ID';
|
|
8
|
+
exports.HEADER_TEAM_ID = HEADER_TEAM_ID;
|
|
9
|
+
const HEADER_USER_ID = 'X-USER-ID';
|
|
10
|
+
exports.HEADER_USER_ID = HEADER_USER_ID;
|
|
11
|
+
const HEADER_USER_EMAIL = 'X-User-Email';
|
|
12
|
+
exports.HEADER_USER_EMAIL = HEADER_USER_EMAIL;
|
|
13
|
+
//# sourceMappingURL=headers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headers.js","sourceRoot":"","sources":["../../src/api/headers.ts"],"names":[],"mappings":";;;AAAA,gFAAgF;AAChF,+EAA+E;AAC/E,gFAAgF;AAChF,MAAM,cAAc,GAAG,WAAW,CAAC;AAI3B,wCAAc;AAHtB,MAAM,cAAc,GAAG,WAAW,CAAC;AAGX,wCAAc;AAFtC,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAED,8CAAiB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Oauth_record } from '../credentials/types';
|
|
2
|
+
declare const CLIENT_ID = "Reply.Cli";
|
|
3
|
+
declare const SCOPE = "openid profile email reply-web-api offline_access";
|
|
4
|
+
declare const build_authorize_url: (p: {
|
|
5
|
+
authority: string;
|
|
6
|
+
client_id: string;
|
|
7
|
+
redirect_uri: string;
|
|
8
|
+
scope: string;
|
|
9
|
+
challenge: string;
|
|
10
|
+
state: string;
|
|
11
|
+
}) => string;
|
|
12
|
+
declare const browser_open_command: (platform: NodeJS.Platform, url: string) => {
|
|
13
|
+
command: string;
|
|
14
|
+
args: string[];
|
|
15
|
+
};
|
|
16
|
+
declare const exchange_code: (p: {
|
|
17
|
+
authority: string;
|
|
18
|
+
client_id: string;
|
|
19
|
+
redirect_uri: string;
|
|
20
|
+
code: string;
|
|
21
|
+
verifier: string;
|
|
22
|
+
now?: number;
|
|
23
|
+
}) => Promise<Oauth_record>;
|
|
24
|
+
declare const refresh_stored: (p: {
|
|
25
|
+
authority: string;
|
|
26
|
+
record: Oauth_record;
|
|
27
|
+
client_id?: string;
|
|
28
|
+
now?: number;
|
|
29
|
+
}) => Promise<Oauth_record>;
|
|
30
|
+
declare const run_login: (opts: {
|
|
31
|
+
authority: string;
|
|
32
|
+
client_id?: string;
|
|
33
|
+
scope?: string;
|
|
34
|
+
open?: (url: string) => void;
|
|
35
|
+
now?: number;
|
|
36
|
+
timeout_ms?: number;
|
|
37
|
+
}) => Promise<Oauth_record>;
|
|
38
|
+
export { CLIENT_ID, SCOPE, build_authorize_url, run_login, exchange_code, refresh_stored, browser_open_command, };
|