reply-cli 0.3.0 → 0.4.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 +64 -5
- package/dist/commands/skills.d.ts +12 -0
- package/dist/commands/skills.js +138 -0
- package/dist/commands/skills.js.map +1 -0
- package/dist/config.d.ts +2 -1
- package/dist/config.js +4 -1
- package/dist/config.js.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/skills/adapter-flat.d.ts +32 -0
- package/dist/skills/adapter-flat.js +480 -0
- package/dist/skills/adapter-flat.js.map +1 -0
- package/dist/skills/adapter-native.d.ts +22 -0
- package/dist/skills/adapter-native.js +335 -0
- package/dist/skills/adapter-native.js.map +1 -0
- package/dist/skills/detect.d.ts +21 -0
- package/dist/skills/detect.js +102 -0
- package/dist/skills/detect.js.map +1 -0
- package/dist/skills/hosts.d.ts +5 -0
- package/dist/skills/hosts.js +118 -0
- package/dist/skills/hosts.js.map +1 -0
- package/dist/skills/journal.d.ts +23 -0
- package/dist/skills/journal.js +91 -0
- package/dist/skills/journal.js.map +1 -0
- package/dist/skills/orchestrate.d.ts +27 -0
- package/dist/skills/orchestrate.js +124 -0
- package/dist/skills/orchestrate.js.map +1 -0
- package/dist/skills/packs.d.ts +16 -0
- package/dist/skills/packs.js +153 -0
- package/dist/skills/packs.js.map +1 -0
- package/dist/skills/report.d.ts +7 -0
- package/dist/skills/report.js +105 -0
- package/dist/skills/report.js.map +1 -0
- package/dist/skills/types.d.ts +80 -0
- package/dist/skills/types.js +5 -0
- package/dist/skills/types.js.map +1 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -8,13 +8,10 @@ contacts, and the inbox are on the way.
|
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
|
-
Requires [Node.js](https://nodejs.org) 20 or newer.
|
|
12
|
-
GitHub Packages under the `@reply-team` scope, so point that scope at the
|
|
13
|
-
registry once, then install globally:
|
|
11
|
+
Requires [Node.js](https://nodejs.org) 20 or newer. Install globally from npm:
|
|
14
12
|
|
|
15
13
|
```sh
|
|
16
|
-
|
|
17
|
-
npm install -g @reply-team/reply-cli
|
|
14
|
+
npm install -g reply-cli
|
|
18
15
|
```
|
|
19
16
|
|
|
20
17
|
```sh
|
|
@@ -132,6 +129,68 @@ It prints `{ "code": <status>, "data": <body> }` and exits non-zero on HTTP
|
|
|
132
129
|
stderr. Add `--verbose` for a full request/response trace on stderr with
|
|
133
130
|
credentials redacted; stdout stays the plain JSON, so pipes keep working.
|
|
134
131
|
|
|
132
|
+
## Skills
|
|
133
|
+
|
|
134
|
+
Reply's outbound expertise ships as three markdown skill packs in
|
|
135
|
+
[reply-skills](https://github.com/reply-team/reply-skills). One command installs
|
|
136
|
+
them into every AI assistant on your machine, dependencies resolved:
|
|
137
|
+
|
|
138
|
+
```sh
|
|
139
|
+
reply skills install
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
✓ detected Claude Code, Codex
|
|
144
|
+
✓ Claude Code · ai-sdr-core, reply-adapter, agentic-runtime installed
|
|
145
|
+
✓ Codex · ai-sdr-core, reply-adapter, agentic-runtime installed
|
|
146
|
+
Start a new session in each assistant so the skills load.
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
| Pack | Alias | What it gives your agent |
|
|
150
|
+
|---|---|---|
|
|
151
|
+
| `ai-sdr-core` | `core` | Vendor-neutral SDR operations, playbooks and guardrails |
|
|
152
|
+
| `reply-adapter` | `adapter` | Executing those operations against Reply.io |
|
|
153
|
+
| `agentic-runtime` | `runtime` | Durable multi-session work: plans, checkpoints, reports |
|
|
154
|
+
|
|
155
|
+
Install a subset — dependencies come along automatically, so `adapter` pulls
|
|
156
|
+
`core`:
|
|
157
|
+
|
|
158
|
+
```sh
|
|
159
|
+
reply skills install core
|
|
160
|
+
reply skills install adapter runtime
|
|
161
|
+
reply skills install --agent codex # only this assistant
|
|
162
|
+
reply skills install --project # into this repository, not your home
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Then manage them:
|
|
166
|
+
|
|
167
|
+
```sh
|
|
168
|
+
reply skills list # what's installed where (notes packs with an update available)
|
|
169
|
+
reply skills update # bring installed packs to the latest version
|
|
170
|
+
reply skills remove runtime # remove one pack
|
|
171
|
+
reply skills remove # remove all of them
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
On Claude Code and Codex the packs are installed through the assistant's own
|
|
175
|
+
plugin mechanism, so they keep updating through it. Other `SKILL.md` hosts
|
|
176
|
+
receive the skills as files. Add `--json` for a machine-readable report, and
|
|
177
|
+
`--dry-run` to see the plan without changing anything.
|
|
178
|
+
|
|
179
|
+
| Assistant | How it receives the packs | Paths verified |
|
|
180
|
+
|---|---|---|
|
|
181
|
+
| Claude Code | its own plugin CLI | yes |
|
|
182
|
+
| Codex | its own plugin CLI (`--project` copies files instead) | yes |
|
|
183
|
+
| Cursor · Gemini CLI · GitHub Copilot · Windsurf | copied files | not yet |
|
|
184
|
+
|
|
185
|
+
"Not yet" means the skills directory for that assistant comes from its
|
|
186
|
+
documentation and has not been confirmed by a verification run of our own
|
|
187
|
+
(REPLY-51268): the install works, but we cannot promise the assistant reads
|
|
188
|
+
from where we put the files. Those hosts are marked `(paths not yet verified)`
|
|
189
|
+
in the report and carry `"verified": false` in `--json`.
|
|
190
|
+
|
|
191
|
+
Installing skills is not the same as connecting Reply: `reply-adapter` needs a
|
|
192
|
+
Reply.io login (`reply auth login`) to actually do anything.
|
|
193
|
+
|
|
135
194
|
## Environment variables
|
|
136
195
|
|
|
137
196
|
| Variable | Description |
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import type { Operation } from '../skills/types';
|
|
3
|
+
type Skills_cli_opts = {
|
|
4
|
+
agent?: string[];
|
|
5
|
+
project?: boolean;
|
|
6
|
+
dryRun?: boolean;
|
|
7
|
+
json?: boolean;
|
|
8
|
+
pretty?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const handle_skills: (operation: Operation, packs: string[], opts: Skills_cli_opts) => Promise<void>;
|
|
11
|
+
declare const skills_command: Command;
|
|
12
|
+
export { skills_command, handle_skills };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handle_skills = exports.skills_command = void 0;
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const config_1 = require("../config");
|
|
6
|
+
const orchestrate_1 = require("../skills/orchestrate");
|
|
7
|
+
const report_1 = require("../skills/report");
|
|
8
|
+
const errors_1 = require("../utils/errors");
|
|
9
|
+
const output_1 = require("../utils/output");
|
|
10
|
+
const read_globals = (cmd) => {
|
|
11
|
+
const o = cmd.optsWithGlobals();
|
|
12
|
+
return { agent: o.agent, project: o.project, dryRun: o.dryRun, json: o.json, pretty: o.pretty };
|
|
13
|
+
};
|
|
14
|
+
const wants_json = (o) => Boolean(o.json || o.pretty);
|
|
15
|
+
const print_opts = (o) => ({ json: o.json, pretty: o.pretty });
|
|
16
|
+
// What exiting 1 means, per operation. `exit_code_for` already branches on the
|
|
17
|
+
// action; telling a failed `remove` that "no assistant received the skills"
|
|
18
|
+
// and pointing it at `install --dry-run` misdirects the one user who most
|
|
19
|
+
// needs the right command. `list` never exits 1 (it is a query), but the map
|
|
20
|
+
// stays total so a new operation cannot silently inherit the wrong wording.
|
|
21
|
+
const NOTHING_HAPPENED = {
|
|
22
|
+
install: {
|
|
23
|
+
title: 'No assistant received the skills.',
|
|
24
|
+
code: 'skills.nothing_installed',
|
|
25
|
+
probe: 'install --dry-run',
|
|
26
|
+
},
|
|
27
|
+
update: {
|
|
28
|
+
title: 'No assistant was updated.',
|
|
29
|
+
code: 'skills.nothing_updated',
|
|
30
|
+
probe: 'update --dry-run',
|
|
31
|
+
},
|
|
32
|
+
remove: {
|
|
33
|
+
title: 'No assistant had the skills removed.',
|
|
34
|
+
code: 'skills.nothing_removed',
|
|
35
|
+
probe: 'remove --dry-run',
|
|
36
|
+
},
|
|
37
|
+
list: {
|
|
38
|
+
title: 'No assistant could be queried.',
|
|
39
|
+
code: 'skills.nothing_listed',
|
|
40
|
+
probe: 'list --json',
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
// One handler for all four operations: they differ only in the operation name,
|
|
44
|
+
// so the reporting and exit-code contract stays in exactly one place.
|
|
45
|
+
const handle_skills = async (operation, packs, opts) => {
|
|
46
|
+
const report = await (0, orchestrate_1.run_skills)({
|
|
47
|
+
operation,
|
|
48
|
+
requested: packs,
|
|
49
|
+
agents: opts.agent,
|
|
50
|
+
project: opts.project === true,
|
|
51
|
+
dry_run: opts.dryRun === true,
|
|
52
|
+
});
|
|
53
|
+
if (wants_json(opts)) {
|
|
54
|
+
(0, output_1.print)(report, print_opts(opts));
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
// `list` is a data command, so its table is what the user redirects —
|
|
58
|
+
// it goes to stdout. Every other operation prints progress, which is
|
|
59
|
+
// status and belongs on stderr (see utils/output.ts).
|
|
60
|
+
const write = report.action === 'list' ? console.log : console.error;
|
|
61
|
+
for (const line of (0, report_1.human_lines)(report)) {
|
|
62
|
+
write(line);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// The report is printed either way: exiting non-zero without it would hide
|
|
66
|
+
// why each host failed.
|
|
67
|
+
if ((0, report_1.exit_code_for)(report) !== 0) {
|
|
68
|
+
const failure = NOTHING_HAPPENED[operation];
|
|
69
|
+
throw new errors_1.RuntimeError(failure.title, {
|
|
70
|
+
code: failure.code,
|
|
71
|
+
hint: `run \`${config_1.PROGRAM_NAME} skills ${failure.probe}\` to see what was attempted`,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
exports.handle_skills = handle_skills;
|
|
76
|
+
const skills_command = new commander_1.Command('skills')
|
|
77
|
+
.description('Install and manage Reply skill packs in your AI assistants');
|
|
78
|
+
exports.skills_command = skills_command;
|
|
79
|
+
const with_flags = (cmd) => cmd
|
|
80
|
+
.option('-a, --agent <id...>', 'Target these assistants instead of auto-detecting')
|
|
81
|
+
.option('--project', 'Install into the current repository instead of your user directory')
|
|
82
|
+
.option('--dry-run', 'Show what would happen and change nothing');
|
|
83
|
+
const packs_help = `
|
|
84
|
+
Packs: ai-sdr-core (alias core) · reply-adapter (adapter) · agentic-runtime (runtime).
|
|
85
|
+
No pack means all three; dependencies are resolved for you.`;
|
|
86
|
+
with_flags(skills_command
|
|
87
|
+
.command('install')
|
|
88
|
+
.argument('[packs...]', 'Packs to install (default: all three)')
|
|
89
|
+
.description('Install Reply skill packs into every detected assistant'))
|
|
90
|
+
.addHelpText('after', `${packs_help}
|
|
91
|
+
|
|
92
|
+
Examples:
|
|
93
|
+
${config_1.PROGRAM_NAME} skills install
|
|
94
|
+
${config_1.PROGRAM_NAME} skills install core
|
|
95
|
+
${config_1.PROGRAM_NAME} skills install adapter runtime
|
|
96
|
+
${config_1.PROGRAM_NAME} skills install --agent codex --json`)
|
|
97
|
+
.action(async function (packs) {
|
|
98
|
+
await handle_skills('install', packs, read_globals(this));
|
|
99
|
+
});
|
|
100
|
+
with_flags(skills_command
|
|
101
|
+
.command('list')
|
|
102
|
+
.argument('[packs...]', 'Limit the listing to these packs')
|
|
103
|
+
.description('Show which packs are installed in which assistant'))
|
|
104
|
+
.addHelpText('after', `${packs_help}
|
|
105
|
+
|
|
106
|
+
Examples:
|
|
107
|
+
${config_1.PROGRAM_NAME} skills list
|
|
108
|
+
${config_1.PROGRAM_NAME} skills list --json`)
|
|
109
|
+
.action(async function (packs) {
|
|
110
|
+
await handle_skills('list', packs, read_globals(this));
|
|
111
|
+
});
|
|
112
|
+
with_flags(skills_command
|
|
113
|
+
.command('update')
|
|
114
|
+
.argument('[packs...]', 'Packs to update (default: all installed)')
|
|
115
|
+
.description('Update installed packs to the latest published version'))
|
|
116
|
+
.addHelpText('after', `${packs_help}
|
|
117
|
+
|
|
118
|
+
Examples:
|
|
119
|
+
${config_1.PROGRAM_NAME} skills update
|
|
120
|
+
${config_1.PROGRAM_NAME} skills update --dry-run`)
|
|
121
|
+
.action(async function (packs) {
|
|
122
|
+
await handle_skills('update', packs, read_globals(this));
|
|
123
|
+
});
|
|
124
|
+
with_flags(skills_command
|
|
125
|
+
.command('remove')
|
|
126
|
+
.argument('[packs...]', 'Packs to remove (default: all of them)')
|
|
127
|
+
.description('Remove Reply skill packs from your assistants'))
|
|
128
|
+
.addHelpText('after', `${packs_help}
|
|
129
|
+
Removing a pack that another installed pack depends on is refused — remove both,
|
|
130
|
+
or run \`${config_1.PROGRAM_NAME} skills remove\` with no pack to remove everything.
|
|
131
|
+
|
|
132
|
+
Examples:
|
|
133
|
+
${config_1.PROGRAM_NAME} skills remove
|
|
134
|
+
${config_1.PROGRAM_NAME} skills remove runtime`)
|
|
135
|
+
.action(async function (packs) {
|
|
136
|
+
await handle_skills('remove', packs, read_globals(this));
|
|
137
|
+
});
|
|
138
|
+
//# sourceMappingURL=skills.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/commands/skills.ts"],"names":[],"mappings":";;;AAAA,yCAAkC;AAClC,sCAAuC;AACvC,uDAAiD;AACjD,6CAA4D;AAC5D,4CAA6C;AAC7C,4CAAuD;AAWvD,MAAM,YAAY,GAAG,CAAC,GAAY,EAAkB,EAAE;IAClD,MAAM,CAAC,GAAG,GAAG,CAAC,eAAe,EAAE,CAAC;IAChC,OAAO,EAAC,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAC,CAAC;AAClG,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,CAAkB,EAAU,EAAE,CAAA,OAAO,CAAC,CAAC,CAAC,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C,QAAQ,EAAE,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;AAC7D,CAAC,CAAC,CAAC"}
|
package/dist/config.d.ts
CHANGED
|
@@ -10,5 +10,6 @@ declare const default_config_dir: (platform: NodeJS.Platform, env: Env, homedir:
|
|
|
10
10
|
declare const config_dir: (env?: Env) => string;
|
|
11
11
|
declare const credentials_file: (env?: Env) => string;
|
|
12
12
|
declare const config_file: (env?: Env) => string;
|
|
13
|
-
|
|
13
|
+
declare const skills_file: (env?: Env) => string;
|
|
14
|
+
export { PROGRAM_NAME, APP_NAME, env_prefix, env_var, get_env, cli_version, user_agent, default_config_dir, config_dir, credentials_file, config_file, skills_file, };
|
|
14
15
|
export type { Env };
|
package/dist/config.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.config_file = exports.credentials_file = exports.config_dir = exports.default_config_dir = exports.user_agent = exports.cli_version = exports.get_env = exports.env_var = exports.env_prefix = exports.APP_NAME = exports.PROGRAM_NAME = void 0;
|
|
6
|
+
exports.skills_file = exports.config_file = exports.credentials_file = exports.config_dir = exports.default_config_dir = exports.user_agent = exports.cli_version = exports.get_env = exports.env_var = exports.env_prefix = exports.APP_NAME = exports.PROGRAM_NAME = void 0;
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const os_1 = __importDefault(require("os"));
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
@@ -77,4 +77,7 @@ exports.credentials_file = credentials_file;
|
|
|
77
77
|
// User profile definitions live here (see profile.ts).
|
|
78
78
|
const config_file = (env = process.env) => path_1.default.join(config_dir(env), 'config.json');
|
|
79
79
|
exports.config_file = config_file;
|
|
80
|
+
// What the installer wrote into flat-directory hosts (see skills/journal.ts).
|
|
81
|
+
const skills_file = (env = process.env) => path_1.default.join(config_dir(env), 'skills.json');
|
|
82
|
+
exports.skills_file = skills_file;
|
|
80
83
|
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,4CAAoB;AACpB,gDAAwB;AAExB,2EAA2E;AAC3E,2EAA2E;AAC3E,gDAAgD;AAChD,MAAM,QAAQ,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,4CAAoB;AACpB,gDAAwB;AAExB,2EAA2E;AAC3E,2EAA2E;AAC3E,gDAAgD;AAChD,MAAM,QAAQ,GAAG,OAAO,CAAC;AAsFP,4BAAQ;AArF1B,MAAM,YAAY,GAAG,QAAQ,CAAC;AAqF1B,oCAAY;AAjFhB,MAAM,UAAU,GAAG,CAAC,MAAc,QAAQ,EAAS,EAAE,CACjD,GAAG,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AAiFrC,gCAAU;AA/Ed,yEAAyE;AACzE,MAAM,OAAO,GAAG,CAAC,MAAc,EAAE,MAAc,QAAQ,EAAS,EAAE,CAC9D,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,MAAM,EAAE,CAAC;AA6EnB,0BAAO;AA3EvB,MAAM,OAAO,GAAG,CAAC,MAAc,EAAE,MAAW,OAAO,CAAC,GAAG,EAAqB,EAAE,CAC1E,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;AA0EA,0BAAO;AAxEhC,IAAI,cAAkC,CAAC;AAEvC,6EAA6E;AAC7E,+EAA+E;AAC/E,uCAAuC;AACvC,MAAM,WAAW,GAAG,GAAU,EAAE;IAC5B,IAAI,cAAc,KAAK,SAAS,EAChC,CA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GAAG,CAAC,CAAC,CAAC,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACrE,OAAO,cAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACrC,CAAC,CAAC;AA2BE,gDAAkB;AAzBtB,uEAAuE;AACvE,MAAM,UAAU,GAAG,CAAC,MAAW,OAAO,CAAC,GAAG,EAAS,EAAE;IACjD,MAAM,QAAQ,GAAG,OAAO,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;IAC5C,IAAI,QAAQ,IAAI,QAAQ,CAAC,IAAI,EAAE,EAC/B,CAAC;QACG,OAAO,QAAQ,CAAC;IACpB,CAAC;IACD,OAAO,kBAAkB,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,EAAE,YAAE,CAAC,OAAO,EAAE,CAAC,CAAC;AACnE,CAAC,CAAC;AAiBsB,gCAAU;AAflC,6EAA6E;AAC7E,MAAM,gBAAgB,GAAG,CAAC,MAAW,OAAO,CAAC,GAAG,EAAS,EAAE,CACvD,cAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,kBAAkB,CAAC,CAAC;AAaf,4CAAgB;AAXpD,uDAAuD;AACvD,MAAM,WAAW,GAAG,CAAC,MAAW,OAAO,CAAC,GAAG,EAAS,EAAE,CAClD,cAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC,CAAC;AASQ,kCAAW;AAPjE,8EAA8E;AAC9E,MAAM,WAAW,GAAG,CAAC,MAAW,OAAO,CAAC,GAAG,EAAS,EAAE,CAClD,cAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC,CAAC;AAKqB,kCAAW"}
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ const auth_1 = require("./commands/auth");
|
|
|
8
8
|
const profile_1 = require("./commands/profile");
|
|
9
9
|
const team_1 = require("./commands/team");
|
|
10
10
|
const api_1 = require("./commands/api");
|
|
11
|
+
const skills_1 = require("./commands/skills");
|
|
11
12
|
const errors_1 = require("./utils/errors");
|
|
12
13
|
const output_1 = require("./utils/output");
|
|
13
14
|
// Route every command through commander's throwing mode so usage errors reach
|
|
@@ -42,6 +43,7 @@ const build_program = () => {
|
|
|
42
43
|
program.addCommand(profile_1.profile_command);
|
|
43
44
|
program.addCommand(team_1.team_command);
|
|
44
45
|
program.addCommand(api_1.api_command);
|
|
46
|
+
program.addCommand(skills_1.skills_command);
|
|
45
47
|
program.addHelpText('after', `
|
|
46
48
|
Credential precedence:
|
|
47
49
|
1. --api-key <key> 2. ${PREFIX}_API_KEY env 3. stored credential
|
|
@@ -91,6 +93,8 @@ Examples:
|
|
|
91
93
|
${config_1.PROGRAM_NAME} auth status
|
|
92
94
|
${config_1.PROGRAM_NAME} team list
|
|
93
95
|
${config_1.PROGRAM_NAME} api /v3/sequences
|
|
96
|
+
${config_1.PROGRAM_NAME} skills install
|
|
97
|
+
${config_1.PROGRAM_NAME} skills list --json
|
|
94
98
|
`);
|
|
95
99
|
return program;
|
|
96
100
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AACA,yCAAkD;AAClD,qCAAmD;AACnD,0CAA6C;AAC7C,gDAAmD;AACnD,0CAA6C;AAC7C,wCAA2C;AAC3C,2CAAwC;AACxC,2CAAyC;AAEzC,8EAA8E;AAC9E,sEAAsE;AACtE,MAAM,iBAAiB,GAAG,CAAC,GAAY,EAAO,EAAE;IAC5C,GAAG,CAAC,YAAY,EAAE,CAAC;IACnB,KAAK,MAAM,GAAG,IAAI,GAAG,CAAC,QAAQ,EAC9B,CAAC;QACG,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,GAAW,EAAE;IAC/B,MAAM,OAAO,GAAG,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0BAAc,EACnC,CAAC;QACG,wEAAwE;QACxE,mCAAmC;QACnC,MAAM,EAAE,GAAG,KAAK,CAAC,IAAI,KAAK,yBAAyB;eAC5C,KAAK,CAAC,IAAI,KAAK,mBAAmB;eAClC,KAAK,CAAC,IAAI,KAAK,gBAAgB,CAAC;QACvC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7B,CAAC;IACD,IAAI,KAAK,YAAY,iBAAQ,EAC7B,CAAC;QACG,IAAI,UAAU,EAAE,EAChB,CAAC;YACG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACnD,CAAC;aAED,CAAC;YACG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAClC,CAAC;IACD,OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Env } from '../config';
|
|
2
|
+
import type { Detected_host } from './detect';
|
|
3
|
+
import type { Host_def, Host_outcome, Operation, Pack, Runner, Scope } from './types';
|
|
4
|
+
type Clone_result = {
|
|
5
|
+
dir: string;
|
|
6
|
+
commit: string;
|
|
7
|
+
};
|
|
8
|
+
type Clone_fn = (opts: {
|
|
9
|
+
ref: string;
|
|
10
|
+
run: Runner;
|
|
11
|
+
tmp_root: string;
|
|
12
|
+
}) => Promise<Clone_result>;
|
|
13
|
+
declare const clone_repo: Clone_fn;
|
|
14
|
+
declare const skills_target: (def: Host_def, scope: Scope, home: string, cwd: string) => string | undefined;
|
|
15
|
+
declare const copy_dir: (from: string, to: string, written: string[]) => void;
|
|
16
|
+
type Flat_opts = {
|
|
17
|
+
operation: Operation;
|
|
18
|
+
host: Detected_host;
|
|
19
|
+
packs: Pack[];
|
|
20
|
+
scope: Scope;
|
|
21
|
+
ref?: string;
|
|
22
|
+
run?: Runner;
|
|
23
|
+
home?: string;
|
|
24
|
+
cwd?: string;
|
|
25
|
+
tmp_root?: string;
|
|
26
|
+
env?: Env;
|
|
27
|
+
dry_run?: boolean;
|
|
28
|
+
clone?: Clone_fn;
|
|
29
|
+
};
|
|
30
|
+
declare const run_flat: (opts: Flat_opts) => Promise<Host_outcome>;
|
|
31
|
+
export { clone_repo, copy_dir, skills_target, run_flat };
|
|
32
|
+
export type { Clone_fn, Clone_result, Flat_opts };
|