@agentuity/cli 0.0.47 → 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.
Files changed (262) hide show
  1. package/bin/cli.ts +26 -5
  2. package/dist/banner.d.ts +1 -1
  3. package/dist/banner.d.ts.map +1 -1
  4. package/dist/cli-logger.d.ts +27 -0
  5. package/dist/cli-logger.d.ts.map +1 -0
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cmd/auth/index.d.ts.map +1 -1
  8. package/dist/cmd/auth/login.d.ts.map +1 -1
  9. package/dist/cmd/auth/logout.d.ts.map +1 -1
  10. package/dist/cmd/auth/signup.d.ts.map +1 -1
  11. package/dist/cmd/auth/ssh/add.d.ts.map +1 -1
  12. package/dist/cmd/auth/ssh/delete.d.ts.map +1 -1
  13. package/dist/cmd/auth/ssh/index.d.ts +1 -2
  14. package/dist/cmd/auth/ssh/index.d.ts.map +1 -1
  15. package/dist/cmd/auth/ssh/list.d.ts.map +1 -1
  16. package/dist/cmd/auth/whoami.d.ts.map +1 -1
  17. package/dist/cmd/bundle/ast.d.ts.map +1 -1
  18. package/dist/cmd/bundle/index.d.ts.map +1 -1
  19. package/dist/cmd/bundle/plugin.d.ts.map +1 -1
  20. package/dist/cmd/capabilities/index.d.ts +4 -0
  21. package/dist/cmd/capabilities/index.d.ts.map +1 -0
  22. package/dist/cmd/capabilities/show.d.ts +20 -0
  23. package/dist/cmd/capabilities/show.d.ts.map +1 -0
  24. package/dist/cmd/cloud/deploy.d.ts.map +1 -1
  25. package/dist/cmd/cloud/deployment/index.d.ts +2 -0
  26. package/dist/cmd/cloud/deployment/index.d.ts.map +1 -0
  27. package/dist/cmd/cloud/deployment/list.d.ts +2 -0
  28. package/dist/cmd/cloud/deployment/list.d.ts.map +1 -0
  29. package/dist/cmd/cloud/deployment/remove.d.ts +2 -0
  30. package/dist/cmd/cloud/deployment/remove.d.ts.map +1 -0
  31. package/dist/cmd/cloud/deployment/rollback.d.ts +2 -0
  32. package/dist/cmd/cloud/deployment/rollback.d.ts.map +1 -0
  33. package/dist/cmd/cloud/deployment/show.d.ts +2 -0
  34. package/dist/cmd/cloud/deployment/show.d.ts.map +1 -0
  35. package/dist/cmd/cloud/deployment/undeploy.d.ts +2 -0
  36. package/dist/cmd/cloud/deployment/undeploy.d.ts.map +1 -0
  37. package/dist/cmd/cloud/deployment/utils.d.ts +7 -0
  38. package/dist/cmd/cloud/deployment/utils.d.ts.map +1 -0
  39. package/dist/cmd/cloud/domain.d.ts.map +1 -1
  40. package/dist/cmd/cloud/index.d.ts.map +1 -1
  41. package/dist/cmd/cloud/resource/add.d.ts.map +1 -1
  42. package/dist/cmd/cloud/resource/delete.d.ts.map +1 -1
  43. package/dist/cmd/cloud/resource/index.d.ts +1 -2
  44. package/dist/cmd/cloud/resource/index.d.ts.map +1 -1
  45. package/dist/cmd/cloud/resource/list.d.ts.map +1 -1
  46. package/dist/cmd/cloud/scp/download.d.ts.map +1 -1
  47. package/dist/cmd/cloud/scp/index.d.ts +1 -2
  48. package/dist/cmd/cloud/scp/index.d.ts.map +1 -1
  49. package/dist/cmd/cloud/scp/upload.d.ts.map +1 -1
  50. package/dist/cmd/cloud/ssh.d.ts.map +1 -1
  51. package/dist/cmd/dev/index.d.ts.map +1 -1
  52. package/dist/cmd/env/delete.d.ts.map +1 -1
  53. package/dist/cmd/env/get.d.ts.map +1 -1
  54. package/dist/cmd/env/import.d.ts.map +1 -1
  55. package/dist/cmd/env/index.d.ts.map +1 -1
  56. package/dist/cmd/env/list.d.ts.map +1 -1
  57. package/dist/cmd/env/pull.d.ts.map +1 -1
  58. package/dist/cmd/env/push.d.ts.map +1 -1
  59. package/dist/cmd/env/set.d.ts.map +1 -1
  60. package/dist/cmd/index.d.ts.map +1 -1
  61. package/dist/cmd/kv/create-namespace.d.ts +3 -0
  62. package/dist/cmd/kv/create-namespace.d.ts.map +1 -0
  63. package/dist/cmd/kv/delete-namespace.d.ts +3 -0
  64. package/dist/cmd/kv/delete-namespace.d.ts.map +1 -0
  65. package/dist/cmd/kv/delete.d.ts +3 -0
  66. package/dist/cmd/kv/delete.d.ts.map +1 -0
  67. package/dist/cmd/kv/get.d.ts +3 -0
  68. package/dist/cmd/kv/get.d.ts.map +1 -0
  69. package/dist/cmd/kv/index.d.ts +2 -0
  70. package/dist/cmd/kv/index.d.ts.map +1 -0
  71. package/dist/cmd/kv/keys.d.ts +3 -0
  72. package/dist/cmd/kv/keys.d.ts.map +1 -0
  73. package/dist/cmd/kv/list-namespaces.d.ts +3 -0
  74. package/dist/cmd/kv/list-namespaces.d.ts.map +1 -0
  75. package/dist/cmd/kv/repl.d.ts +3 -0
  76. package/dist/cmd/kv/repl.d.ts.map +1 -0
  77. package/dist/cmd/kv/search.d.ts +3 -0
  78. package/dist/cmd/kv/search.d.ts.map +1 -0
  79. package/dist/cmd/kv/set.d.ts +3 -0
  80. package/dist/cmd/kv/set.d.ts.map +1 -0
  81. package/dist/cmd/kv/stats.d.ts +3 -0
  82. package/dist/cmd/kv/stats.d.ts.map +1 -0
  83. package/dist/cmd/kv/util.d.ts +8 -0
  84. package/dist/cmd/kv/util.d.ts.map +1 -0
  85. package/dist/cmd/objectstore/delete-bucket.d.ts +3 -0
  86. package/dist/cmd/objectstore/delete-bucket.d.ts.map +1 -0
  87. package/dist/cmd/objectstore/delete.d.ts +3 -0
  88. package/dist/cmd/objectstore/delete.d.ts.map +1 -0
  89. package/dist/cmd/objectstore/get.d.ts +3 -0
  90. package/dist/cmd/objectstore/get.d.ts.map +1 -0
  91. package/dist/cmd/objectstore/index.d.ts +2 -0
  92. package/dist/cmd/objectstore/index.d.ts.map +1 -0
  93. package/dist/cmd/objectstore/list-buckets.d.ts +3 -0
  94. package/dist/cmd/objectstore/list-buckets.d.ts.map +1 -0
  95. package/dist/cmd/objectstore/list-keys.d.ts +3 -0
  96. package/dist/cmd/objectstore/list-keys.d.ts.map +1 -0
  97. package/dist/cmd/objectstore/put.d.ts +3 -0
  98. package/dist/cmd/objectstore/put.d.ts.map +1 -0
  99. package/dist/cmd/objectstore/repl.d.ts +3 -0
  100. package/dist/cmd/objectstore/repl.d.ts.map +1 -0
  101. package/dist/cmd/objectstore/url.d.ts +3 -0
  102. package/dist/cmd/objectstore/url.d.ts.map +1 -0
  103. package/dist/cmd/objectstore/util.d.ts +8 -0
  104. package/dist/cmd/objectstore/util.d.ts.map +1 -0
  105. package/dist/cmd/profile/create.d.ts.map +1 -1
  106. package/dist/cmd/profile/delete.d.ts.map +1 -1
  107. package/dist/cmd/profile/index.d.ts.map +1 -1
  108. package/dist/cmd/profile/list.d.ts +1 -2
  109. package/dist/cmd/profile/list.d.ts.map +1 -1
  110. package/dist/cmd/profile/show.d.ts.map +1 -1
  111. package/dist/cmd/profile/use.d.ts.map +1 -1
  112. package/dist/cmd/project/create.d.ts.map +1 -1
  113. package/dist/cmd/project/delete.d.ts.map +1 -1
  114. package/dist/cmd/project/index.d.ts.map +1 -1
  115. package/dist/cmd/project/list.d.ts.map +1 -1
  116. package/dist/cmd/project/show.d.ts.map +1 -1
  117. package/dist/cmd/project/template-flow.d.ts +1 -1
  118. package/dist/cmd/project/template-flow.d.ts.map +1 -1
  119. package/dist/cmd/prompt/index.d.ts +4 -0
  120. package/dist/cmd/prompt/index.d.ts.map +1 -0
  121. package/dist/cmd/prompt/llm.d.ts +3 -0
  122. package/dist/cmd/prompt/llm.d.ts.map +1 -0
  123. package/dist/cmd/repl/index.d.ts +3 -0
  124. package/dist/cmd/repl/index.d.ts.map +1 -0
  125. package/dist/cmd/schema/index.d.ts +4 -0
  126. package/dist/cmd/schema/index.d.ts.map +1 -0
  127. package/dist/cmd/schema/show.d.ts +3 -0
  128. package/dist/cmd/schema/show.d.ts.map +1 -0
  129. package/dist/cmd/secret/delete.d.ts.map +1 -1
  130. package/dist/cmd/secret/get.d.ts.map +1 -1
  131. package/dist/cmd/secret/import.d.ts.map +1 -1
  132. package/dist/cmd/secret/index.d.ts.map +1 -1
  133. package/dist/cmd/secret/list.d.ts.map +1 -1
  134. package/dist/cmd/secret/pull.d.ts.map +1 -1
  135. package/dist/cmd/secret/push.d.ts.map +1 -1
  136. package/dist/cmd/secret/set.d.ts.map +1 -1
  137. package/dist/cmd/version/index.d.ts.map +1 -1
  138. package/dist/config.d.ts +1 -1
  139. package/dist/config.d.ts.map +1 -1
  140. package/dist/errors.d.ts +83 -0
  141. package/dist/errors.d.ts.map +1 -0
  142. package/dist/explain.d.ts +47 -0
  143. package/dist/explain.d.ts.map +1 -0
  144. package/dist/index.d.ts +6 -0
  145. package/dist/index.d.ts.map +1 -1
  146. package/dist/json.d.ts +3 -0
  147. package/dist/json.d.ts.map +1 -0
  148. package/dist/output.d.ts +136 -0
  149. package/dist/output.d.ts.map +1 -0
  150. package/dist/repl.d.ts +124 -0
  151. package/dist/repl.d.ts.map +1 -0
  152. package/dist/schema-generator.d.ts +67 -0
  153. package/dist/schema-generator.d.ts.map +1 -0
  154. package/dist/tui.d.ts +20 -1
  155. package/dist/tui.d.ts.map +1 -1
  156. package/dist/types.d.ts +65 -6
  157. package/dist/types.d.ts.map +1 -1
  158. package/package.json +10 -4
  159. package/src/banner.ts +7 -7
  160. package/src/cli-logger.ts +80 -0
  161. package/src/cli.ts +186 -54
  162. package/src/cmd/auth/index.ts +1 -0
  163. package/src/cmd/auth/login.ts +7 -2
  164. package/src/cmd/auth/logout.ts +4 -0
  165. package/src/cmd/auth/signup.ts +7 -2
  166. package/src/cmd/auth/ssh/add.ts +20 -3
  167. package/src/cmd/auth/ssh/delete.ts +57 -4
  168. package/src/cmd/auth/ssh/index.ts +4 -3
  169. package/src/cmd/auth/ssh/list.ts +44 -32
  170. package/src/cmd/auth/whoami.ts +32 -21
  171. package/src/cmd/bundle/ast.ts +27 -5
  172. package/src/cmd/bundle/index.ts +20 -0
  173. package/src/cmd/bundle/plugin.ts +36 -12
  174. package/src/cmd/capabilities/index.ts +12 -0
  175. package/src/cmd/capabilities/show.ts +256 -0
  176. package/src/cmd/cloud/deploy.ts +60 -0
  177. package/src/cmd/cloud/deployment/index.ts +20 -0
  178. package/src/cmd/cloud/deployment/list.ts +105 -0
  179. package/src/cmd/cloud/deployment/remove.ts +65 -0
  180. package/src/cmd/cloud/deployment/rollback.ts +87 -0
  181. package/src/cmd/cloud/deployment/show.ts +107 -0
  182. package/src/cmd/cloud/deployment/undeploy.ts +48 -0
  183. package/src/cmd/cloud/deployment/utils.ts +14 -0
  184. package/src/cmd/cloud/domain.ts +3 -2
  185. package/src/cmd/cloud/index.ts +9 -1
  186. package/src/cmd/cloud/resource/add.ts +19 -0
  187. package/src/cmd/cloud/resource/delete.ts +24 -3
  188. package/src/cmd/cloud/resource/index.ts +4 -3
  189. package/src/cmd/cloud/resource/list.ts +36 -10
  190. package/src/cmd/cloud/scp/download.ts +27 -1
  191. package/src/cmd/cloud/scp/index.ts +4 -3
  192. package/src/cmd/cloud/scp/upload.ts +27 -1
  193. package/src/cmd/cloud/ssh.ts +12 -0
  194. package/src/cmd/dev/index.ts +11 -7
  195. package/src/cmd/dev/templates.ts +1 -1
  196. package/src/cmd/env/delete.ts +17 -0
  197. package/src/cmd/env/get.ts +17 -1
  198. package/src/cmd/env/import.ts +47 -3
  199. package/src/cmd/env/index.ts +1 -0
  200. package/src/cmd/env/list.ts +13 -1
  201. package/src/cmd/env/pull.ts +20 -0
  202. package/src/cmd/env/push.ts +33 -1
  203. package/src/cmd/env/set.ts +25 -1
  204. package/src/cmd/index.ts +9 -2
  205. package/src/cmd/kv/create-namespace.ts +45 -0
  206. package/src/cmd/kv/delete-namespace.ts +73 -0
  207. package/src/cmd/kv/delete.ts +51 -0
  208. package/src/cmd/kv/get.ts +65 -0
  209. package/src/cmd/kv/index.ts +31 -0
  210. package/src/cmd/kv/keys.ts +57 -0
  211. package/src/cmd/kv/list-namespaces.ts +43 -0
  212. package/src/cmd/kv/repl.ts +284 -0
  213. package/src/cmd/kv/search.ts +80 -0
  214. package/src/cmd/kv/set.ts +63 -0
  215. package/src/cmd/kv/stats.ts +96 -0
  216. package/src/cmd/kv/util.ts +32 -0
  217. package/src/cmd/objectstore/delete-bucket.ts +72 -0
  218. package/src/cmd/objectstore/delete.ts +59 -0
  219. package/src/cmd/objectstore/get.ts +64 -0
  220. package/src/cmd/objectstore/index.ts +27 -0
  221. package/src/cmd/objectstore/list-buckets.ts +45 -0
  222. package/src/cmd/objectstore/list-keys.ts +60 -0
  223. package/src/cmd/objectstore/put.ts +62 -0
  224. package/src/cmd/objectstore/repl.ts +235 -0
  225. package/src/cmd/objectstore/url.ts +59 -0
  226. package/src/cmd/objectstore/util.ts +28 -0
  227. package/src/cmd/profile/create.ts +61 -6
  228. package/src/cmd/profile/delete.ts +25 -5
  229. package/src/cmd/profile/index.ts +1 -0
  230. package/src/cmd/profile/list.ts +7 -3
  231. package/src/cmd/profile/show.ts +33 -19
  232. package/src/cmd/profile/use.ts +17 -4
  233. package/src/cmd/project/create.ts +31 -0
  234. package/src/cmd/project/delete.ts +24 -2
  235. package/src/cmd/project/index.ts +1 -0
  236. package/src/cmd/project/list.ts +23 -9
  237. package/src/cmd/project/show.ts +27 -8
  238. package/src/cmd/project/template-flow.ts +10 -6
  239. package/src/cmd/prompt/index.ts +12 -0
  240. package/src/cmd/prompt/llm.ts +368 -0
  241. package/src/cmd/repl/index.ts +477 -0
  242. package/src/cmd/schema/index.ts +12 -0
  243. package/src/cmd/schema/show.ts +27 -0
  244. package/src/cmd/secret/delete.ts +17 -0
  245. package/src/cmd/secret/get.ts +20 -1
  246. package/src/cmd/secret/import.ts +45 -2
  247. package/src/cmd/secret/index.ts +1 -0
  248. package/src/cmd/secret/list.ts +10 -1
  249. package/src/cmd/secret/pull.ts +20 -0
  250. package/src/cmd/secret/push.ts +33 -1
  251. package/src/cmd/secret/set.ts +20 -0
  252. package/src/cmd/version/index.ts +15 -2
  253. package/src/config.ts +18 -5
  254. package/src/errors.ts +222 -0
  255. package/src/explain.ts +126 -0
  256. package/src/index.ts +51 -0
  257. package/src/json.ts +28 -0
  258. package/src/output.ts +307 -0
  259. package/src/repl.ts +1517 -0
  260. package/src/schema-generator.ts +389 -0
  261. package/src/tui.ts +136 -13
  262. package/src/types.ts +62 -12
