@epilot/cli 0.1.8 → 0.1.9
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 +31 -4
- package/dist/{access-token-ZDNEKP3G.js → access-token-PTTCRMGK.js} +1 -1
- package/dist/{address-2SW3VMN3.js → address-2FDPEPR6.js} +1 -1
- package/dist/{address-suggestions-26ZRCECN.js → address-suggestions-XBEK5DDQ.js} +1 -1
- package/dist/{ai-agents-PDOHJ7VB.js → ai-agents-ZY5BNVTN.js} +1 -1
- package/dist/{app-XJNMGPZO.js → app-IT5FWGUK.js} +1 -1
- package/dist/{audit-logs-L2OCFRGO.js → audit-logs-FB4TE4TI.js} +1 -1
- package/dist/{automation-UB7OFM4Q.js → automation-JE5LDKJM.js} +1 -1
- package/dist/{billing-ZXHTBUAP.js → billing-GOFCP5T3.js} +1 -1
- package/dist/bin/epilot.js +49 -49
- package/dist/{blueprint-manifest-RMKS5EQA.js → blueprint-manifest-WJIQKFYK.js} +1 -1
- package/dist/{chunk-HWUVFZIB.js → chunk-P5IZZW4Y.js} +11 -7
- package/dist/{consent-AQ2DKCDR.js → consent-DSMWWHUL.js} +1 -1
- package/dist/{customer-portal-CGP4ZX4R.js → customer-portal-IJYTJYUZ.js} +1 -1
- package/dist/{dashboard-IDWUGNZW.js → dashboard-DOAX6XDG.js} +1 -1
- package/dist/{data-management-U7ZRAGLQ.js → data-management-C4JPPUPD.js} +1 -1
- package/dist/{deduplication-QQUSPXAF.js → deduplication-7OGLZLAC.js} +1 -1
- package/dist/{design-PQ2FUC2D.js → design-3CAYTWFY.js} +1 -1
- package/dist/{document-Y76RC3MP.js → document-NT5JOJQV.js} +1 -1
- package/dist/{email-settings-XM3ADDAU.js → email-settings-2M3WJTQS.js} +1 -1
- package/dist/{email-template-72P5GBEO.js → email-template-F4PLBPPC.js} +1 -1
- package/dist/{entity-XHM54EGF.js → entity-32LKMZAU.js} +1 -1
- package/dist/{entity-mapping-L5QITA2E.js → entity-mapping-OBCZDYQJ.js} +1 -1
- package/dist/{environments-VW3SQQ6D.js → environments-H3TBCDQE.js} +1 -1
- package/dist/{erp-integration-XCFKHGOU.js → erp-integration-UW6H55EK.js} +1 -1
- package/dist/{event-catalog-XZ233C2K.js → event-catalog-NVAPTZ4M.js} +1 -1
- package/dist/{file-TYBZ6WUC.js → file-US2HR4SV.js} +1 -1
- package/dist/{iban-IEGS2B6M.js → iban-7QUCOULB.js} +1 -1
- package/dist/{journey-HY3MNAHS.js → journey-E5T4BZZX.js} +1 -1
- package/dist/{kanban-7RLHAPAB.js → kanban-7UHU5VE6.js} +1 -1
- package/dist/{message-K7E26IZC.js → message-7KY33RJE.js} +1 -1
- package/dist/{metering-2OGVZIBR.js → metering-P7BZGMY7.js} +1 -1
- package/dist/{notes-KQVLCMGP.js → notes-TNJ7FPA3.js} +1 -1
- package/dist/{notification-BFBWDPZV.js → notification-6KXEFVO5.js} +1 -1
- package/dist/{organization-LI7FM5BQ.js → organization-FF4Y3PBO.js} +1 -1
- package/dist/{partner-directory-XPAISFGT.js → partner-directory-VH2SBAS2.js} +1 -1
- package/dist/{permissions-R5A4XMTY.js → permissions-KENZ4HNY.js} +1 -1
- package/dist/{pricing-Y4T6VKYN.js → pricing-P6QZ77VJ.js} +1 -1
- package/dist/{pricing-tier-HWKSYSVR.js → pricing-tier-2IRJMTM6.js} +1 -1
- package/dist/{purpose-5AUHF3IO.js → purpose-IHROR6LQ.js} +1 -1
- package/dist/{sandbox-QSGFCXMZ.js → sandbox-62XQPOU6.js} +1 -1
- package/dist/{submission-Z73M4XKQ.js → submission-PUWGOYQB.js} +1 -1
- package/dist/{targeting-U5YIFO6Q.js → targeting-QB3DFYNI.js} +1 -1
- package/dist/{template-variables-AV4T4OL2.js → template-variables-IPKRUJ4E.js} +1 -1
- package/dist/{upgrade-2SY2XG5S.js → upgrade-KDDTJRUC.js} +1 -1
- package/dist/{user-S7XP7EFG.js → user-2CP75TFC.js} +1 -1
- package/dist/{validation-rules-MJRLZCHT.js → validation-rules-GNI4EEG5.js} +1 -1
- package/dist/{webhooks-X2VR5SVC.js → webhooks-2OWUX7UL.js} +1 -1
- package/dist/{workflow-EGOFLIKI.js → workflow-WSLERVJI.js} +1 -1
- package/dist/{workflow-definition-65ZR33O5.js → workflow-definition-FP3WKHGG.js} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
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>
|
|
8
|
+
|
|
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
|
|
4
17
|
|
|
5
18
|
## Install
|
|
6
19
|
|
|
@@ -16,7 +29,7 @@ npm install -g @epilot/cli
|
|
|
16
29
|
|
|
17
30
|
<!-- usage-help -->
|
|
18
31
|
```
|
|
19
|
-
epilot v0.1.
|
|
32
|
+
epilot v0.1.9 — CLI for epilot APIs
|
|
20
33
|
|
|
21
34
|
USAGE
|
|
22
35
|
epilot <api> <operationId> [params...] [flags]
|
|
@@ -247,12 +260,26 @@ epilot entity getEntity contact abc123 # automatically uses override
|
|
|
247
260
|
|
|
248
261
|
When running in a TTY without required arguments, the CLI prompts interactively:
|
|
249
262
|
|
|
250
|
-
- **No operation**: shows
|
|
263
|
+
- **No operation**: shows a searchable operation picker
|
|
251
264
|
- **Missing required params**: prompts for each one
|
|
252
265
|
- **No auth token**: prompts to paste a token
|
|
253
266
|
|
|
254
267
|
Disable with `--no-interactive` for CI/scripts.
|
|
255
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
|
+
|
|
256
283
|
## Shell Completions
|
|
257
284
|
|
|
258
285
|
Tab completion for API names, operation IDs, and flags.
|
package/dist/bin/epilot.js
CHANGED
|
@@ -11,7 +11,7 @@ import { defineCommand } from "citty";
|
|
|
11
11
|
var main = defineCommand({
|
|
12
12
|
meta: {
|
|
13
13
|
name: "epilot",
|
|
14
|
-
version: "0.1.
|
|
14
|
+
version: "0.1.9",
|
|
15
15
|
description: "CLI for epilot APIs"
|
|
16
16
|
},
|
|
17
17
|
args: {
|
|
@@ -28,53 +28,53 @@ var main = defineCommand({
|
|
|
28
28
|
auth: () => import("../auth-AAF6Z5WZ.js").then((m) => m.default),
|
|
29
29
|
profile: () => import("../profile-EK4HSQ57.js").then((m) => m.default),
|
|
30
30
|
completion: () => import("../completion-EKFXGPNK.js").then((m) => m.default),
|
|
31
|
-
upgrade: () => import("../upgrade-
|
|
32
|
-
"access-token": () => import("../access-token-
|
|
33
|
-
address: () => import("../address-
|
|
34
|
-
"address-suggestions": () => import("../address-suggestions-
|
|
35
|
-
"ai-agents": () => import("../ai-agents-
|
|
36
|
-
app: () => import("../app-
|
|
37
|
-
"audit-logs": () => import("../audit-logs-
|
|
38
|
-
automation: () => import("../automation-
|
|
39
|
-
billing: () => import("../billing-
|
|
40
|
-
"blueprint-manifest": () => import("../blueprint-manifest-
|
|
41
|
-
consent: () => import("../consent-
|
|
42
|
-
"customer-portal": () => import("../customer-portal-
|
|
43
|
-
dashboard: () => import("../dashboard-
|
|
44
|
-
"data-management": () => import("../data-management-
|
|
45
|
-
deduplication: () => import("../deduplication-
|
|
46
|
-
design: () => import("../design-
|
|
47
|
-
document: () => import("../document-
|
|
48
|
-
"email-settings": () => import("../email-settings-
|
|
49
|
-
"email-template": () => import("../email-template-
|
|
50
|
-
entity: () => import("../entity-
|
|
51
|
-
"entity-mapping": () => import("../entity-mapping-
|
|
52
|
-
environments: () => import("../environments-
|
|
53
|
-
"erp-integration": () => import("../erp-integration-
|
|
54
|
-
"event-catalog": () => import("../event-catalog-
|
|
55
|
-
file: () => import("../file-
|
|
56
|
-
iban: () => import("../iban-
|
|
57
|
-
journey: () => import("../journey-
|
|
58
|
-
kanban: () => import("../kanban-
|
|
59
|
-
message: () => import("../message-
|
|
60
|
-
metering: () => import("../metering-
|
|
61
|
-
notes: () => import("../notes-
|
|
62
|
-
notification: () => import("../notification-
|
|
63
|
-
organization: () => import("../organization-
|
|
64
|
-
"partner-directory": () => import("../partner-directory-
|
|
65
|
-
permissions: () => import("../permissions-
|
|
66
|
-
pricing: () => import("../pricing-
|
|
67
|
-
"pricing-tier": () => import("../pricing-tier-
|
|
68
|
-
purpose: () => import("../purpose-
|
|
69
|
-
sandbox: () => import("../sandbox-
|
|
70
|
-
submission: () => import("../submission-
|
|
71
|
-
targeting: () => import("../targeting-
|
|
72
|
-
"template-variables": () => import("../template-variables-
|
|
73
|
-
user: () => import("../user-
|
|
74
|
-
"validation-rules": () => import("../validation-rules-
|
|
75
|
-
webhooks: () => import("../webhooks-
|
|
76
|
-
workflow: () => import("../workflow-
|
|
77
|
-
"workflow-definition": () => import("../workflow-definition-
|
|
31
|
+
upgrade: () => import("../upgrade-KDDTJRUC.js").then((m) => m.default),
|
|
32
|
+
"access-token": () => import("../access-token-PTTCRMGK.js").then((m) => m.default),
|
|
33
|
+
address: () => import("../address-2FDPEPR6.js").then((m) => m.default),
|
|
34
|
+
"address-suggestions": () => import("../address-suggestions-XBEK5DDQ.js").then((m) => m.default),
|
|
35
|
+
"ai-agents": () => import("../ai-agents-ZY5BNVTN.js").then((m) => m.default),
|
|
36
|
+
app: () => import("../app-IT5FWGUK.js").then((m) => m.default),
|
|
37
|
+
"audit-logs": () => import("../audit-logs-FB4TE4TI.js").then((m) => m.default),
|
|
38
|
+
automation: () => import("../automation-JE5LDKJM.js").then((m) => m.default),
|
|
39
|
+
billing: () => import("../billing-GOFCP5T3.js").then((m) => m.default),
|
|
40
|
+
"blueprint-manifest": () => import("../blueprint-manifest-WJIQKFYK.js").then((m) => m.default),
|
|
41
|
+
consent: () => import("../consent-DSMWWHUL.js").then((m) => m.default),
|
|
42
|
+
"customer-portal": () => import("../customer-portal-IJYTJYUZ.js").then((m) => m.default),
|
|
43
|
+
dashboard: () => import("../dashboard-DOAX6XDG.js").then((m) => m.default),
|
|
44
|
+
"data-management": () => import("../data-management-C4JPPUPD.js").then((m) => m.default),
|
|
45
|
+
deduplication: () => import("../deduplication-7OGLZLAC.js").then((m) => m.default),
|
|
46
|
+
design: () => import("../design-3CAYTWFY.js").then((m) => m.default),
|
|
47
|
+
document: () => import("../document-NT5JOJQV.js").then((m) => m.default),
|
|
48
|
+
"email-settings": () => import("../email-settings-2M3WJTQS.js").then((m) => m.default),
|
|
49
|
+
"email-template": () => import("../email-template-F4PLBPPC.js").then((m) => m.default),
|
|
50
|
+
entity: () => import("../entity-32LKMZAU.js").then((m) => m.default),
|
|
51
|
+
"entity-mapping": () => import("../entity-mapping-OBCZDYQJ.js").then((m) => m.default),
|
|
52
|
+
environments: () => import("../environments-H3TBCDQE.js").then((m) => m.default),
|
|
53
|
+
"erp-integration": () => import("../erp-integration-UW6H55EK.js").then((m) => m.default),
|
|
54
|
+
"event-catalog": () => import("../event-catalog-NVAPTZ4M.js").then((m) => m.default),
|
|
55
|
+
file: () => import("../file-US2HR4SV.js").then((m) => m.default),
|
|
56
|
+
iban: () => import("../iban-7QUCOULB.js").then((m) => m.default),
|
|
57
|
+
journey: () => import("../journey-E5T4BZZX.js").then((m) => m.default),
|
|
58
|
+
kanban: () => import("../kanban-7UHU5VE6.js").then((m) => m.default),
|
|
59
|
+
message: () => import("../message-7KY33RJE.js").then((m) => m.default),
|
|
60
|
+
metering: () => import("../metering-P7BZGMY7.js").then((m) => m.default),
|
|
61
|
+
notes: () => import("../notes-TNJ7FPA3.js").then((m) => m.default),
|
|
62
|
+
notification: () => import("../notification-6KXEFVO5.js").then((m) => m.default),
|
|
63
|
+
organization: () => import("../organization-FF4Y3PBO.js").then((m) => m.default),
|
|
64
|
+
"partner-directory": () => import("../partner-directory-VH2SBAS2.js").then((m) => m.default),
|
|
65
|
+
permissions: () => import("../permissions-KENZ4HNY.js").then((m) => m.default),
|
|
66
|
+
pricing: () => import("../pricing-P6QZ77VJ.js").then((m) => m.default),
|
|
67
|
+
"pricing-tier": () => import("../pricing-tier-2IRJMTM6.js").then((m) => m.default),
|
|
68
|
+
purpose: () => import("../purpose-IHROR6LQ.js").then((m) => m.default),
|
|
69
|
+
sandbox: () => import("../sandbox-62XQPOU6.js").then((m) => m.default),
|
|
70
|
+
submission: () => import("../submission-PUWGOYQB.js").then((m) => m.default),
|
|
71
|
+
targeting: () => import("../targeting-QB3DFYNI.js").then((m) => m.default),
|
|
72
|
+
"template-variables": () => import("../template-variables-IPKRUJ4E.js").then((m) => m.default),
|
|
73
|
+
user: () => import("../user-2CP75TFC.js").then((m) => m.default),
|
|
74
|
+
"validation-rules": () => import("../validation-rules-GNI4EEG5.js").then((m) => m.default),
|
|
75
|
+
webhooks: () => import("../webhooks-2OWUX7UL.js").then((m) => m.default),
|
|
76
|
+
workflow: () => import("../workflow-WSLERVJI.js").then((m) => m.default),
|
|
77
|
+
"workflow-definition": () => import("../workflow-definition-FP3WKHGG.js").then((m) => m.default)
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
80
|
|
|
@@ -87,7 +87,7 @@ process.stderr.on("error", (err) => {
|
|
|
87
87
|
if (err.code === "EPIPE") process.exit(0);
|
|
88
88
|
throw err;
|
|
89
89
|
});
|
|
90
|
-
var VERSION = true ? "0.1.
|
|
90
|
+
var VERSION = true ? "0.1.9" : (await null).default.version;
|
|
91
91
|
var args = process.argv.slice(2);
|
|
92
92
|
var completionsIdx = args.indexOf("--_completions");
|
|
93
93
|
if (completionsIdx >= 0) {
|
|
@@ -79,7 +79,7 @@ var loadDefinition = async (apiName, definitionOverride) => {
|
|
|
79
79
|
|
|
80
80
|
// src/lib/param-collector.ts
|
|
81
81
|
var getOperationParams = (spec, operationId) => {
|
|
82
|
-
for (const [
|
|
82
|
+
for (const [path, methods] of Object.entries(spec.paths ?? {})) {
|
|
83
83
|
if (!methods) continue;
|
|
84
84
|
const pathParams = methods.parameters || [];
|
|
85
85
|
for (const method of ["get", "post", "put", "patch", "delete", "head", "options"]) {
|
|
@@ -93,14 +93,18 @@ var getOperationParams = (spec, operationId) => {
|
|
|
93
93
|
if (idx >= 0) merged[idx] = p;
|
|
94
94
|
else merged.push(p);
|
|
95
95
|
}
|
|
96
|
-
return merged;
|
|
96
|
+
return { params: merged, pathTemplate: path };
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
return [];
|
|
99
|
+
return { params: [], pathTemplate: "" };
|
|
100
100
|
};
|
|
101
|
-
var collectParams = (params, paramFlags, positionalArgs) => {
|
|
101
|
+
var collectParams = (params, paramFlags, positionalArgs, pathTemplate) => {
|
|
102
102
|
const result = {};
|
|
103
|
-
|
|
103
|
+
let pathParams = params.filter((p) => p.in === "path");
|
|
104
|
+
if (pathTemplate) {
|
|
105
|
+
const templateOrder = [...pathTemplate.matchAll(/\{([^}]+)\}/g)].map((m) => m[1]);
|
|
106
|
+
pathParams = templateOrder.map((name) => pathParams.find((p) => p.name === name)).filter((p) => !!p);
|
|
107
|
+
}
|
|
104
108
|
for (let i = 0; i < positionalArgs.length && i < pathParams.length; i++) {
|
|
105
109
|
result[pathParams[i].name] = parseParamValue(positionalArgs[i]);
|
|
106
110
|
}
|
|
@@ -731,9 +735,9 @@ ${BOLD}Available operations:${RESET}
|
|
|
731
735
|
process.exit(1);
|
|
732
736
|
}
|
|
733
737
|
}
|
|
734
|
-
const opParams = getOperationParams(spec, operationId);
|
|
738
|
+
const { params: opParams, pathTemplate } = getOperationParams(spec, operationId);
|
|
735
739
|
const positionalArgs = args._args ?? [];
|
|
736
|
-
const collected = collectParams(opParams, args.param, positionalArgs);
|
|
740
|
+
const collected = collectParams(opParams, args.param, positionalArgs, pathTemplate);
|
|
737
741
|
if (args.guided && isInteractive({ interactive: args.interactive })) {
|
|
738
742
|
for (const param of opParams) {
|
|
739
743
|
if (!(param.name in collected)) {
|
|
@@ -72,7 +72,7 @@ ${GREEN}${BOLD}Upgraded to @epilot/cli@${latest}${RESET}
|
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
var getCurrentVersion = () => {
|
|
75
|
-
if (true) return "0.1.
|
|
75
|
+
if (true) return "0.1.9";
|
|
76
76
|
try {
|
|
77
77
|
const output = execSync("npm ls -g @epilot/cli --depth=0 --json 2>/dev/null", {
|
|
78
78
|
encoding: "utf-8",
|