Download src/cli/program/build-program.ts from shimen/shinclaw: direct link, hf CLI and curl.
- Browser
- Download file 652 Bytes
-
https://huggingface.co/spaces/shimen/shinclaw/resolve/main/src/cli/program/build-program.ts
- Command line
-
hf download hf://spaces/shimen/shinclaw/src/cli/program/build-program.ts
-
curl -L -o build-program.ts https://huggingface.co/spaces/shimen/shinclaw/resolve/main/src/cli/program/build-program.ts
652 Bytes
| import { Command } from "commander"; | |
| import { registerProgramCommands } from "./command-registry.js"; | |
| import { createProgramContext } from "./context.js"; | |
| import { configureProgramHelp } from "./help.js"; | |
| import { registerPreActionHooks } from "./preaction.js"; | |
| import { setProgramContext } from "./program-context.js"; | |
| export function buildProgram() { | |
| const program = new Command(); | |
| const ctx = createProgramContext(); | |
| const argv = process.argv; | |
| setProgramContext(program, ctx); | |
| configureProgramHelp(program, ctx); | |
| registerPreActionHooks(program, ctx.programVersion); | |
| registerProgramCommands(program, ctx, argv); | |
| return program; | |
| } | |