@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,389 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import type { CommandDefinition, SubcommandDefinition, CommandSchemas } from './types';
|
|
3
|
+
import { parseArgsSchema, parseOptionsSchema } from './schema-parser';
|
|
4
|
+
import * as z from 'zod';
|
|
5
|
+
|
|
6
|
+
export interface SchemaArgument {
|
|
7
|
+
name: string;
|
|
8
|
+
type: string;
|
|
9
|
+
required: boolean;
|
|
10
|
+
variadic: boolean;
|
|
11
|
+
description?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface SchemaOption {
|
|
15
|
+
name: string;
|
|
16
|
+
type: 'string' | 'number' | 'boolean';
|
|
17
|
+
required: boolean;
|
|
18
|
+
default?: unknown;
|
|
19
|
+
description?: string;
|
|
20
|
+
enum?: string[];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface SchemaPagination {
|
|
24
|
+
supported: boolean;
|
|
25
|
+
defaultLimit?: number;
|
|
26
|
+
maxLimit?: number;
|
|
27
|
+
parameters?: {
|
|
28
|
+
limit?: string;
|
|
29
|
+
offset?: string;
|
|
30
|
+
cursor?: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface SchemaCommand {
|
|
35
|
+
name: string;
|
|
36
|
+
description: string;
|
|
37
|
+
aliases?: string[];
|
|
38
|
+
arguments?: SchemaArgument[];
|
|
39
|
+
options?: SchemaOption[];
|
|
40
|
+
examples?: string[];
|
|
41
|
+
response?: unknown;
|
|
42
|
+
idempotent?: boolean;
|
|
43
|
+
prerequisites?: string[];
|
|
44
|
+
pagination?: SchemaPagination;
|
|
45
|
+
tags?: string[];
|
|
46
|
+
subcommands?: SchemaCommand[];
|
|
47
|
+
requires?: {
|
|
48
|
+
auth?: boolean;
|
|
49
|
+
project?: boolean;
|
|
50
|
+
org?: boolean;
|
|
51
|
+
region?: boolean;
|
|
52
|
+
regions?: boolean;
|
|
53
|
+
};
|
|
54
|
+
optional?: {
|
|
55
|
+
auth?: boolean | string;
|
|
56
|
+
project?: boolean;
|
|
57
|
+
org?: boolean;
|
|
58
|
+
region?: boolean;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface CLISchema {
|
|
63
|
+
name: string;
|
|
64
|
+
version: string;
|
|
65
|
+
description: string;
|
|
66
|
+
exitCodes: Record<number, string>;
|
|
67
|
+
globalOptions: SchemaOption[];
|
|
68
|
+
commands: SchemaCommand[];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Extract schema information from a CommandDefinition
|
|
73
|
+
*/
|
|
74
|
+
function extractCommandSchema(def: CommandDefinition): SchemaCommand {
|
|
75
|
+
const schema: SchemaCommand = {
|
|
76
|
+
name: def.name,
|
|
77
|
+
description: def.description,
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
if (def.aliases) {
|
|
81
|
+
schema.aliases = def.aliases;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Extract examples if available
|
|
85
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
86
|
+
if ((def as any).examples) {
|
|
87
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
88
|
+
schema.examples = (def as any).examples;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Extract idempotent marker
|
|
92
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
93
|
+
if ((def as any).idempotent !== undefined) {
|
|
94
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
95
|
+
schema.idempotent = (def as any).idempotent;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Extract prerequisites
|
|
99
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
100
|
+
if ((def as any).prerequisites) {
|
|
101
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
102
|
+
schema.prerequisites = (def as any).prerequisites;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Extract pagination
|
|
106
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
107
|
+
if ((def as any).pagination) {
|
|
108
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
109
|
+
schema.pagination = (def as any).pagination;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Extract tags
|
|
113
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
114
|
+
if ((def as any).tags) {
|
|
115
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
116
|
+
schema.tags = (def as any).tags;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Extract requires/optional
|
|
120
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
121
|
+
const d = def as any;
|
|
122
|
+
if (d.requires) {
|
|
123
|
+
schema.requires = {
|
|
124
|
+
auth: d.requires.auth === true,
|
|
125
|
+
project: d.requires.project === true,
|
|
126
|
+
org: d.requires.org === true,
|
|
127
|
+
region: d.requires.region === true,
|
|
128
|
+
regions: d.requires.regions === true,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
if (d.optional) {
|
|
132
|
+
schema.optional = {
|
|
133
|
+
auth: d.optional.auth === true || typeof d.optional.auth === 'string',
|
|
134
|
+
project: d.optional.project === true,
|
|
135
|
+
org: d.optional.org === true,
|
|
136
|
+
region: d.optional.region === true,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Extract subcommands recursively
|
|
141
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
142
|
+
if ((def as any).subcommands) {
|
|
143
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
144
|
+
schema.subcommands = ((def as any).subcommands as SubcommandDefinition[]).map((sub) =>
|
|
145
|
+
extractSubcommandSchema(sub)
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return schema;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Extract schema information from a SubcommandDefinition
|
|
154
|
+
*/
|
|
155
|
+
function extractSubcommandSchema(def: SubcommandDefinition): SchemaCommand {
|
|
156
|
+
const schema: SchemaCommand = {
|
|
157
|
+
name: def.name,
|
|
158
|
+
description: def.description,
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
if (def.aliases) {
|
|
162
|
+
schema.aliases = def.aliases;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Extract examples if available
|
|
166
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
167
|
+
if ((def as any).examples) {
|
|
168
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
169
|
+
schema.examples = (def as any).examples;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// Extract idempotent marker
|
|
173
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
174
|
+
if ((def as any).idempotent !== undefined) {
|
|
175
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
176
|
+
schema.idempotent = (def as any).idempotent;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// Extract prerequisites
|
|
180
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
181
|
+
if ((def as any).prerequisites) {
|
|
182
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
183
|
+
schema.prerequisites = (def as any).prerequisites;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// Extract pagination
|
|
187
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
188
|
+
if ((def as any).pagination) {
|
|
189
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
190
|
+
schema.pagination = (def as any).pagination;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// Extract tags
|
|
194
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
195
|
+
if ((def as any).tags) {
|
|
196
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
197
|
+
schema.tags = (def as any).tags;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// Extract requires/optional
|
|
201
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
202
|
+
const d = def as any;
|
|
203
|
+
if (d.requires) {
|
|
204
|
+
schema.requires = {
|
|
205
|
+
auth: d.requires.auth === true,
|
|
206
|
+
project: d.requires.project === true,
|
|
207
|
+
org: d.requires.org === true,
|
|
208
|
+
region: d.requires.region === true,
|
|
209
|
+
regions: d.requires.regions === true,
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
if (d.optional) {
|
|
213
|
+
schema.optional = {
|
|
214
|
+
auth: d.optional.auth === true || typeof d.optional.auth === 'string',
|
|
215
|
+
project: d.optional.project === true,
|
|
216
|
+
org: d.optional.org === true,
|
|
217
|
+
region: d.optional.region === true,
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// Extract args and options from schema if available
|
|
222
|
+
if (d.schema) {
|
|
223
|
+
const schemas = d.schema as CommandSchemas;
|
|
224
|
+
|
|
225
|
+
if (schemas.args) {
|
|
226
|
+
const parsedArgs = parseArgsSchema(schemas.args);
|
|
227
|
+
schema.arguments = parsedArgs.metadata.map((arg) => ({
|
|
228
|
+
name: arg.name,
|
|
229
|
+
type: arg.variadic ? 'array' : 'string',
|
|
230
|
+
required: !arg.optional,
|
|
231
|
+
variadic: arg.variadic,
|
|
232
|
+
}));
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if (schemas.options) {
|
|
236
|
+
const parsedOptions = parseOptionsSchema(schemas.options);
|
|
237
|
+
schema.options = parsedOptions.map((opt) => ({
|
|
238
|
+
name: opt.name,
|
|
239
|
+
type: opt.type,
|
|
240
|
+
required: !opt.hasDefault,
|
|
241
|
+
default: opt.defaultValue,
|
|
242
|
+
description: opt.description,
|
|
243
|
+
}));
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
if (schemas.response) {
|
|
247
|
+
schema.response = z.toJSONSchema(schemas.response);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// Extract nested subcommands recursively
|
|
252
|
+
if (d.subcommands) {
|
|
253
|
+
schema.subcommands = (d.subcommands as SubcommandDefinition[]).map((sub) =>
|
|
254
|
+
extractSubcommandSchema(sub)
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
return schema;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Generate JSON schema for the entire CLI
|
|
263
|
+
*/
|
|
264
|
+
export function generateCLISchema(
|
|
265
|
+
program: Command,
|
|
266
|
+
commands: CommandDefinition[],
|
|
267
|
+
version: string
|
|
268
|
+
): CLISchema {
|
|
269
|
+
const schema: CLISchema = {
|
|
270
|
+
name: 'agentuity',
|
|
271
|
+
version,
|
|
272
|
+
description: 'Agentuity CLI',
|
|
273
|
+
exitCodes: {
|
|
274
|
+
0: 'Success',
|
|
275
|
+
1: 'General error',
|
|
276
|
+
2: 'Validation error (invalid arguments or options)',
|
|
277
|
+
3: 'Authentication error (login required or credentials invalid)',
|
|
278
|
+
4: 'Resource not found (project, file, deployment, etc.)',
|
|
279
|
+
5: 'Permission denied (insufficient access rights)',
|
|
280
|
+
6: 'Network error (API unreachable or timeout)',
|
|
281
|
+
7: 'File system error (file read/write failed)',
|
|
282
|
+
8: 'User cancelled (operation aborted by user)',
|
|
283
|
+
},
|
|
284
|
+
globalOptions: [
|
|
285
|
+
{
|
|
286
|
+
name: 'config',
|
|
287
|
+
type: 'string',
|
|
288
|
+
required: false,
|
|
289
|
+
description: 'Config file path',
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
name: 'log-level',
|
|
293
|
+
type: 'string',
|
|
294
|
+
required: false,
|
|
295
|
+
default: 'info',
|
|
296
|
+
description: 'Log level',
|
|
297
|
+
enum: ['debug', 'trace', 'info', 'warn', 'error'],
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
name: 'log-timestamp',
|
|
301
|
+
type: 'boolean',
|
|
302
|
+
required: false,
|
|
303
|
+
default: false,
|
|
304
|
+
description: 'Show timestamps in log output',
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
name: 'log-prefix',
|
|
308
|
+
type: 'boolean',
|
|
309
|
+
required: false,
|
|
310
|
+
default: true,
|
|
311
|
+
description: 'Show log level prefixes',
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
name: 'org-id',
|
|
315
|
+
type: 'string',
|
|
316
|
+
required: false,
|
|
317
|
+
description: 'Use a specific organization when performing operations',
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
name: 'color-scheme',
|
|
321
|
+
type: 'string',
|
|
322
|
+
required: false,
|
|
323
|
+
description: 'Color scheme: light or dark',
|
|
324
|
+
enum: ['light', 'dark'],
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
name: 'color',
|
|
328
|
+
type: 'string',
|
|
329
|
+
required: false,
|
|
330
|
+
default: 'auto',
|
|
331
|
+
description: 'Color output: auto, always, never',
|
|
332
|
+
enum: ['auto', 'always', 'never'],
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
name: 'error-format',
|
|
336
|
+
type: 'string',
|
|
337
|
+
required: false,
|
|
338
|
+
default: 'text',
|
|
339
|
+
description: 'Error output format: json or text',
|
|
340
|
+
enum: ['json', 'text'],
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
name: 'json',
|
|
344
|
+
type: 'boolean',
|
|
345
|
+
required: false,
|
|
346
|
+
default: false,
|
|
347
|
+
description: 'Output in JSON format (machine-readable)',
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
name: 'quiet',
|
|
351
|
+
type: 'boolean',
|
|
352
|
+
required: false,
|
|
353
|
+
default: false,
|
|
354
|
+
description: 'Suppress non-essential output',
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
name: 'no-progress',
|
|
358
|
+
type: 'boolean',
|
|
359
|
+
required: false,
|
|
360
|
+
default: false,
|
|
361
|
+
description: 'Disable progress indicators',
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
name: 'explain',
|
|
365
|
+
type: 'boolean',
|
|
366
|
+
required: false,
|
|
367
|
+
default: false,
|
|
368
|
+
description: 'Show what the command would do without executing',
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
name: 'dry-run',
|
|
372
|
+
type: 'boolean',
|
|
373
|
+
required: false,
|
|
374
|
+
default: false,
|
|
375
|
+
description: 'Execute command without making changes',
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
name: 'validate',
|
|
379
|
+
type: 'boolean',
|
|
380
|
+
required: false,
|
|
381
|
+
default: false,
|
|
382
|
+
description: 'Validate arguments and options without executing',
|
|
383
|
+
},
|
|
384
|
+
],
|
|
385
|
+
commands: commands.map(extractCommandSchema),
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
return schema;
|
|
389
|
+
}
|
package/src/tui.ts
CHANGED
|
@@ -5,12 +5,14 @@
|
|
|
5
5
|
* Uses Bun's built-in color support and ANSI escape codes.
|
|
6
6
|
*/
|
|
7
7
|
import { stringWidth } from 'bun';
|
|
8
|
+
import { colorize } from 'json-colorizer';
|
|
8
9
|
import enquirer from 'enquirer';
|
|
9
10
|
import { type OrganizationList, projectList } from '@agentuity/server';
|
|
11
|
+
import * as readline from 'readline';
|
|
10
12
|
import type { ColorScheme } from './terminal';
|
|
11
13
|
import type { Profile } from './types';
|
|
12
14
|
import { type APIClient as APIClientType } from './api';
|
|
13
|
-
import
|
|
15
|
+
import { getExitCode } from './errors';
|
|
14
16
|
|
|
15
17
|
// Icons
|
|
16
18
|
const ICONS = {
|
|
@@ -100,13 +102,46 @@ function getColor(colorKey: keyof ReturnType<typeof getColors>): string {
|
|
|
100
102
|
return color[currentColorScheme];
|
|
101
103
|
}
|
|
102
104
|
|
|
105
|
+
/**
|
|
106
|
+
* Color helpers that return colored strings (for inline use, no icons)
|
|
107
|
+
*/
|
|
108
|
+
export function colorSuccess(text: string): string {
|
|
109
|
+
const color = getColor('success');
|
|
110
|
+
const reset = getColor('reset');
|
|
111
|
+
return `${color}${text}${reset}`;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function colorError(text: string): string {
|
|
115
|
+
const color = getColor('error');
|
|
116
|
+
const reset = getColor('reset');
|
|
117
|
+
return `${color}${text}${reset}`;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function colorWarning(text: string): string {
|
|
121
|
+
const color = getColor('warning');
|
|
122
|
+
const reset = getColor('reset');
|
|
123
|
+
return `${color}${text}${reset}`;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function colorInfo(text: string): string {
|
|
127
|
+
const color = getColor('info');
|
|
128
|
+
const reset = getColor('reset');
|
|
129
|
+
return `${color}${text}${reset}`;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function colorMuted(text: string): string {
|
|
133
|
+
const color = getColor('muted');
|
|
134
|
+
const reset = getColor('reset');
|
|
135
|
+
return `${color}${text}${reset}`;
|
|
136
|
+
}
|
|
137
|
+
|
|
103
138
|
/**
|
|
104
139
|
* Print a success message with a green checkmark
|
|
105
140
|
*/
|
|
106
141
|
export function success(message: string): void {
|
|
107
142
|
const color = getColor('success');
|
|
108
143
|
const reset = getColor('reset');
|
|
109
|
-
|
|
144
|
+
process.stderr.write(`${color}${ICONS.success} ${message}${reset}\n`);
|
|
110
145
|
}
|
|
111
146
|
|
|
112
147
|
/**
|
|
@@ -115,17 +150,23 @@ export function success(message: string): void {
|
|
|
115
150
|
export function error(message: string): void {
|
|
116
151
|
const color = getColor('error');
|
|
117
152
|
const reset = getColor('reset');
|
|
118
|
-
|
|
153
|
+
process.stderr.write(`${color}${ICONS.error} ${message}${reset}\n`);
|
|
119
154
|
}
|
|
120
155
|
|
|
121
156
|
/**
|
|
122
157
|
* Print an error message with a red X and then exit
|
|
123
158
|
*/
|
|
124
|
-
export function fatal(message: string): never {
|
|
159
|
+
export function fatal(message: string, errorCode?: import('./errors').ErrorCode): never {
|
|
125
160
|
const color = getColor('error');
|
|
126
161
|
const reset = getColor('reset');
|
|
127
|
-
|
|
128
|
-
|
|
162
|
+
process.stderr.write(`${color}${ICONS.error} ${message}${reset}\n`);
|
|
163
|
+
|
|
164
|
+
if (errorCode) {
|
|
165
|
+
const exitCode = getExitCode(errorCode);
|
|
166
|
+
process.exit(exitCode);
|
|
167
|
+
} else {
|
|
168
|
+
process.exit(1);
|
|
169
|
+
}
|
|
129
170
|
}
|
|
130
171
|
|
|
131
172
|
/**
|
|
@@ -134,7 +175,7 @@ export function fatal(message: string): never {
|
|
|
134
175
|
export function warning(message: string, asError = false): void {
|
|
135
176
|
const color = asError ? getColor('error') : getColor('warning');
|
|
136
177
|
const reset = getColor('reset');
|
|
137
|
-
|
|
178
|
+
process.stderr.write(`${color}${ICONS.warning} ${message}${reset}\n`);
|
|
138
179
|
}
|
|
139
180
|
|
|
140
181
|
/**
|
|
@@ -143,7 +184,7 @@ export function warning(message: string, asError = false): void {
|
|
|
143
184
|
export function info(message: string): void {
|
|
144
185
|
const color = getColor('info');
|
|
145
186
|
const reset = getColor('reset');
|
|
146
|
-
|
|
187
|
+
process.stderr.write(`${color}${ICONS.info} ${message}${reset}\n`);
|
|
147
188
|
}
|
|
148
189
|
|
|
149
190
|
/**
|
|
@@ -213,21 +254,21 @@ function supportsHyperlinks(): boolean {
|
|
|
213
254
|
* Print a bulleted list item
|
|
214
255
|
*/
|
|
215
256
|
export function bullet(message: string): void {
|
|
216
|
-
|
|
257
|
+
process.stderr.write(`${ICONS.bullet} ${message}\n`);
|
|
217
258
|
}
|
|
218
259
|
|
|
219
260
|
/**
|
|
220
261
|
* Print an arrow item (for showing next steps)
|
|
221
262
|
*/
|
|
222
263
|
export function arrow(message: string): void {
|
|
223
|
-
|
|
264
|
+
process.stderr.write(`${ICONS.arrow} ${message}\n`);
|
|
224
265
|
}
|
|
225
266
|
|
|
226
267
|
/**
|
|
227
268
|
* Print a blank line
|
|
228
269
|
*/
|
|
229
270
|
export function newline(): void {
|
|
230
|
-
|
|
271
|
+
process.stderr.write('\n');
|
|
231
272
|
}
|
|
232
273
|
|
|
233
274
|
/**
|
|
@@ -774,8 +815,13 @@ export async function spinner<T>(
|
|
|
774
815
|
const message = options.message;
|
|
775
816
|
const reset = getColor('reset');
|
|
776
817
|
|
|
777
|
-
//
|
|
778
|
-
|
|
818
|
+
// Check if progress should be disabled (from global options)
|
|
819
|
+
const { getOutputOptions, shouldDisableProgress } = await import('./output');
|
|
820
|
+
const outputOptions = getOutputOptions();
|
|
821
|
+
const noProgress = outputOptions ? shouldDisableProgress(outputOptions) : false;
|
|
822
|
+
|
|
823
|
+
// If no TTY or progress disabled, just execute the callback without animation
|
|
824
|
+
if (!process.stderr.isTTY || noProgress) {
|
|
779
825
|
try {
|
|
780
826
|
const result =
|
|
781
827
|
options.type === 'progress'
|
|
@@ -1293,3 +1339,28 @@ export async function showProfileList(
|
|
|
1293
1339
|
|
|
1294
1340
|
return response.name;
|
|
1295
1341
|
}
|
|
1342
|
+
|
|
1343
|
+
export function json(value: unknown) {
|
|
1344
|
+
const stringValue = typeof value === 'string' ? value : JSON.stringify(value, null, 2);
|
|
1345
|
+
|
|
1346
|
+
if (shouldUseColors() && process.stdout.isTTY) {
|
|
1347
|
+
try {
|
|
1348
|
+
console.log(colorize(stringValue));
|
|
1349
|
+
return;
|
|
1350
|
+
} catch {
|
|
1351
|
+
/* */
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
console.log(stringValue);
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
export function plural(count: number, singular: string, plural: string): string {
|
|
1358
|
+
switch (count) {
|
|
1359
|
+
case 0:
|
|
1360
|
+
return plural;
|
|
1361
|
+
case 1:
|
|
1362
|
+
return singular;
|
|
1363
|
+
default:
|
|
1364
|
+
return plural;
|
|
1365
|
+
}
|
|
1366
|
+
}
|
package/src/types.ts
CHANGED
|
@@ -104,11 +104,31 @@ export interface GlobalOptions {
|
|
|
104
104
|
logTimestamp?: boolean;
|
|
105
105
|
logPrefix?: boolean;
|
|
106
106
|
orgId?: string;
|
|
107
|
+
errorFormat?: 'json' | 'text';
|
|
108
|
+
json?: boolean;
|
|
109
|
+
quiet?: boolean;
|
|
110
|
+
noProgress?: boolean;
|
|
111
|
+
color?: 'auto' | 'always' | 'never';
|
|
112
|
+
explain?: boolean;
|
|
113
|
+
dryRun?: boolean;
|
|
114
|
+
validate?: boolean;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface PaginationInfo {
|
|
118
|
+
supported: boolean;
|
|
119
|
+
defaultLimit?: number;
|
|
120
|
+
maxLimit?: number;
|
|
121
|
+
parameters?: {
|
|
122
|
+
limit?: string;
|
|
123
|
+
offset?: string;
|
|
124
|
+
cursor?: string;
|
|
125
|
+
};
|
|
107
126
|
}
|
|
108
127
|
|
|
109
128
|
export interface CommandSchemas {
|
|
110
129
|
args?: z.ZodType;
|
|
111
130
|
options?: z.ZodType;
|
|
131
|
+
response?: z.ZodType;
|
|
112
132
|
}
|
|
113
133
|
|
|
114
134
|
export type ProjectConfig = zod.infer<typeof ProjectSchema>;
|
|
@@ -240,14 +260,19 @@ export function createSubcommand<
|
|
|
240
260
|
toplevel?: boolean;
|
|
241
261
|
requires?: R;
|
|
242
262
|
optional?: O;
|
|
263
|
+
examples?: string[];
|
|
264
|
+
idempotent?: boolean;
|
|
265
|
+
prerequisites?: string[];
|
|
266
|
+
pagination?: PaginationInfo;
|
|
267
|
+
tags?: string[];
|
|
243
268
|
schema?: A extends z.ZodType
|
|
244
269
|
? Op extends z.ZodType
|
|
245
|
-
? { args: A; options: Op }
|
|
246
|
-
: { args: A }
|
|
270
|
+
? { args: A; options: Op; response?: z.ZodType }
|
|
271
|
+
: { args: A; response?: z.ZodType }
|
|
247
272
|
: Op extends z.ZodType
|
|
248
|
-
? { options: Op }
|
|
249
|
-
:
|
|
250
|
-
handler(ctx: CommandContext<R, O, A, Op>):
|
|
273
|
+
? { options: Op; response?: z.ZodType }
|
|
274
|
+
: { response?: z.ZodType };
|
|
275
|
+
handler(ctx: CommandContext<R, O, A, Op>): unknown | Promise<unknown>;
|
|
251
276
|
}): SubcommandDefinition {
|
|
252
277
|
return definition as unknown as SubcommandDefinition;
|
|
253
278
|
}
|
|
@@ -265,14 +290,19 @@ export function createCommand<
|
|
|
265
290
|
hidden?: boolean;
|
|
266
291
|
requires?: R;
|
|
267
292
|
optional?: O;
|
|
293
|
+
examples?: string[];
|
|
294
|
+
idempotent?: boolean;
|
|
295
|
+
prerequisites?: string[];
|
|
296
|
+
pagination?: PaginationInfo;
|
|
297
|
+
tags?: string[];
|
|
268
298
|
schema?: A extends z.ZodType
|
|
269
299
|
? Op extends z.ZodType
|
|
270
|
-
? { args: A; options: Op }
|
|
271
|
-
: { args: A }
|
|
300
|
+
? { args: A; options: Op; response?: z.ZodType }
|
|
301
|
+
: { args: A; response?: z.ZodType }
|
|
272
302
|
: Op extends z.ZodType
|
|
273
|
-
? { options: Op }
|
|
274
|
-
:
|
|
275
|
-
handler?(ctx: CommandContext<R, O, A, Op>):
|
|
303
|
+
? { options: Op; response?: z.ZodType }
|
|
304
|
+
: { response?: z.ZodType };
|
|
305
|
+
handler?(ctx: CommandContext<R, O, A, Op>): unknown | Promise<unknown>;
|
|
276
306
|
subcommands?: SubcommandDefinition[];
|
|
277
307
|
}): CommandDefinition {
|
|
278
308
|
return definition as unknown as CommandDefinition;
|
|
@@ -284,8 +314,13 @@ type CommandDefBase =
|
|
|
284
314
|
description: string;
|
|
285
315
|
aliases?: string[];
|
|
286
316
|
banner?: boolean;
|
|
317
|
+
examples?: string[];
|
|
318
|
+
idempotent?: boolean;
|
|
319
|
+
prerequisites?: string[];
|
|
320
|
+
pagination?: PaginationInfo;
|
|
321
|
+
tags?: string[];
|
|
287
322
|
schema?: CommandSchemas;
|
|
288
|
-
handler(ctx: CommandContext):
|
|
323
|
+
handler(ctx: CommandContext): unknown | Promise<unknown>;
|
|
289
324
|
subcommands?: SubcommandDefinition[];
|
|
290
325
|
}
|
|
291
326
|
| {
|
|
@@ -293,6 +328,11 @@ type CommandDefBase =
|
|
|
293
328
|
description: string;
|
|
294
329
|
aliases?: string[];
|
|
295
330
|
banner?: boolean;
|
|
331
|
+
examples?: string[];
|
|
332
|
+
idempotent?: boolean;
|
|
333
|
+
prerequisites?: string[];
|
|
334
|
+
pagination?: PaginationInfo;
|
|
335
|
+
tags?: string[];
|
|
296
336
|
schema?: CommandSchemas;
|
|
297
337
|
handler?: undefined;
|
|
298
338
|
subcommands: SubcommandDefinition[];
|
|
@@ -305,8 +345,13 @@ type SubcommandDefBase =
|
|
|
305
345
|
aliases?: string[];
|
|
306
346
|
toplevel?: boolean;
|
|
307
347
|
banner?: boolean;
|
|
348
|
+
examples?: string[];
|
|
349
|
+
idempotent?: boolean;
|
|
350
|
+
prerequisites?: string[];
|
|
351
|
+
pagination?: PaginationInfo;
|
|
352
|
+
tags?: string[];
|
|
308
353
|
schema?: CommandSchemas;
|
|
309
|
-
handler(ctx: CommandContext):
|
|
354
|
+
handler(ctx: CommandContext): unknown | Promise<unknown>;
|
|
310
355
|
subcommands?: SubcommandDefinition[];
|
|
311
356
|
}
|
|
312
357
|
| {
|
|
@@ -315,6 +360,11 @@ type SubcommandDefBase =
|
|
|
315
360
|
aliases?: string[];
|
|
316
361
|
toplevel?: boolean;
|
|
317
362
|
banner?: boolean;
|
|
363
|
+
examples?: string[];
|
|
364
|
+
idempotent?: boolean;
|
|
365
|
+
prerequisites?: string[];
|
|
366
|
+
pagination?: PaginationInfo;
|
|
367
|
+
tags?: string[];
|
|
318
368
|
schema?: CommandSchemas;
|
|
319
369
|
handler?: undefined;
|
|
320
370
|
subcommands: SubcommandDefinition[];
|