@agentuity/cli 0.0.48 → 0.0.49
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/bin/cli.ts +26 -5
- package/dist/banner.d.ts +1 -1
- package/dist/banner.d.ts.map +1 -1
- package/dist/cli-logger.d.ts +27 -0
- package/dist/cli-logger.d.ts.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cmd/auth/index.d.ts.map +1 -1
- package/dist/cmd/auth/login.d.ts.map +1 -1
- package/dist/cmd/auth/logout.d.ts.map +1 -1
- package/dist/cmd/auth/signup.d.ts.map +1 -1
- package/dist/cmd/auth/ssh/add.d.ts.map +1 -1
- package/dist/cmd/auth/ssh/delete.d.ts.map +1 -1
- package/dist/cmd/auth/ssh/index.d.ts +1 -2
- package/dist/cmd/auth/ssh/index.d.ts.map +1 -1
- package/dist/cmd/auth/ssh/list.d.ts.map +1 -1
- package/dist/cmd/auth/whoami.d.ts.map +1 -1
- package/dist/cmd/bundle/ast.d.ts.map +1 -1
- package/dist/cmd/bundle/index.d.ts.map +1 -1
- package/dist/cmd/bundle/plugin.d.ts.map +1 -1
- package/dist/cmd/capabilities/index.d.ts +4 -0
- package/dist/cmd/capabilities/index.d.ts.map +1 -0
- package/dist/cmd/capabilities/show.d.ts +20 -0
- package/dist/cmd/capabilities/show.d.ts.map +1 -0
- package/dist/cmd/cloud/deploy.d.ts.map +1 -1
- package/dist/cmd/cloud/deployment/index.d.ts.map +1 -1
- package/dist/cmd/cloud/deployment/list.d.ts.map +1 -1
- package/dist/cmd/cloud/deployment/remove.d.ts.map +1 -1
- package/dist/cmd/cloud/deployment/rollback.d.ts.map +1 -1
- package/dist/cmd/cloud/deployment/show.d.ts.map +1 -1
- package/dist/cmd/cloud/deployment/undeploy.d.ts.map +1 -1
- package/dist/cmd/cloud/deployment/utils.d.ts +4 -2
- package/dist/cmd/cloud/deployment/utils.d.ts.map +1 -1
- package/dist/cmd/cloud/domain.d.ts.map +1 -1
- package/dist/cmd/cloud/index.d.ts.map +1 -1
- package/dist/cmd/cloud/resource/add.d.ts.map +1 -1
- package/dist/cmd/cloud/resource/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/resource/index.d.ts +1 -2
- package/dist/cmd/cloud/resource/index.d.ts.map +1 -1
- package/dist/cmd/cloud/resource/list.d.ts.map +1 -1
- package/dist/cmd/cloud/scp/download.d.ts.map +1 -1
- package/dist/cmd/cloud/scp/index.d.ts +1 -2
- package/dist/cmd/cloud/scp/index.d.ts.map +1 -1
- package/dist/cmd/cloud/scp/upload.d.ts.map +1 -1
- package/dist/cmd/cloud/ssh.d.ts.map +1 -1
- package/dist/cmd/dev/index.d.ts.map +1 -1
- package/dist/cmd/env/delete.d.ts.map +1 -1
- package/dist/cmd/env/get.d.ts.map +1 -1
- package/dist/cmd/env/import.d.ts.map +1 -1
- package/dist/cmd/env/index.d.ts.map +1 -1
- package/dist/cmd/env/list.d.ts.map +1 -1
- package/dist/cmd/env/pull.d.ts.map +1 -1
- package/dist/cmd/env/push.d.ts.map +1 -1
- package/dist/cmd/env/set.d.ts.map +1 -1
- package/dist/cmd/index.d.ts.map +1 -1
- package/dist/cmd/kv/create-namespace.d.ts +3 -0
- package/dist/cmd/kv/create-namespace.d.ts.map +1 -0
- package/dist/cmd/kv/delete-namespace.d.ts +3 -0
- package/dist/cmd/kv/delete-namespace.d.ts.map +1 -0
- package/dist/cmd/kv/delete.d.ts +3 -0
- package/dist/cmd/kv/delete.d.ts.map +1 -0
- package/dist/cmd/kv/get.d.ts +3 -0
- package/dist/cmd/kv/get.d.ts.map +1 -0
- package/dist/cmd/kv/index.d.ts +2 -0
- package/dist/cmd/kv/index.d.ts.map +1 -0
- package/dist/cmd/kv/keys.d.ts +3 -0
- package/dist/cmd/kv/keys.d.ts.map +1 -0
- package/dist/cmd/kv/list-namespaces.d.ts +3 -0
- package/dist/cmd/kv/list-namespaces.d.ts.map +1 -0
- package/dist/cmd/kv/repl.d.ts +3 -0
- package/dist/cmd/kv/repl.d.ts.map +1 -0
- package/dist/cmd/kv/search.d.ts +3 -0
- package/dist/cmd/kv/search.d.ts.map +1 -0
- package/dist/cmd/kv/set.d.ts +3 -0
- package/dist/cmd/kv/set.d.ts.map +1 -0
- package/dist/cmd/kv/stats.d.ts +3 -0
- package/dist/cmd/kv/stats.d.ts.map +1 -0
- package/dist/cmd/kv/util.d.ts +8 -0
- package/dist/cmd/kv/util.d.ts.map +1 -0
- package/dist/cmd/objectstore/delete-bucket.d.ts +3 -0
- package/dist/cmd/objectstore/delete-bucket.d.ts.map +1 -0
- package/dist/cmd/objectstore/delete.d.ts +3 -0
- package/dist/cmd/objectstore/delete.d.ts.map +1 -0
- package/dist/cmd/objectstore/get.d.ts +3 -0
- package/dist/cmd/objectstore/get.d.ts.map +1 -0
- package/dist/cmd/objectstore/index.d.ts +2 -0
- package/dist/cmd/objectstore/index.d.ts.map +1 -0
- package/dist/cmd/objectstore/list-buckets.d.ts +3 -0
- package/dist/cmd/objectstore/list-buckets.d.ts.map +1 -0
- package/dist/cmd/objectstore/list-keys.d.ts +3 -0
- package/dist/cmd/objectstore/list-keys.d.ts.map +1 -0
- package/dist/cmd/objectstore/put.d.ts +3 -0
- package/dist/cmd/objectstore/put.d.ts.map +1 -0
- package/dist/cmd/objectstore/repl.d.ts +3 -0
- package/dist/cmd/objectstore/repl.d.ts.map +1 -0
- package/dist/cmd/objectstore/url.d.ts +3 -0
- package/dist/cmd/objectstore/url.d.ts.map +1 -0
- package/dist/cmd/objectstore/util.d.ts +8 -0
- package/dist/cmd/objectstore/util.d.ts.map +1 -0
- package/dist/cmd/profile/create.d.ts.map +1 -1
- package/dist/cmd/profile/delete.d.ts.map +1 -1
- package/dist/cmd/profile/index.d.ts.map +1 -1
- package/dist/cmd/profile/list.d.ts +1 -2
- package/dist/cmd/profile/list.d.ts.map +1 -1
- package/dist/cmd/profile/show.d.ts.map +1 -1
- package/dist/cmd/profile/use.d.ts.map +1 -1
- package/dist/cmd/project/create.d.ts.map +1 -1
- package/dist/cmd/project/delete.d.ts.map +1 -1
- package/dist/cmd/project/index.d.ts.map +1 -1
- package/dist/cmd/project/list.d.ts.map +1 -1
- package/dist/cmd/project/show.d.ts.map +1 -1
- package/dist/cmd/project/template-flow.d.ts +1 -1
- package/dist/cmd/project/template-flow.d.ts.map +1 -1
- package/dist/cmd/prompt/index.d.ts +4 -0
- package/dist/cmd/prompt/index.d.ts.map +1 -0
- package/dist/cmd/prompt/llm.d.ts +3 -0
- package/dist/cmd/prompt/llm.d.ts.map +1 -0
- package/dist/cmd/repl/index.d.ts +3 -0
- package/dist/cmd/repl/index.d.ts.map +1 -0
- package/dist/cmd/schema/index.d.ts +4 -0
- package/dist/cmd/schema/index.d.ts.map +1 -0
- package/dist/cmd/schema/show.d.ts +3 -0
- package/dist/cmd/schema/show.d.ts.map +1 -0
- package/dist/cmd/secret/delete.d.ts.map +1 -1
- package/dist/cmd/secret/get.d.ts.map +1 -1
- package/dist/cmd/secret/import.d.ts.map +1 -1
- package/dist/cmd/secret/index.d.ts.map +1 -1
- package/dist/cmd/secret/list.d.ts.map +1 -1
- package/dist/cmd/secret/pull.d.ts.map +1 -1
- package/dist/cmd/secret/push.d.ts.map +1 -1
- package/dist/cmd/secret/set.d.ts.map +1 -1
- package/dist/cmd/version/index.d.ts.map +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/errors.d.ts +83 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/explain.d.ts +47 -0
- package/dist/explain.d.ts.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/json.d.ts +3 -0
- package/dist/json.d.ts.map +1 -0
- package/dist/output.d.ts +136 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/repl.d.ts +124 -0
- package/dist/repl.d.ts.map +1 -0
- package/dist/schema-generator.d.ts +67 -0
- package/dist/schema-generator.d.ts.map +1 -0
- package/dist/tui.d.ts +11 -1
- package/dist/tui.d.ts.map +1 -1
- package/dist/types.d.ts +65 -6
- package/dist/types.d.ts.map +1 -1
- package/package.json +9 -4
- package/src/banner.ts +7 -7
- package/src/cli-logger.ts +80 -0
- package/src/cli.ts +186 -54
- package/src/cmd/auth/index.ts +1 -0
- package/src/cmd/auth/login.ts +7 -2
- package/src/cmd/auth/logout.ts +4 -0
- package/src/cmd/auth/signup.ts +7 -2
- package/src/cmd/auth/ssh/add.ts +20 -3
- package/src/cmd/auth/ssh/delete.ts +57 -4
- package/src/cmd/auth/ssh/index.ts +4 -3
- package/src/cmd/auth/ssh/list.ts +29 -12
- package/src/cmd/auth/whoami.ts +32 -21
- package/src/cmd/bundle/ast.ts +27 -5
- package/src/cmd/bundle/index.ts +20 -0
- package/src/cmd/bundle/plugin.ts +36 -12
- package/src/cmd/capabilities/index.ts +12 -0
- package/src/cmd/capabilities/show.ts +256 -0
- package/src/cmd/cloud/deploy.ts +54 -0
- package/src/cmd/cloud/deployment/index.ts +1 -0
- package/src/cmd/cloud/deployment/list.ts +50 -3
- package/src/cmd/cloud/deployment/remove.ts +26 -2
- package/src/cmd/cloud/deployment/rollback.ts +35 -4
- package/src/cmd/cloud/deployment/show.ts +37 -2
- package/src/cmd/cloud/deployment/undeploy.ts +12 -1
- package/src/cmd/cloud/deployment/utils.ts +5 -2
- package/src/cmd/cloud/domain.ts +3 -2
- package/src/cmd/cloud/index.ts +8 -1
- package/src/cmd/cloud/resource/add.ts +19 -0
- package/src/cmd/cloud/resource/delete.ts +24 -3
- package/src/cmd/cloud/resource/index.ts +4 -3
- package/src/cmd/cloud/resource/list.ts +36 -10
- package/src/cmd/cloud/scp/download.ts +27 -1
- package/src/cmd/cloud/scp/index.ts +4 -3
- package/src/cmd/cloud/scp/upload.ts +27 -1
- package/src/cmd/cloud/ssh.ts +12 -0
- package/src/cmd/dev/index.ts +11 -7
- package/src/cmd/dev/templates.ts +1 -1
- package/src/cmd/env/delete.ts +17 -0
- package/src/cmd/env/get.ts +17 -1
- package/src/cmd/env/import.ts +47 -3
- package/src/cmd/env/index.ts +1 -0
- package/src/cmd/env/list.ts +13 -1
- package/src/cmd/env/pull.ts +20 -0
- package/src/cmd/env/push.ts +33 -1
- package/src/cmd/env/set.ts +25 -1
- package/src/cmd/index.ts +9 -2
- package/src/cmd/kv/create-namespace.ts +45 -0
- package/src/cmd/kv/delete-namespace.ts +73 -0
- package/src/cmd/kv/delete.ts +51 -0
- package/src/cmd/kv/get.ts +65 -0
- package/src/cmd/kv/index.ts +31 -0
- package/src/cmd/kv/keys.ts +57 -0
- package/src/cmd/kv/list-namespaces.ts +43 -0
- package/src/cmd/kv/repl.ts +284 -0
- package/src/cmd/kv/search.ts +80 -0
- package/src/cmd/kv/set.ts +63 -0
- package/src/cmd/kv/stats.ts +96 -0
- package/src/cmd/kv/util.ts +32 -0
- package/src/cmd/objectstore/delete-bucket.ts +72 -0
- package/src/cmd/objectstore/delete.ts +59 -0
- package/src/cmd/objectstore/get.ts +64 -0
- package/src/cmd/objectstore/index.ts +27 -0
- package/src/cmd/objectstore/list-buckets.ts +45 -0
- package/src/cmd/objectstore/list-keys.ts +60 -0
- package/src/cmd/objectstore/put.ts +62 -0
- package/src/cmd/objectstore/repl.ts +235 -0
- package/src/cmd/objectstore/url.ts +59 -0
- package/src/cmd/objectstore/util.ts +28 -0
- package/src/cmd/profile/create.ts +28 -2
- package/src/cmd/profile/delete.ts +17 -2
- package/src/cmd/profile/index.ts +1 -0
- package/src/cmd/profile/list.ts +7 -3
- package/src/cmd/profile/show.ts +20 -5
- package/src/cmd/profile/use.ts +8 -0
- package/src/cmd/project/create.ts +31 -0
- package/src/cmd/project/delete.ts +24 -2
- package/src/cmd/project/index.ts +1 -0
- package/src/cmd/project/list.ts +23 -9
- package/src/cmd/project/show.ts +27 -8
- package/src/cmd/project/template-flow.ts +10 -6
- package/src/cmd/prompt/index.ts +12 -0
- package/src/cmd/prompt/llm.ts +368 -0
- package/src/cmd/repl/index.ts +477 -0
- package/src/cmd/schema/index.ts +12 -0
- package/src/cmd/schema/show.ts +27 -0
- package/src/cmd/secret/delete.ts +17 -0
- package/src/cmd/secret/get.ts +20 -1
- package/src/cmd/secret/import.ts +45 -2
- package/src/cmd/secret/index.ts +1 -0
- package/src/cmd/secret/list.ts +10 -1
- package/src/cmd/secret/pull.ts +20 -0
- package/src/cmd/secret/push.ts +33 -1
- package/src/cmd/secret/set.ts +20 -0
- package/src/cmd/version/index.ts +15 -2
- package/src/config.ts +17 -4
- package/src/errors.ts +222 -0
- package/src/explain.ts +126 -0
- package/src/index.ts +51 -0
- package/src/json.ts +28 -0
- package/src/output.ts +307 -0
- package/src/repl.ts +1517 -0
- package/src/schema-generator.ts +389 -0
- package/src/tui.ts +84 -13
- package/src/types.ts +62 -12
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
import { createCommand } from '../../types';
|
|
2
|
+
import { createRepl, type ReplCommand } from '../../repl';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { getCommand } from '../../command-prefix';
|
|
5
|
+
|
|
6
|
+
export const command = createCommand({
|
|
7
|
+
name: 'repl',
|
|
8
|
+
hidden: true,
|
|
9
|
+
description: 'interactive REPL for testing',
|
|
10
|
+
tags: ['slow'],
|
|
11
|
+
idempotent: false,
|
|
12
|
+
examples: [getCommand('repl')],
|
|
13
|
+
|
|
14
|
+
async handler() {
|
|
15
|
+
// Define test commands
|
|
16
|
+
const commands: ReplCommand[] = [
|
|
17
|
+
{
|
|
18
|
+
name: 'keyvalue',
|
|
19
|
+
aliases: ['kv'],
|
|
20
|
+
description: 'Echo back the arguments',
|
|
21
|
+
schema: {
|
|
22
|
+
args: z.tuple([z.string().min(1)]).rest(z.string()),
|
|
23
|
+
argNames: ['action'],
|
|
24
|
+
},
|
|
25
|
+
handler: (ctx) => {
|
|
26
|
+
ctx.write(ctx.parsed.args.join(' '));
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'echoall',
|
|
31
|
+
description: 'Echo all arguments with separators',
|
|
32
|
+
handler: (ctx) => {
|
|
33
|
+
if (ctx.parsed.args.length === 0) {
|
|
34
|
+
ctx.error('Usage: echoall <args...>');
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
ctx.write(ctx.parsed.args.map((arg, i) => `[${i + 1}] ${arg}`).join('\n'));
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'echofile',
|
|
42
|
+
description: 'Echo as if writing to a file',
|
|
43
|
+
handler: (ctx) => {
|
|
44
|
+
if (ctx.parsed.args.length === 0) {
|
|
45
|
+
ctx.error('Usage: echofile <content>');
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
ctx.success(`Would write to file: ${ctx.parsed.args.join(' ')}`);
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'upper',
|
|
53
|
+
description: 'Convert text to uppercase',
|
|
54
|
+
aliases: ['up'],
|
|
55
|
+
handler: (ctx) => {
|
|
56
|
+
if (ctx.parsed.args.length === 0) {
|
|
57
|
+
ctx.error('Usage: upper <text>');
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
ctx.success(ctx.parsed.args.join(' ').toUpperCase());
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'lower',
|
|
65
|
+
description: 'Convert text to lowercase',
|
|
66
|
+
aliases: ['down'],
|
|
67
|
+
handler: (ctx) => {
|
|
68
|
+
if (ctx.parsed.args.length === 0) {
|
|
69
|
+
ctx.error('Usage: lower <text>');
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
ctx.success(ctx.parsed.args.join(' ').toLowerCase());
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: 'count',
|
|
77
|
+
description: 'Count from 1 to N (with optional delay)',
|
|
78
|
+
schema: {
|
|
79
|
+
args: z.tuple([z.coerce.number().int().positive().default(5)]),
|
|
80
|
+
argNames: ['number'],
|
|
81
|
+
options: z.object({
|
|
82
|
+
delay: z.coerce.number().int().positive().default(100).optional(),
|
|
83
|
+
}),
|
|
84
|
+
},
|
|
85
|
+
handler: async function* (ctx) {
|
|
86
|
+
const count = parseInt(ctx.parsed.args[0] || '5', 10);
|
|
87
|
+
const delay = parseInt(ctx.parsed.options.delay as string, 10) || 100;
|
|
88
|
+
|
|
89
|
+
for (let i = 1; i <= count; i++) {
|
|
90
|
+
yield `${i}`;
|
|
91
|
+
if (i < count) {
|
|
92
|
+
yield ', ';
|
|
93
|
+
}
|
|
94
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'longoutput',
|
|
100
|
+
description: 'Generate long output to test paging',
|
|
101
|
+
aliases: ['long'],
|
|
102
|
+
handler: (ctx) => {
|
|
103
|
+
const lines = parseInt(ctx.parsed.args[0] || '50', 10);
|
|
104
|
+
for (let i = 1; i <= lines; i++) {
|
|
105
|
+
ctx.write(
|
|
106
|
+
`Line ${i}: This is a test line to demonstrate output paging in the REPL`
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: 'download',
|
|
113
|
+
description: 'Simulate a download with progress updates',
|
|
114
|
+
schema: {
|
|
115
|
+
args: z.tuple([z.coerce.number().int().positive().default(5)]),
|
|
116
|
+
argNames: ['chunks'],
|
|
117
|
+
},
|
|
118
|
+
handler: async (ctx) => {
|
|
119
|
+
const chunks = parseInt(ctx.parsed.args[0] || '5', 10);
|
|
120
|
+
|
|
121
|
+
for (let i = 1; i <= chunks; i++) {
|
|
122
|
+
// Check if aborted
|
|
123
|
+
if (ctx.signal.aborted) {
|
|
124
|
+
return; // Just return, abort will be detected
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
ctx.setProgress(`Downloading chunk ${i}/${chunks}`);
|
|
128
|
+
|
|
129
|
+
// Use signal with setTimeout for proper abort handling
|
|
130
|
+
await new Promise((resolve) => {
|
|
131
|
+
const timeout = setTimeout(resolve, 500);
|
|
132
|
+
ctx.signal.addEventListener(
|
|
133
|
+
'abort',
|
|
134
|
+
() => {
|
|
135
|
+
clearTimeout(timeout);
|
|
136
|
+
resolve(undefined); // Resolve to exit cleanly
|
|
137
|
+
},
|
|
138
|
+
{ once: true }
|
|
139
|
+
);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (ctx.signal.aborted) return;
|
|
144
|
+
|
|
145
|
+
ctx.setProgress('Processing downloaded data');
|
|
146
|
+
await new Promise((resolve) => {
|
|
147
|
+
const timeout = setTimeout(resolve, 1000);
|
|
148
|
+
ctx.signal.addEventListener(
|
|
149
|
+
'abort',
|
|
150
|
+
() => {
|
|
151
|
+
clearTimeout(timeout);
|
|
152
|
+
resolve(undefined);
|
|
153
|
+
},
|
|
154
|
+
{ once: true }
|
|
155
|
+
);
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
if (!ctx.signal.aborted) {
|
|
159
|
+
ctx.success(`Downloaded ${chunks} chunks successfully!`);
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: 'greet',
|
|
165
|
+
description: 'Greet a person with optional title',
|
|
166
|
+
schema: {
|
|
167
|
+
args: z.tuple([z.string().min(1)]),
|
|
168
|
+
argNames: ['name'],
|
|
169
|
+
options: z.object({
|
|
170
|
+
title: z.string().optional(),
|
|
171
|
+
loud: z.boolean().optional(),
|
|
172
|
+
}),
|
|
173
|
+
},
|
|
174
|
+
handler: (ctx) => {
|
|
175
|
+
const name = ctx.parsed.args[0];
|
|
176
|
+
const title = ctx.parsed.options.title || '';
|
|
177
|
+
const greeting = title ? `Hello, ${title} ${name}!` : `Hello, ${name}!`;
|
|
178
|
+
|
|
179
|
+
if (ctx.parsed.options.loud) {
|
|
180
|
+
ctx.success(greeting.toUpperCase());
|
|
181
|
+
} else {
|
|
182
|
+
ctx.success(greeting);
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: 'options',
|
|
188
|
+
description: 'Show all parsed options for debugging',
|
|
189
|
+
handler: (ctx) => {
|
|
190
|
+
ctx.info('Parsed command:');
|
|
191
|
+
ctx.json(ctx.parsed);
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: 'json',
|
|
196
|
+
description: 'Display JSON data in colorized format',
|
|
197
|
+
schema: {
|
|
198
|
+
args: z.tuple([z.string().optional()]),
|
|
199
|
+
argNames: ['data'],
|
|
200
|
+
},
|
|
201
|
+
handler: (ctx) => {
|
|
202
|
+
const input = ctx.parsed.args.join(' ').trim();
|
|
203
|
+
|
|
204
|
+
if (!input) {
|
|
205
|
+
// Show example JSON
|
|
206
|
+
ctx.json({
|
|
207
|
+
users: [
|
|
208
|
+
{ id: 1, name: 'Alice', active: true, tags: ['admin', 'user'] },
|
|
209
|
+
{ id: 2, name: 'Bob', active: false, tags: ['user'] },
|
|
210
|
+
],
|
|
211
|
+
metadata: {
|
|
212
|
+
total: 2,
|
|
213
|
+
timestamp: new Date().toISOString(),
|
|
214
|
+
},
|
|
215
|
+
});
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// Try to parse input as JSON
|
|
220
|
+
try {
|
|
221
|
+
const parsed = JSON.parse(input);
|
|
222
|
+
ctx.json(parsed);
|
|
223
|
+
} catch {
|
|
224
|
+
ctx.error('Invalid JSON input');
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
name: 'kv',
|
|
230
|
+
description: 'Key-value store commands',
|
|
231
|
+
subcommands: [
|
|
232
|
+
{
|
|
233
|
+
name: 'set',
|
|
234
|
+
description: 'Set a key-value pair',
|
|
235
|
+
schema: {
|
|
236
|
+
args: z.tuple([z.string().min(1), z.string()]),
|
|
237
|
+
argNames: ['key', 'value'],
|
|
238
|
+
},
|
|
239
|
+
handler: (ctx) => {
|
|
240
|
+
const [key, value] = ctx.parsed.args;
|
|
241
|
+
ctx.success(`Set ${key} = ${value}`);
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
name: 'get',
|
|
246
|
+
description: 'Get a value by key',
|
|
247
|
+
schema: {
|
|
248
|
+
args: z.tuple([z.string().min(1)]),
|
|
249
|
+
argNames: ['key'],
|
|
250
|
+
},
|
|
251
|
+
handler: (ctx) => {
|
|
252
|
+
const key = ctx.parsed.args[0];
|
|
253
|
+
ctx.write(`Value for ${key}: (example value)`);
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
name: 'del',
|
|
258
|
+
description: 'Delete a key',
|
|
259
|
+
aliases: ['delete', 'rm'],
|
|
260
|
+
schema: {
|
|
261
|
+
args: z.tuple([z.string().min(1)]),
|
|
262
|
+
argNames: ['key'],
|
|
263
|
+
},
|
|
264
|
+
handler: (ctx) => {
|
|
265
|
+
const key = ctx.parsed.args[0];
|
|
266
|
+
ctx.success(`Deleted ${key}`);
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
],
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
name: 'vector',
|
|
273
|
+
description: 'Vector store commands',
|
|
274
|
+
subcommands: [
|
|
275
|
+
{
|
|
276
|
+
name: 'set',
|
|
277
|
+
description: 'Store a vector',
|
|
278
|
+
schema: {
|
|
279
|
+
args: z.tuple([z.string().min(1), z.string()]),
|
|
280
|
+
argNames: ['id', 'vector'],
|
|
281
|
+
},
|
|
282
|
+
handler: (ctx) => {
|
|
283
|
+
const [id, _vector] = ctx.parsed.args;
|
|
284
|
+
ctx.success(`Stored vector ${id}`);
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
name: 'get',
|
|
289
|
+
description: 'Retrieve a vector by ID',
|
|
290
|
+
schema: {
|
|
291
|
+
args: z.tuple([z.string().min(1)]),
|
|
292
|
+
argNames: ['id'],
|
|
293
|
+
},
|
|
294
|
+
handler: (ctx) => {
|
|
295
|
+
const id = ctx.parsed.args[0];
|
|
296
|
+
ctx.write(`Vector for ${id}: [0.1, 0.2, 0.3, ...]`);
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
],
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
name: 'sql',
|
|
303
|
+
description: 'Execute a mock SQL query and display results',
|
|
304
|
+
schema: {
|
|
305
|
+
args: z.tuple([z.string().min(1)]).rest(z.string()),
|
|
306
|
+
argNames: ['query'],
|
|
307
|
+
},
|
|
308
|
+
handler: (ctx) => {
|
|
309
|
+
const query = ctx.parsed.args.join(' ').trim();
|
|
310
|
+
|
|
311
|
+
if (!query) {
|
|
312
|
+
ctx.error('Usage: sql <query>');
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// Simulate different query results based on query pattern
|
|
317
|
+
const queryLower = query.toLowerCase();
|
|
318
|
+
|
|
319
|
+
if (queryLower.includes('select') && queryLower.includes('users')) {
|
|
320
|
+
// Mock user table
|
|
321
|
+
ctx.table(
|
|
322
|
+
[
|
|
323
|
+
{ name: 'id', alignment: 'right' },
|
|
324
|
+
{ name: 'name', alignment: 'left' },
|
|
325
|
+
{ name: 'email', alignment: 'left' },
|
|
326
|
+
{ name: 'active', alignment: 'center' },
|
|
327
|
+
{ name: 'created_at', alignment: 'left' },
|
|
328
|
+
],
|
|
329
|
+
[
|
|
330
|
+
{
|
|
331
|
+
id: 1,
|
|
332
|
+
name: 'Alice Johnson',
|
|
333
|
+
email: 'alice@example.com',
|
|
334
|
+
active: 'Yes',
|
|
335
|
+
created_at: '2024-01-15 10:30:00',
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
id: 2,
|
|
339
|
+
name: 'Bob Smith',
|
|
340
|
+
email: 'bob@example.com',
|
|
341
|
+
active: 'Yes',
|
|
342
|
+
created_at: '2024-02-20 14:15:00',
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
id: 3,
|
|
346
|
+
name: 'Carol Williams',
|
|
347
|
+
email: 'carol@example.com',
|
|
348
|
+
active: 'No',
|
|
349
|
+
created_at: '2024-03-10 09:00:00',
|
|
350
|
+
},
|
|
351
|
+
]
|
|
352
|
+
);
|
|
353
|
+
ctx.info('3 rows returned');
|
|
354
|
+
} else if (queryLower.includes('select') && queryLower.includes('products')) {
|
|
355
|
+
// Mock product table
|
|
356
|
+
ctx.table(
|
|
357
|
+
[
|
|
358
|
+
{ name: 'id', alignment: 'right' },
|
|
359
|
+
{ name: 'name', alignment: 'left' },
|
|
360
|
+
{ name: 'price', alignment: 'right' },
|
|
361
|
+
{ name: 'stock', alignment: 'right' },
|
|
362
|
+
{ name: 'category', alignment: 'left' },
|
|
363
|
+
],
|
|
364
|
+
[
|
|
365
|
+
{
|
|
366
|
+
id: 101,
|
|
367
|
+
name: 'Laptop Pro',
|
|
368
|
+
price: '$1299.99',
|
|
369
|
+
stock: 45,
|
|
370
|
+
category: 'Electronics',
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
id: 102,
|
|
374
|
+
name: 'Wireless Mouse',
|
|
375
|
+
price: '$29.99',
|
|
376
|
+
stock: 120,
|
|
377
|
+
category: 'Accessories',
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
id: 103,
|
|
381
|
+
name: 'USB-C Cable',
|
|
382
|
+
price: '$12.99',
|
|
383
|
+
stock: 200,
|
|
384
|
+
category: 'Accessories',
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
id: 104,
|
|
388
|
+
name: 'Monitor 27"',
|
|
389
|
+
price: '$349.99',
|
|
390
|
+
stock: 30,
|
|
391
|
+
category: 'Electronics',
|
|
392
|
+
},
|
|
393
|
+
]
|
|
394
|
+
);
|
|
395
|
+
ctx.info('4 rows returned');
|
|
396
|
+
} else if (queryLower.includes('select') && queryLower.includes('orders')) {
|
|
397
|
+
// Mock orders table
|
|
398
|
+
ctx.table(
|
|
399
|
+
[
|
|
400
|
+
{ name: 'order_id', alignment: 'right' },
|
|
401
|
+
{ name: 'user_id', alignment: 'right' },
|
|
402
|
+
{ name: 'total', alignment: 'right' },
|
|
403
|
+
{ name: 'status', alignment: 'left' },
|
|
404
|
+
{ name: 'order_date', alignment: 'left' },
|
|
405
|
+
],
|
|
406
|
+
[
|
|
407
|
+
{
|
|
408
|
+
order_id: 1001,
|
|
409
|
+
user_id: 1,
|
|
410
|
+
total: '$1329.98',
|
|
411
|
+
status: 'Shipped',
|
|
412
|
+
order_date: '2024-11-01',
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
order_id: 1002,
|
|
416
|
+
user_id: 2,
|
|
417
|
+
total: '$42.98',
|
|
418
|
+
status: 'Processing',
|
|
419
|
+
order_date: '2024-11-15',
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
order_id: 1003,
|
|
423
|
+
user_id: 1,
|
|
424
|
+
total: '$349.99',
|
|
425
|
+
status: 'Delivered',
|
|
426
|
+
order_date: '2024-11-10',
|
|
427
|
+
},
|
|
428
|
+
]
|
|
429
|
+
);
|
|
430
|
+
ctx.info('3 rows returned');
|
|
431
|
+
} else if (
|
|
432
|
+
queryLower.includes('insert') ||
|
|
433
|
+
queryLower.includes('update') ||
|
|
434
|
+
queryLower.includes('delete')
|
|
435
|
+
) {
|
|
436
|
+
// Mock mutation result
|
|
437
|
+
const affected = Math.floor(Math.random() * 5) + 1;
|
|
438
|
+
ctx.success(`Query OK, ${affected} row(s) affected`);
|
|
439
|
+
} else {
|
|
440
|
+
// Generic SELECT result
|
|
441
|
+
ctx.table(
|
|
442
|
+
[
|
|
443
|
+
{ name: 'column1', alignment: 'left' },
|
|
444
|
+
{ name: 'column2', alignment: 'left' },
|
|
445
|
+
{ name: 'column3', alignment: 'left' },
|
|
446
|
+
],
|
|
447
|
+
[
|
|
448
|
+
{
|
|
449
|
+
column1: 'value1',
|
|
450
|
+
column2: 'value2',
|
|
451
|
+
column3: 'value3',
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
column1: 'data1',
|
|
455
|
+
column2: 'data2',
|
|
456
|
+
column3: 'data3',
|
|
457
|
+
},
|
|
458
|
+
]
|
|
459
|
+
);
|
|
460
|
+
ctx.info('2 rows returned');
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
];
|
|
465
|
+
|
|
466
|
+
// Start the REPL
|
|
467
|
+
await createRepl({
|
|
468
|
+
name: 'test',
|
|
469
|
+
prompt: '> ',
|
|
470
|
+
welcome: 'Welcome to the Agentuity REPL! Type "help" or / for available commands.',
|
|
471
|
+
exitMessage: 'Goodbye!',
|
|
472
|
+
commands,
|
|
473
|
+
});
|
|
474
|
+
},
|
|
475
|
+
});
|
|
476
|
+
|
|
477
|
+
export default command;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CommandDefinition } from '../../types';
|
|
2
|
+
import { createCommand } from '../../types';
|
|
3
|
+
import { showSubcommand } from './show';
|
|
4
|
+
|
|
5
|
+
export const schemaCommand: CommandDefinition = createCommand({
|
|
6
|
+
name: 'schema',
|
|
7
|
+
description: 'Output CLI schema in machine-readable format',
|
|
8
|
+
tags: ['read-only', 'fast'],
|
|
9
|
+
subcommands: [showSubcommand],
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export default schemaCommand;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createSubcommand, type CommandContext } from '../../types';
|
|
2
|
+
import { ErrorCode } from '../../errors';
|
|
3
|
+
import { getCommand } from '../../command-prefix';
|
|
4
|
+
|
|
5
|
+
export const showSubcommand = createSubcommand({
|
|
6
|
+
name: 'show',
|
|
7
|
+
description: 'Display the complete CLI schema',
|
|
8
|
+
tags: ['read-only', 'fast'],
|
|
9
|
+
idempotent: true,
|
|
10
|
+
examples: [getCommand('schema show'), getCommand('--help=json')],
|
|
11
|
+
async handler(ctx: CommandContext) {
|
|
12
|
+
const { logger } = ctx;
|
|
13
|
+
|
|
14
|
+
// Access the schema stored in the global context
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
+
const schema = (global as any).__CLI_SCHEMA__;
|
|
17
|
+
|
|
18
|
+
if (!schema) {
|
|
19
|
+
logger.fatal('Schema not available. This is a CLI bug.', ErrorCode.INTERNAL_ERROR);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Always output JSON (this command is primarily for machine consumption)
|
|
23
|
+
console.log(JSON.stringify(schema, null, 2));
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export default showSubcommand;
|
package/src/cmd/secret/delete.ts
CHANGED
|
@@ -3,16 +3,27 @@ import { createSubcommand } from '../../types';
|
|
|
3
3
|
import * as tui from '../../tui';
|
|
4
4
|
import { projectEnvDelete } from '@agentuity/server';
|
|
5
5
|
import { findEnvFile, readEnvFile, writeEnvFile, filterAgentuitySdkKeys } from '../../env-util';
|
|
6
|
+
import { getCommand } from '../../command-prefix';
|
|
7
|
+
|
|
8
|
+
const SecretDeleteResponseSchema = z.object({
|
|
9
|
+
success: z.boolean().describe('Whether the operation succeeded'),
|
|
10
|
+
key: z.string().describe('Secret key name that was deleted'),
|
|
11
|
+
path: z.string().describe('Local file path where secret was removed'),
|
|
12
|
+
});
|
|
6
13
|
|
|
7
14
|
export const deleteSubcommand = createSubcommand({
|
|
8
15
|
name: 'delete',
|
|
9
16
|
aliases: ['del', 'remove', 'rm'],
|
|
10
17
|
description: 'Delete a secret',
|
|
18
|
+
tags: ['destructive', 'deletes-resource', 'slow', 'requires-auth', 'requires-project'],
|
|
19
|
+
idempotent: true,
|
|
20
|
+
examples: [getCommand('secret delete OLD_API_KEY'), getCommand('secret rm DATABASE_URL')],
|
|
11
21
|
requires: { auth: true, project: true, apiClient: true },
|
|
12
22
|
schema: {
|
|
13
23
|
args: z.object({
|
|
14
24
|
key: z.string().describe('the secret key to delete'),
|
|
15
25
|
}),
|
|
26
|
+
response: SecretDeleteResponseSchema,
|
|
16
27
|
},
|
|
17
28
|
|
|
18
29
|
async handler(ctx) {
|
|
@@ -36,5 +47,11 @@ export const deleteSubcommand = createSubcommand({
|
|
|
36
47
|
await writeEnvFile(envFilePath, filteredEnv);
|
|
37
48
|
|
|
38
49
|
tui.success(`Secret '${args.key}' deleted successfully (cloud + ${envFilePath})`);
|
|
50
|
+
|
|
51
|
+
return {
|
|
52
|
+
success: true,
|
|
53
|
+
key: args.key,
|
|
54
|
+
path: envFilePath,
|
|
55
|
+
};
|
|
39
56
|
},
|
|
40
57
|
});
|
package/src/cmd/secret/get.ts
CHANGED
|
@@ -3,10 +3,22 @@ import { createSubcommand } from '../../types';
|
|
|
3
3
|
import * as tui from '../../tui';
|
|
4
4
|
import { projectGet } from '@agentuity/server';
|
|
5
5
|
import { maskSecret } from '../../env-util';
|
|
6
|
+
import { getCommand } from '../../command-prefix';
|
|
7
|
+
import { ErrorCode } from '../../errors';
|
|
8
|
+
|
|
9
|
+
const SecretGetResponseSchema = z.object({
|
|
10
|
+
key: z.string().describe('Secret key name'),
|
|
11
|
+
value: z.string().describe('Secret value'),
|
|
12
|
+
});
|
|
6
13
|
|
|
7
14
|
export const getSubcommand = createSubcommand({
|
|
8
15
|
name: 'get',
|
|
9
16
|
description: 'Get a secret value',
|
|
17
|
+
tags: ['read-only', 'fast', 'requires-auth', 'requires-project'],
|
|
18
|
+
examples: [
|
|
19
|
+
getCommand('secret get DATABASE_URL'),
|
|
20
|
+
getCommand('secret get STRIPE_SECRET_KEY --no-mask'),
|
|
21
|
+
],
|
|
10
22
|
requires: { auth: true, project: true, apiClient: true },
|
|
11
23
|
schema: {
|
|
12
24
|
args: z.object({
|
|
@@ -18,7 +30,9 @@ export const getSubcommand = createSubcommand({
|
|
|
18
30
|
.default(!!process.stdout.isTTY)
|
|
19
31
|
.describe('mask the value in output (default: true in TTY, false otherwise)'),
|
|
20
32
|
}),
|
|
33
|
+
response: SecretGetResponseSchema,
|
|
21
34
|
},
|
|
35
|
+
idempotent: true,
|
|
22
36
|
|
|
23
37
|
async handler(ctx) {
|
|
24
38
|
const { args, opts, apiClient, project } = ctx;
|
|
@@ -32,7 +46,7 @@ export const getSubcommand = createSubcommand({
|
|
|
32
46
|
const value = projectData.secrets?.[args.key];
|
|
33
47
|
|
|
34
48
|
if (value === undefined) {
|
|
35
|
-
tui.fatal(`Secret '${args.key}' not found
|
|
49
|
+
tui.fatal(`Secret '${args.key}' not found`, ErrorCode.RESOURCE_NOT_FOUND);
|
|
36
50
|
}
|
|
37
51
|
|
|
38
52
|
if (process.stdout.isTTY) {
|
|
@@ -50,5 +64,10 @@ export const getSubcommand = createSubcommand({
|
|
|
50
64
|
console.log(`${args.key}=${value}`);
|
|
51
65
|
}
|
|
52
66
|
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
key: args.key,
|
|
70
|
+
value,
|
|
71
|
+
};
|
|
53
72
|
},
|
|
54
73
|
});
|
package/src/cmd/secret/import.ts
CHANGED
|
@@ -9,15 +9,38 @@ import {
|
|
|
9
9
|
filterAgentuitySdkKeys,
|
|
10
10
|
mergeEnvVars,
|
|
11
11
|
} from '../../env-util';
|
|
12
|
+
import { getCommand } from '../../command-prefix';
|
|
13
|
+
|
|
14
|
+
const SecretImportResponseSchema = z.object({
|
|
15
|
+
success: z.boolean().describe('Whether import succeeded'),
|
|
16
|
+
imported: z.number().describe('Number of items imported'),
|
|
17
|
+
skipped: z.number().describe('Number of items skipped'),
|
|
18
|
+
path: z.string().describe('Local file path where secrets were saved'),
|
|
19
|
+
file: z.string().describe('Source file path'),
|
|
20
|
+
});
|
|
12
21
|
|
|
13
22
|
export const importSubcommand = createSubcommand({
|
|
14
23
|
name: 'import',
|
|
15
24
|
description: 'Import secrets from a file to cloud and local .env.production',
|
|
25
|
+
tags: [
|
|
26
|
+
'mutating',
|
|
27
|
+
'creates-resource',
|
|
28
|
+
'slow',
|
|
29
|
+
'api-intensive',
|
|
30
|
+
'requires-auth',
|
|
31
|
+
'requires-project',
|
|
32
|
+
],
|
|
33
|
+
examples: [
|
|
34
|
+
getCommand('secret import .env.local'),
|
|
35
|
+
getCommand('secret import .env.production.backup'),
|
|
36
|
+
],
|
|
37
|
+
idempotent: false,
|
|
16
38
|
requires: { auth: true, project: true, apiClient: true },
|
|
17
39
|
schema: {
|
|
18
40
|
args: z.object({
|
|
19
41
|
file: z.string().describe('path to the .env file to import'),
|
|
20
42
|
}),
|
|
43
|
+
response: SecretImportResponseSchema,
|
|
21
44
|
},
|
|
22
45
|
|
|
23
46
|
async handler(ctx) {
|
|
@@ -28,7 +51,13 @@ export const importSubcommand = createSubcommand({
|
|
|
28
51
|
|
|
29
52
|
if (Object.keys(importedSecrets).length === 0) {
|
|
30
53
|
tui.warning(`No secrets found in ${args.file}`);
|
|
31
|
-
return
|
|
54
|
+
return {
|
|
55
|
+
success: false,
|
|
56
|
+
imported: 0,
|
|
57
|
+
skipped: 0,
|
|
58
|
+
path: '',
|
|
59
|
+
file: args.file,
|
|
60
|
+
};
|
|
32
61
|
}
|
|
33
62
|
|
|
34
63
|
// Filter out AGENTUITY_ prefixed keys
|
|
@@ -36,7 +65,13 @@ export const importSubcommand = createSubcommand({
|
|
|
36
65
|
|
|
37
66
|
if (Object.keys(filteredSecrets).length === 0) {
|
|
38
67
|
tui.warning('No valid secrets to import (all were AGENTUITY_ prefixed)');
|
|
39
|
-
return
|
|
68
|
+
return {
|
|
69
|
+
success: false,
|
|
70
|
+
imported: 0,
|
|
71
|
+
skipped: Object.keys(importedSecrets).length,
|
|
72
|
+
path: '',
|
|
73
|
+
file: args.file,
|
|
74
|
+
};
|
|
40
75
|
}
|
|
41
76
|
|
|
42
77
|
// Push to cloud (using secrets field)
|
|
@@ -60,5 +95,13 @@ export const importSubcommand = createSubcommand({
|
|
|
60
95
|
tui.success(
|
|
61
96
|
`Imported ${count} secret${count !== 1 ? 's' : ''} from ${args.file} to cloud and ${localEnvPath}`
|
|
62
97
|
);
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
success: true,
|
|
101
|
+
imported: count,
|
|
102
|
+
skipped: Object.keys(importedSecrets).length - count,
|
|
103
|
+
path: localEnvPath,
|
|
104
|
+
file: args.file,
|
|
105
|
+
};
|
|
63
106
|
},
|
|
64
107
|
});
|
package/src/cmd/secret/index.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { listSubcommand } from './list';
|
|
|
10
10
|
export const command = createCommand({
|
|
11
11
|
name: 'secret',
|
|
12
12
|
description: 'Manage secrets for your project',
|
|
13
|
+
tags: ['fast', 'requires-auth', 'requires-project'],
|
|
13
14
|
subcommands: [
|
|
14
15
|
listSubcommand,
|
|
15
16
|
pullSubcommand,
|