@@ -0,0 +1,368 @@
1
+ import { createSubcommand } from '../../types';
2
+ import type { CommandContext } from '../../types';
3
+ import { getCommand } from '../../command-prefix';
4
+
5
+ export const llmSubcommand = createSubcommand({
6
+ name: 'llm',
7
+ description: 'Generate a comprehensive prompt for LLM agents',
8
+ tags: ['read-only', 'fast'],
9
+ idempotent: true,
10
+ examples: [getCommand('prompt llm')],
11
+ async handler(_ctx: CommandContext) {
12
+ const prompt = generateLLMPrompt();
13
+ console.log(prompt);
14
+ },
15
+ });
16
+
17
+ function generateLLMPrompt(): string {
18
+ return `# Agentuity CLI - Agent Usage Guide
19
+
20
+ ## Overview
21
+
22
+ The Agentuity CLI is an agent-friendly command-line interface for managing cloud deployments, projects, secrets, and infrastructure. It provides machine-readable output, introspection capabilities, and safety features designed for automated agent usage.
23
+
24
+ ## Key Principles for Agent Usage
25
+
26
+ 1. **Always use \`--json\` for machine-readable output**
27
+ - All commands support \`--json\` for structured output
28
+ - Errors are also output as JSON when using \`--error-format=json\` (automatically set with \`--json\`)
29
+
30
+ 2. **Use \`--explain\` before executing destructive operations**
31
+ - Preview what a command will do without executing it
32
+ - Provides structured explanation with steps, prerequisites, and warnings
33
+
34
+ 3. **Use \`--dry-run\` for safe exploration**
35
+ - Execute validation and planning without making changes
36
+ - Test commands safely before actual execution
37
+
38
+ 4. **Discover capabilities programmatically**
39
+ - Use \`${getCommand('--help=json')}\` to get the complete CLI schema
40
+ - Use \`${getCommand('capabilities show --json')}\` to discover available tasks
41
+ - Use \`${getCommand('schema show')}\` for detailed command metadata
42
+
43
+ ## Machine-Readable Modes
44
+
45
+ ### Global Flags
46
+
47
+ - \`--json\`: Output in JSON format (machine-readable)
48
+ - \`--quiet\`: Suppress non-essential output (only errors shown)
49
+ - \`--no-progress\`: Disable progress indicators and spinners
50
+ - \`--error-format json\`: Structured error output with error codes
51
+ - \`--explain\`: Show what command would do without executing
52
+ - \`--dry-run\`: Execute without making changes
53
+ - \`--color never\`: Disable color output
54
+
55
+ ### Recommended Flag Combinations
56
+
57
+ For agent usage:
58
+ \`\`\`bash
59
+ ${getCommand('--json --quiet command')}
60
+ \`\`\`
61
+
62
+ For safe exploration:
63
+ \`\`\`bash
64
+ ${getCommand('--explain command args')}
65
+ ${getCommand('--dry-run command args')}
66
+ \`\`\`
67
+
68
+ ## Introspection Capabilities
69
+
70
+ ### 1. Schema Discovery
71
+
72
+ Get the complete CLI schema with all commands, arguments, options, and requirements:
73
+
74
+ \`\`\`bash
75
+ ${getCommand('--help=json')}
76
+ ${getCommand('schema show')}
77
+ \`\`\`
78
+
79
+ The schema includes:
80
+ - Command names and descriptions
81
+ - Arguments (type, required/optional, variadic)
82
+ - Options (type, defaults, enums)
83
+ - Authentication requirements
84
+ - Project requirements
85
+ - Examples
86
+
87
+ ### 2. Capabilities Discovery
88
+
89
+ Get high-level tasks and workflows:
90
+
91
+ \`\`\`bash
92
+ ${getCommand('capabilities show --json')}
93
+ \`\`\`
94
+
95
+ This returns:
96
+ - Functional capabilities (auth, projects, deployment, secrets, etc.)
97
+ - Common workflows with step-by-step instructions
98
+ - Requirements for each capability (auth, project)
99
+
100
+ ### 3. Examples
101
+
102
+ All commands include examples in their help text and schema:
103
+
104
+ \`\`\`bash
105
+ ${getCommand('command subcommand --help')}
106
+ \`\`\`
107
+
108
+ ## Error Handling
109
+
110
+ ### Structured Errors
111
+
112
+ When using \`--json\` or \`--error-format=json\`, errors are structured:
113
+
114
+ \`\`\`json
115
+ {
116
+ "error": {
117
+ "code": "PROJECT_NOT_FOUND",
118
+ "message": "Invalid project folder",
119
+ "details": {},
120
+ "suggestions": [
121
+ "Use --dir to specify a different directory",
122
+ "Change to a directory containing agentuity.json",
123
+ "Run \\"${getCommand('project init')}\\" to create a new project"
124
+ ]
125
+ }
126
+ }
127
+ \`\`\`
128
+
129
+ ### Common Error Codes
130
+
131
+ - \`VALIDATION_FAILED\`: Invalid arguments or options
132
+ - \`AUTH_REQUIRED\`: Authentication needed
133
+ - \`PROJECT_NOT_FOUND\`: No project configuration found
134
+ - \`REGION_REQUIRED\`: Cloud region must be specified
135
+ - \`RESOURCE_NOT_FOUND\`: Requested resource doesn't exist
136
+ - \`PERMISSION_DENIED\`: Insufficient permissions
137
+
138
+ ### Error Recovery
139
+
140
+ Always check error details and suggestions for recovery steps. Errors include actionable guidance.
141
+
142
+ ## Authentication Flow
143
+
144
+ ### Required for Most Operations
145
+
146
+ Many commands require authentication. Check the schema's \`requires.auth\` field.
147
+
148
+ ### Authentication Commands
149
+
150
+ \`\`\`bash
151
+ # Check if authenticated
152
+ ${getCommand('auth whoami')}
153
+
154
+ # Login (interactive)
155
+ ${getCommand('auth login')}
156
+
157
+ # Signup (interactive)
158
+ ${getCommand('auth signup')}
159
+ \`\`\`
160
+
161
+ ### Non-Interactive Environments
162
+
163
+ In non-TTY environments:
164
+ - Commands requiring interactive input will fail with clear error messages
165
+ - Use API keys or pre-authenticate before running automated tasks
166
+ - Some commands support \`--confirm\` to skip interactive prompts
167
+
168
+ ## Project Context
169
+
170
+ ### Project-Based Commands
171
+
172
+ Commands requiring a project look for \`agentuity.json\` in the current directory.
173
+
174
+ ### Specifying Project Directory
175
+
176
+ \`\`\`bash
177
+ ${getCommand('--dir /path/to/project command')}
178
+ \`\`\`
179
+
180
+ ### Creating a Project
181
+
182
+ \`\`\`bash
183
+ ${getCommand('project init')}
184
+ \`\`\`
185
+
186
+ ## Common Workflows
187
+
188
+ ### 1. Initial Setup
189
+
190
+ \`\`\`bash
191
+ ${getCommand('auth signup')}
192
+ ${getCommand('auth login')}
193
+ ${getCommand('project init')}
194
+ ${getCommand('secret set API_KEY <value>')}
195
+ \`\`\`
196
+
197
+ ### 2. Deploy Application
198
+
199
+ \`\`\`bash
200
+ # Preview deployment
201
+ ${getCommand('--explain bundle')}
202
+
203
+ # Test deployment (dry-run)
204
+ ${getCommand('--dry-run cloud deploy')}
205
+
206
+ # Actual deployment
207
+ ${getCommand('bundle')}
208
+ ${getCommand('cloud deploy')}
209
+
210
+ # Check deployment status
211
+ ${getCommand('--json cloud deployment show')}
212
+ \`\`\`
213
+
214
+ ### 3. Manage Secrets
215
+
216
+ \`\`\`bash
217
+ ${getCommand('--json secret list')}
218
+ ${getCommand('secret set DATABASE_URL <value>')}
219
+ ${getCommand('secret get DATABASE_URL')}
220
+ \`\`\`
221
+
222
+ ### 4. List Resources
223
+
224
+ \`\`\`bash
225
+ ${getCommand('--json project list')}
226
+ ${getCommand('--json cloud deployment list')}
227
+ ${getCommand('--json kv list')}
228
+ \`\`\`
229
+
230
+ ## Best Practices
231
+
232
+ ### 1. Always Validate First
233
+
234
+ - Use \`--explain\` to understand what will happen
235
+ - Use \`--dry-run\` for commands that mutate state
236
+ - Check schema to understand command requirements
237
+
238
+ ### 2. Use Structured Output
239
+
240
+ - Always use \`--json\` when parsing output programmatically
241
+ - Parse error messages from structured error format
242
+ - Never rely on human-readable text parsing
243
+
244
+ ### 3. Handle Non-Interactive Mode
245
+
246
+ - Detect TTY status
247
+ - Provide all required arguments upfront
248
+ - Use \`--confirm\` or similar flags to skip prompts
249
+
250
+ ### 4. Check Requirements
251
+
252
+ Before running a command, verify from schema:
253
+ - Does it require authentication?
254
+ - Does it require a project context?
255
+ - Does it require organization or region selection?
256
+
257
+ ### 5. Progressive Enhancement
258
+
259
+ Start with safe operations:
260
+ 1. Discover capabilities (\`capabilities show\`)
261
+ 2. Get schema for specific command (\`--help=json\`)
262
+ 3. Use \`--explain\` to preview
263
+ 4. Use \`--dry-run\` to test
264
+ 5. Execute actual command
265
+
266
+ ### 6. Error Recovery
267
+
268
+ When an error occurs:
269
+ 1. Parse the error code
270
+ 2. Read the suggestions array
271
+ 3. Take corrective action
272
+ 4. Retry the operation
273
+
274
+ ## Agent Safety Guidelines
275
+
276
+ ### Destructive Operations
277
+
278
+ For destructive operations (delete, remove, rollback):
279
+ 1. ALWAYS use \`--explain\` first
280
+ 2. ALWAYS use \`--dry-run\` before execution
281
+ 3. Verify the operation matches intent
282
+ 4. Only then execute the actual command
283
+
284
+ ### Confirmation Flags
285
+
286
+ Many destructive commands support:
287
+ - \`--confirm\`: Skip confirmation prompts (be careful!)
288
+ - \`--no-confirm\`: Disable confirmation (dangerous!)
289
+
290
+ ### Non-Destructive Exploration
291
+
292
+ These are always safe:
293
+ - \`--help\`, \`--help=json\`
294
+ - \`capabilities show\`
295
+ - \`schema show\`
296
+ - \`--explain\` (never executes)
297
+ - \`--dry-run\` (no side effects)
298
+ - List commands (\`list\`, \`ls\`)
299
+ - Show commands (\`show\`, \`get\` without mutations)
300
+
301
+ ## Examples for Common Tasks
302
+
303
+ ### Discover All Commands
304
+
305
+ \`\`\`bash
306
+ ${getCommand('--help=json')} | jq '.commands[].name'
307
+ \`\`\`
308
+
309
+ ### Find Commands Requiring Auth
310
+
311
+ \`\`\`bash
312
+ ${getCommand('--help=json')} | jq '.commands[] | select(.requires.auth == true) | .name'
313
+ \`\`\`
314
+
315
+ ### Get Details About a Specific Command
316
+
317
+ \`\`\`bash
318
+ ${getCommand('auth ssh delete --help')}
319
+ ${getCommand('--help=json')} | jq '.commands[] | select(.name == "auth")'
320
+ \`\`\`
321
+
322
+ ### Test a Deployment
323
+
324
+ \`\`\`bash
325
+ ${getCommand('--explain bundle')}
326
+ ${getCommand('--dry-run cloud deploy')}
327
+ ${getCommand('cloud deploy')}
328
+ \`\`\`
329
+
330
+ ### Safe SSH Key Deletion
331
+
332
+ \`\`\`bash
333
+ ${getCommand('--explain auth ssh delete abc123')}
334
+ ${getCommand('--dry-run auth ssh delete abc123')}
335
+ ${getCommand('auth ssh delete abc123')}
336
+ \`\`\`
337
+
338
+ ## Version Information
339
+
340
+ This prompt is for Agentuity CLI. Always check the version:
341
+
342
+ \`\`\`bash
343
+ ${getCommand('version')}
344
+ \`\`\`
345
+
346
+ The CLI follows semantic versioning. Check schema compatibility across versions.
347
+
348
+ ## Getting Help
349
+
350
+ - CLI Schema: \`${getCommand('--help=json')}\`
351
+ - Capabilities: \`${getCommand('capabilities show')}\`
352
+ - Command Help: \`${getCommand('command --help')}\`
353
+ - Examples: Included in help text for all commands
354
+
355
+ ## Summary
356
+
357
+ The Agentuity CLI is designed for agent-friendly usage with:
358
+ - Complete introspection via \`--help=json\` and \`schema\` commands
359
+ - Machine-readable output via \`--json\`
360
+ - Safety features via \`--explain\` and \`--dry-run\`
361
+ - Structured errors with recovery suggestions
362
+ - Comprehensive examples for all commands
363
+
364
+ Always start with discovery (\`capabilities\`, \`schema\`), use safety features (\`--explain\`, \`--dry-run\`), and rely on structured output (\`--json\`) for reliable automation.
365
+ `;
366
+ }
367
+
368
+ export default llmSubcommand;