mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-22 14:27:56 +00:00
Rebuild the CLI on commander. Commands for every cli-surface Operation (project ls, ls, mkdir, rename, move/mv, delete/rm) are generated from @shumai/operations: positionals, options, choices, numeric parsing and help text come from the Zod input schema. They call POST /api/ops/:name with x-shumai-client: cli. Existing invocations keep working. Adds --json, ls --type/--first/ --after, typo suggestions, and generated help. upload and create-version stay hand-written. Drops the unused @shumai/core dependency.
10 lines
233 B
TypeScript
10 lines
233 B
TypeScript
import { formatCliError } from './operations/errors'
|
|
import { createProgram } from './program'
|
|
|
|
createProgram()
|
|
.parseAsync(process.argv)
|
|
.catch((err: unknown) => {
|
|
console.error(formatCliError(err))
|
|
process.exit(1)
|
|
})
|