epilot 0.1.8 → 0.1.16
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 +377 -7
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,16 +1,386 @@
|
|
|
1
|
-
|
|
1
|
+
<h1 align="center"><img alt="epilot" src="https://raw.githubusercontent.com/epilot-dev/sdk-js/main/logo.png" width="200"><br>@epilot/cli</h1>
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://github.com/epilot-dev/sdk-js/actions?query=workflow%3ACI"><img src="https://github.com/epilot-dev/sdk-js/workflows/CI/badge.svg" alt="CI"></a>
|
|
5
|
+
<a href="https://www.npmjs.com/package/@epilot/cli"><img src="https://img.shields.io/npm/v/@epilot/cli.svg" alt="npm version"></a>
|
|
6
|
+
<a href="https://github.com/epilot-dev/sdk-js/blob/main/"><img src="http://img.shields.io/:license-mit-blue.svg" alt="License"></a>
|
|
7
|
+
</p>
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
<p align="center">Command-line interface for all epilot APIs. One command to call any operation.</p>
|
|
10
|
+
|
|
11
|
+
Built for developers, automation scripts, and AI agents. The epilot CLI gives you direct access to the entire epilot platform from your terminal — no SDK setup, no boilerplate, just `npx epilot`.
|
|
12
|
+
|
|
13
|
+
- **Quick API calls** — look up entities, search data, check configurations without writing code
|
|
14
|
+
- **Automation & scripting** — pipe JSON in/out, `--json` mode for `jq`-friendly output, `--no-interactive` for CI
|
|
15
|
+
- **AI agent tool use** — structured `--json` output and `--no-interactive` mode make it ideal as a tool for LLM agents and MCP servers
|
|
16
|
+
- **Explore & discover** — interactive operation picker, `--guided` mode, and built-in help with sample requests/responses for every operation
|
|
17
|
+
|
|
18
|
+
## Install
|
|
6
19
|
|
|
7
20
|
```bash
|
|
8
|
-
# Run directly
|
|
21
|
+
# Run directly (no install needed)
|
|
9
22
|
npx epilot --help
|
|
10
23
|
|
|
11
24
|
# Or install globally
|
|
12
|
-
npm install -g epilot
|
|
13
|
-
|
|
25
|
+
npm install -g @epilot/cli
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
<!-- usage-help -->
|
|
14
31
|
```
|
|
32
|
+
epilot v0.1.9 — CLI for epilot APIs
|
|
33
|
+
|
|
34
|
+
USAGE
|
|
35
|
+
epilot <api> <operationId> [params...] [flags]
|
|
36
|
+
epilot <api> List operations for an API
|
|
37
|
+
epilot <api> <op> --help Show operation details
|
|
38
|
+
|
|
39
|
+
FLAGS
|
|
40
|
+
-t, --token <token> Bearer token for authentication
|
|
41
|
+
--profile <name> Use a named profile (or EPILOT_PROFILE)
|
|
42
|
+
-s, --server <url> Override server base URL
|
|
43
|
+
--json Output raw JSON (no formatting)
|
|
44
|
+
-v, --verbose Verbose output (show request details)
|
|
45
|
+
--jsonata <expr> JSONata expression to transform response
|
|
46
|
+
--guided Prompt for all parameters interactively
|
|
47
|
+
--no-interactive Disable interactive prompts
|
|
48
|
+
|
|
49
|
+
PARAMETER FLAGS
|
|
50
|
+
-p key=value Set a named parameter
|
|
51
|
+
-d '{...}' Request body JSON
|
|
52
|
+
-H 'Key: Value' Custom header
|
|
53
|
+
-i, --include Include response headers in output
|
|
54
|
+
|
|
55
|
+
COMMANDS
|
|
56
|
+
auth login Authenticate with epilot (browser)
|
|
57
|
+
auth token Store an API token directly
|
|
58
|
+
auth status Show authentication status
|
|
59
|
+
auth logout Remove stored credentials
|
|
60
|
+
profile Manage named profiles
|
|
61
|
+
completion Generate shell completion scripts
|
|
62
|
+
|
|
63
|
+
APIs
|
|
64
|
+
access-token Access Token API
|
|
65
|
+
address Address API
|
|
66
|
+
address-suggestions Address Suggestions API
|
|
67
|
+
ai-agents AI Agents API - OpenAPI 3.0
|
|
68
|
+
app App API
|
|
69
|
+
audit-logs Audit Log
|
|
70
|
+
automation Automation API
|
|
71
|
+
billing Billing API
|
|
72
|
+
blueprint-manifest Blueprint Manifest API
|
|
73
|
+
consent Consent API
|
|
74
|
+
customer-portal Portal API
|
|
75
|
+
dashboard Dashboard API
|
|
76
|
+
data-governance Data Governance API
|
|
77
|
+
deduplication Deduplication API
|
|
78
|
+
design Design Builder API v2
|
|
79
|
+
document Document API
|
|
80
|
+
email-settings Messaging Settings API
|
|
81
|
+
email-template Email template API
|
|
82
|
+
entity Entity API
|
|
83
|
+
entity-mapping Entity Mapping API
|
|
84
|
+
environments Environments API
|
|
85
|
+
erp-integration ERP Integration API
|
|
86
|
+
event-catalog Event Catalog API
|
|
87
|
+
file File API
|
|
88
|
+
iban Iban API
|
|
89
|
+
journey Journey API
|
|
90
|
+
kanban Kanban API
|
|
91
|
+
message Message API
|
|
92
|
+
metering Metering API
|
|
93
|
+
notes Notes API
|
|
94
|
+
notification Notification API
|
|
95
|
+
organization Organization API
|
|
96
|
+
partner-directory Partner API
|
|
97
|
+
permissions Permissions API
|
|
98
|
+
pricing Pricing API
|
|
99
|
+
pricing-tier Pricing Tier API
|
|
100
|
+
purpose Purpose API
|
|
101
|
+
sandbox Sandbox API
|
|
102
|
+
submission Submission API
|
|
103
|
+
targeting Targeting API
|
|
104
|
+
template-variables Template Variables API
|
|
105
|
+
user User API
|
|
106
|
+
validation-rules Validation Rules API
|
|
107
|
+
webhooks Webhooks
|
|
108
|
+
workflow Workflows Executions
|
|
109
|
+
workflow-definition Workflows Definitions
|
|
110
|
+
|
|
111
|
+
EXAMPLES
|
|
112
|
+
$ epilot auth login
|
|
113
|
+
$ epilot user getMeV2
|
|
114
|
+
$ epilot entity getEntity contact abc123
|
|
115
|
+
$ epilot entity searchEntities -d '{"q":"*"}'
|
|
116
|
+
$ epilot entity searchEntities --jsonata 'results[0]._title'
|
|
117
|
+
$ echo '{"q":"*"}' | epilot entity searchEntities
|
|
118
|
+
|
|
119
|
+
Run epilot <api> to list available operations.
|
|
120
|
+
Run epilot <api> <operationId> --help for operation details.
|
|
121
|
+
```
|
|
122
|
+
<!-- /usage-help -->
|
|
123
|
+
|
|
124
|
+
## Authentication
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# Browser-based login (opens epilot portal)
|
|
128
|
+
epilot auth login
|
|
129
|
+
|
|
130
|
+
# Manual token
|
|
131
|
+
epilot auth login --token <your-token>
|
|
132
|
+
|
|
133
|
+
# Or pass token per-command
|
|
134
|
+
epilot entity listSchemas --token <your-token>
|
|
135
|
+
|
|
136
|
+
# Or via environment variable
|
|
137
|
+
EPILOT_TOKEN=<your-token> epilot entity listSchemas
|
|
138
|
+
|
|
139
|
+
# Check auth status
|
|
140
|
+
epilot auth status
|
|
141
|
+
|
|
142
|
+
# Logout
|
|
143
|
+
epilot auth logout
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Token resolution order:
|
|
147
|
+
1. `--token` flag
|
|
148
|
+
2. `EPILOT_TOKEN` environment variable
|
|
149
|
+
3. Active profile token
|
|
150
|
+
4. Stored credentials (`~/.config/epilot/credentials.json`)
|
|
151
|
+
5. Interactive prompt (if TTY)
|
|
152
|
+
|
|
153
|
+
## Profiles
|
|
154
|
+
|
|
155
|
+
Manage multiple environments (like AWS CLI profiles):
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# Create profiles for different environments
|
|
159
|
+
epilot profile create dev --server https://entity.dev.sls.epilot.io --token <dev-token>
|
|
160
|
+
epilot profile create staging --server https://entity.staging.sls.epilot.io --token <staging-token>
|
|
161
|
+
epilot profile create prod --token <prod-token>
|
|
162
|
+
|
|
163
|
+
# Switch active profile
|
|
164
|
+
epilot profile use dev
|
|
165
|
+
|
|
166
|
+
# Or use per-command
|
|
167
|
+
epilot entity listSchemas --profile staging
|
|
168
|
+
|
|
169
|
+
# Or via environment variable
|
|
170
|
+
EPILOT_PROFILE=dev epilot entity listSchemas
|
|
171
|
+
|
|
172
|
+
# List profiles
|
|
173
|
+
epilot profile list
|
|
174
|
+
|
|
175
|
+
# Show profile details
|
|
176
|
+
epilot profile show dev
|
|
177
|
+
|
|
178
|
+
# Delete a profile
|
|
179
|
+
epilot profile delete dev
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Profiles store server URL, auth token, org ID, and custom headers in `~/.config/epilot/profiles.json`.
|
|
183
|
+
|
|
184
|
+
## Parameters
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# Named parameters with -p
|
|
188
|
+
epilot entity getEntity -p slug=contact -p id=abc123
|
|
189
|
+
|
|
190
|
+
# Positional args map to path parameters in order
|
|
191
|
+
epilot entity getEntity contact abc123
|
|
192
|
+
|
|
193
|
+
# Query parameters
|
|
194
|
+
epilot entity listSchemas -p unpublished=true
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Request Body
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
# Inline JSON with -d
|
|
201
|
+
epilot entity createEntity -p slug=contact -d '{"first_name":"John","last_name":"Doe"}'
|
|
202
|
+
|
|
203
|
+
# Pipe from file
|
|
204
|
+
cat entity.json | epilot entity createEntity -p slug=contact
|
|
205
|
+
|
|
206
|
+
# Pipe from another command
|
|
207
|
+
echo '{"q":"*"}' | epilot entity searchEntities
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## Response Formatting
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
# Pretty-printed JSON (default in TTY)
|
|
214
|
+
epilot entity getEntity contact abc123
|
|
15
215
|
|
|
16
|
-
|
|
216
|
+
# Raw JSON (for piping)
|
|
217
|
+
epilot entity getEntity contact abc123 --json
|
|
218
|
+
|
|
219
|
+
# Include response headers
|
|
220
|
+
epilot entity getEntity contact abc123 --include
|
|
221
|
+
|
|
222
|
+
# Verbose (show request details)
|
|
223
|
+
epilot entity getEntity contact abc123 --verbose
|
|
224
|
+
|
|
225
|
+
# JSONata transformation
|
|
226
|
+
epilot entity searchEntities -d '{"q":"*"}' --jsonata 'results[0]._title'
|
|
227
|
+
epilot user getMeV2 --jsonata 'email'
|
|
228
|
+
epilot entity listSchemas --jsonata 'results.slug'
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## Server Override
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
# Use a custom server URL
|
|
235
|
+
epilot entity listSchemas --server http://localhost:3000
|
|
236
|
+
|
|
237
|
+
# Or set it in a profile
|
|
238
|
+
epilot profile create local --server http://localhost:3000
|
|
239
|
+
epilot profile use local
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## OpenAPI Spec Override
|
|
243
|
+
|
|
244
|
+
For unreleased API features, override the bundled OpenAPI spec:
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
# From a local file
|
|
248
|
+
epilot entity getEntity -p slug=contact -p id=abc --definition ./my-spec.json
|
|
249
|
+
|
|
250
|
+
# From a URL
|
|
251
|
+
epilot entity getEntity --definition https://example.com/openapi.json
|
|
252
|
+
|
|
253
|
+
# Or place in .epilot/overrides/
|
|
254
|
+
mkdir -p .epilot/overrides
|
|
255
|
+
cp my-entity-spec.json .epilot/overrides/entity.json
|
|
256
|
+
epilot entity getEntity contact abc123 # automatically uses override
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## Interactive Mode
|
|
260
|
+
|
|
261
|
+
When running in a TTY without required arguments, the CLI prompts interactively:
|
|
262
|
+
|
|
263
|
+
- **No operation**: shows a searchable operation picker
|
|
264
|
+
- **Missing required params**: prompts for each one
|
|
265
|
+
- **No auth token**: prompts to paste a token
|
|
266
|
+
|
|
267
|
+
Disable with `--no-interactive` for CI/scripts.
|
|
268
|
+
|
|
269
|
+
### Guided Mode
|
|
270
|
+
|
|
271
|
+
Use `--guided` to be prompted for **all** parameters, not just required ones. This is useful for exploring an API operation without having to look up every available parameter.
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
# Walk through all parameters for getEntity
|
|
275
|
+
epilot entity getEntity --guided
|
|
276
|
+
|
|
277
|
+
# Guided mode also opens the body editor for operations with a request body
|
|
278
|
+
epilot entity searchEntities --guided
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Each optional parameter shows "(optional, press Enter to skip)" so you can quickly skip ones you don't need.
|
|
282
|
+
|
|
283
|
+
## Shell Completions
|
|
284
|
+
|
|
285
|
+
Tab completion for API names, operation IDs, and flags.
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
# Auto-install for your current shell
|
|
289
|
+
epilot completion --install
|
|
290
|
+
|
|
291
|
+
# Or install for a specific shell
|
|
292
|
+
epilot completion --install bash
|
|
293
|
+
epilot completion --install zsh
|
|
294
|
+
epilot completion --install fish
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
This adds the completion script to your shell config (`~/.bashrc`, `~/.zshrc`, or `~/.config/fish/completions/epilot.fish`). Restart your shell or source the config file to activate.
|
|
298
|
+
|
|
299
|
+
You can also set up completions manually:
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
# Bash — add to ~/.bashrc
|
|
303
|
+
eval "$(epilot completion bash)"
|
|
304
|
+
|
|
305
|
+
# Zsh — add to ~/.zshrc
|
|
306
|
+
eval "$(epilot completion zsh)"
|
|
307
|
+
|
|
308
|
+
# Fish — save to completions dir
|
|
309
|
+
epilot completion fish > ~/.config/fish/completions/epilot.fish
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
## API Reference
|
|
313
|
+
|
|
314
|
+
Full documentation with sample calls and responses for all APIs:
|
|
315
|
+
|
|
316
|
+
[**docs/index.md**](./docs/index.md)
|
|
317
|
+
|
|
318
|
+
<!-- api-reference-table -->
|
|
319
|
+
| API | Command | Docs |
|
|
320
|
+
| --- | ------- | ---- |
|
|
321
|
+
| Access Token API | `epilot access-token` | [docs](./docs/access-token.md) |
|
|
322
|
+
| Address API | `epilot address` | [docs](./docs/address.md) |
|
|
323
|
+
| Address Suggestions API | `epilot address-suggestions` | [docs](./docs/address-suggestions.md) |
|
|
324
|
+
| AI Agents API - OpenAPI 3.0 | `epilot ai-agents` | [docs](./docs/ai-agents.md) |
|
|
325
|
+
| App API | `epilot app` | [docs](./docs/app.md) |
|
|
326
|
+
| Audit Log | `epilot audit-logs` | [docs](./docs/audit-logs.md) |
|
|
327
|
+
| Automation API | `epilot automation` | [docs](./docs/automation.md) |
|
|
328
|
+
| Billing API | `epilot billing` | [docs](./docs/billing.md) |
|
|
329
|
+
| Blueprint Manifest API | `epilot blueprint-manifest` | [docs](./docs/blueprint-manifest.md) |
|
|
330
|
+
| Consent API | `epilot consent` | [docs](./docs/consent.md) |
|
|
331
|
+
| Portal API | `epilot customer-portal` | [docs](./docs/customer-portal.md) |
|
|
332
|
+
| Dashboard API | `epilot dashboard` | [docs](./docs/dashboard.md) |
|
|
333
|
+
| Data Governance API | `epilot data-governance` | [docs](./docs/data-governance.md) |
|
|
334
|
+
| Deduplication API | `epilot deduplication` | [docs](./docs/deduplication.md) |
|
|
335
|
+
| Design Builder API v2 | `epilot design` | [docs](./docs/design.md) |
|
|
336
|
+
| Document API | `epilot document` | [docs](./docs/document.md) |
|
|
337
|
+
| Messaging Settings API | `epilot email-settings` | [docs](./docs/email-settings.md) |
|
|
338
|
+
| Email template API | `epilot email-template` | [docs](./docs/email-template.md) |
|
|
339
|
+
| Entity API | `epilot entity` | [docs](./docs/entity.md) |
|
|
340
|
+
| Entity Mapping API | `epilot entity-mapping` | [docs](./docs/entity-mapping.md) |
|
|
341
|
+
| Environments API | `epilot environments` | [docs](./docs/environments.md) |
|
|
342
|
+
| ERP Integration API | `epilot erp-integration` | [docs](./docs/erp-integration.md) |
|
|
343
|
+
| Event Catalog API | `epilot event-catalog` | [docs](./docs/event-catalog.md) |
|
|
344
|
+
| File API | `epilot file` | [docs](./docs/file.md) |
|
|
345
|
+
| Iban API | `epilot iban` | [docs](./docs/iban.md) |
|
|
346
|
+
| Journey API | `epilot journey` | [docs](./docs/journey.md) |
|
|
347
|
+
| Kanban API | `epilot kanban` | [docs](./docs/kanban.md) |
|
|
348
|
+
| Message API | `epilot message` | [docs](./docs/message.md) |
|
|
349
|
+
| Metering API | `epilot metering` | [docs](./docs/metering.md) |
|
|
350
|
+
| Notes API | `epilot notes` | [docs](./docs/notes.md) |
|
|
351
|
+
| Notification API | `epilot notification` | [docs](./docs/notification.md) |
|
|
352
|
+
| Organization API | `epilot organization` | [docs](./docs/organization.md) |
|
|
353
|
+
| Partner API | `epilot partner-directory` | [docs](./docs/partner-directory.md) |
|
|
354
|
+
| Permissions API | `epilot permissions` | [docs](./docs/permissions.md) |
|
|
355
|
+
| Pricing API | `epilot pricing` | [docs](./docs/pricing.md) |
|
|
356
|
+
| Pricing Tier API | `epilot pricing-tier` | [docs](./docs/pricing-tier.md) |
|
|
357
|
+
| Purpose API | `epilot purpose` | [docs](./docs/purpose.md) |
|
|
358
|
+
| Sandbox API | `epilot sandbox` | [docs](./docs/sandbox.md) |
|
|
359
|
+
| Submission API | `epilot submission` | [docs](./docs/submission.md) |
|
|
360
|
+
| Targeting API | `epilot targeting` | [docs](./docs/targeting.md) |
|
|
361
|
+
| Template Variables API | `epilot template-variables` | [docs](./docs/template-variables.md) |
|
|
362
|
+
| User API | `epilot user` | [docs](./docs/user.md) |
|
|
363
|
+
| Validation Rules API | `epilot validation-rules` | [docs](./docs/validation-rules.md) |
|
|
364
|
+
| Webhooks | `epilot webhooks` | [docs](./docs/webhooks.md) |
|
|
365
|
+
| Workflows Executions | `epilot workflow` | [docs](./docs/workflow.md) |
|
|
366
|
+
| Workflows Definitions | `epilot workflow-definition` | [docs](./docs/workflow-definition.md) |
|
|
367
|
+
<!-- /api-reference-table -->
|
|
368
|
+
|
|
369
|
+
## Development
|
|
370
|
+
|
|
371
|
+
```bash
|
|
372
|
+
# Install dependencies
|
|
373
|
+
pnpm install
|
|
374
|
+
|
|
375
|
+
# Generate API commands + definitions + docs from client specs
|
|
376
|
+
pnpm generate
|
|
377
|
+
|
|
378
|
+
# Run in dev mode
|
|
379
|
+
pnpm dev -- entity listSchemas
|
|
380
|
+
|
|
381
|
+
# Build
|
|
382
|
+
pnpm build
|
|
383
|
+
|
|
384
|
+
# Run tests
|
|
385
|
+
pnpm test
|
|
386
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "epilot",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "CLI for epilot APIs (wrapper for @epilot/cli)",
|
|
5
5
|
"bin": {
|
|
6
6
|
"epilot": "./bin/epilot.js"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"url": "https://github.com/epilot-dev/sdk-js/issues"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@epilot/cli": "
|
|
26
|
+
"@epilot/cli": "^0.1.16"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
29
|
"node": ">=18"
|