MCPcopy
hub / github.com/zgsm-ai/costrict / listCommands

Function listCommands

apps/cli/src/commands/cli/list.ts:268–281  ·  view source on GitHub ↗
(options: BaseListOptions)

Source from the content-addressed store, hash-verified

266}
267
268export async function listCommands(options: BaseListOptions): Promise<void> {
269 const format = parseFormat(options.format)
270
271 await withHostAndSignalHandlers(options, { ephemeral: true }, async (host) => {
272 const commands = await requestCommands(host)
273
274 if (format === "json") {
275 outputJson({ commands })
276 return
277 }
278
279 outputCommandsText(commands)
280 })
281}
282
283export async function listModes(options: BaseListOptions): Promise<void> {
284 const format = parseFormat(options.format)

Callers 1

index.tsFile · 0.85

Calls 5

parseFormatFunction · 0.85
requestCommandsFunction · 0.85
outputJsonFunction · 0.85
outputCommandsTextFunction · 0.85

Tested by

no test coverage detected