@opally/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.
- package/README.md +84 -0
- package/SKILL.md +1 -1
- package/dist/bin/opally.js +1 -1
- package/dist/client.js +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# @opally/cli
|
|
2
|
+
|
|
3
|
+
CLI for the [Opally API](https://opally.gitbook.io/opally-api-docs) — query guest conversations, emails, voice calls, leads, and analytics from your terminal.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @opally/cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Setup
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
opally config set-key op_live_YOUR_KEY_HERE
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Get your API key from the Opally dashboard under **Integrations > Developer > API Access**.
|
|
18
|
+
|
|
19
|
+
Or use an environment variable:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
export OPALLY_API_KEY=op_live_YOUR_KEY_HERE
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# List recent emails
|
|
29
|
+
opally emails list --limit 5
|
|
30
|
+
|
|
31
|
+
# Get email details with AI draft
|
|
32
|
+
opally emails get <id>
|
|
33
|
+
|
|
34
|
+
# List chat conversations
|
|
35
|
+
opally chats list --from 2026-03-01
|
|
36
|
+
|
|
37
|
+
# Read chat messages
|
|
38
|
+
opally chats messages <id>
|
|
39
|
+
|
|
40
|
+
# Voice call logs
|
|
41
|
+
opally voice list
|
|
42
|
+
|
|
43
|
+
# Leads
|
|
44
|
+
opally leads list --source chat
|
|
45
|
+
|
|
46
|
+
# Analytics overview
|
|
47
|
+
opally analytics overview --from 2026-03-01 --to 2026-03-31
|
|
48
|
+
|
|
49
|
+
# Time-series analytics
|
|
50
|
+
opally analytics emails --interval week --status draft_created
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
All commands support `--json` for machine-readable output.
|
|
54
|
+
|
|
55
|
+
## Commands
|
|
56
|
+
|
|
57
|
+
| Command | Description |
|
|
58
|
+
|---------|-------------|
|
|
59
|
+
| `opally emails list` | List email logs |
|
|
60
|
+
| `opally emails get <id>` | Email details with AI draft |
|
|
61
|
+
| `opally chats list` | List chat conversations |
|
|
62
|
+
| `opally chats get <id>` | Chat conversation details |
|
|
63
|
+
| `opally chats messages <id>` | Full message history |
|
|
64
|
+
| `opally voice list` | List voice calls |
|
|
65
|
+
| `opally voice get <id>` | Voice call details |
|
|
66
|
+
| `opally leads list` | List guest leads |
|
|
67
|
+
| `opally leads get <id>` | Lead details |
|
|
68
|
+
| `opally analytics overview` | High-level activity summary |
|
|
69
|
+
| `opally analytics emails` | Email metrics over time |
|
|
70
|
+
| `opally analytics chats` | Chat metrics over time |
|
|
71
|
+
| `opally analytics voice` | Voice metrics over time |
|
|
72
|
+
| `opally analytics leads` | Lead metrics over time |
|
|
73
|
+
| `opally analytics agent-actions` | Agent action metrics over time |
|
|
74
|
+
| `opally config set-key <key>` | Save API key |
|
|
75
|
+
| `opally config set-url <url>` | Set custom API base URL |
|
|
76
|
+
| `opally config show` | Show current configuration |
|
|
77
|
+
|
|
78
|
+
## Documentation
|
|
79
|
+
|
|
80
|
+
Full API documentation: [opally.gitbook.io/opally-api-docs](https://opally.gitbook.io/opally-api-docs)
|
|
81
|
+
|
|
82
|
+
## License
|
|
83
|
+
|
|
84
|
+
MIT
|
package/SKILL.md
CHANGED
|
@@ -112,7 +112,7 @@ opally analytics agent-actions [--from <date>] [--to <date>] [--interval <day|we
|
|
|
112
112
|
## Notes
|
|
113
113
|
|
|
114
114
|
- All dates are ISO 8601 format (e.g., `2026-03-01`)
|
|
115
|
-
- Date ranges are capped at
|
|
115
|
+
- Date ranges are capped at 365 days
|
|
116
116
|
- Use `--json` for machine-readable output (recommended for automated workflows)
|
|
117
117
|
- Pagination: use `--cursor` with the cursor returned from list commands
|
|
118
118
|
- Default limit is 25 results, max 100
|
package/dist/bin/opally.js
CHANGED
|
@@ -12,7 +12,7 @@ const program = new commander_1.Command();
|
|
|
12
12
|
program
|
|
13
13
|
.name("opally")
|
|
14
14
|
.description("CLI for the Opally API")
|
|
15
|
-
.version("0.1.
|
|
15
|
+
.version("0.1.2");
|
|
16
16
|
program.addCommand(config_js_1.configCommand);
|
|
17
17
|
program.addCommand(leads_js_1.leadsCommand);
|
|
18
18
|
program.addCommand(emails_js_1.emailsCommand);
|
package/dist/client.js
CHANGED
|
@@ -13,7 +13,7 @@ function validateId(id) {
|
|
|
13
13
|
}
|
|
14
14
|
async function api(path, params) {
|
|
15
15
|
const baseUrl = (0, config_js_1.getBaseUrl)();
|
|
16
|
-
const url = new URL(`/
|
|
16
|
+
const url = new URL(`/v1${path}`, baseUrl);
|
|
17
17
|
if (params) {
|
|
18
18
|
for (const [key, value] of Object.entries(params)) {
|
|
19
19
|
if (value !== undefined) {
|