MCPcopy Index your code
hub / github.com/towardsthecloud/cloudburn / createProgram

Function createProgram

packages/cloudburn/src/cli.ts:41–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39// Intent: construct the CloudBurn CLI command tree.
40// TODO(cloudburn): add global flags for profile, config path, and debug logging.
41export const createProgram = (): Command => {
42 const program = createCliCommand();
43 program
44 .name('cloudburn')
45 .usage('[command]')
46 .description('Know what you spend. Fix what you waste.')
47 .version(__VERSION__)
48 .option('--debug', 'Write execution trace messages to stderr')
49 .option('--format <format>', OUTPUT_FORMAT_OPTION_DESCRIPTION, parseOutputFormat);
50 configureCliHelp(program);
51
52 registerCompletionCommand(program);
53 registerConfigCommand(program);
54 registerDiscoverCommand(program);
55 registerScanCommand(program);
56 registerRulesListCommand(program);
57 registerEstimateCommand(program);
58
59 return program;
60};
61
62export const runCli = async (): Promise<void> => {
63 await createProgram().parseAsync(process.argv);

Callers 12

config.e2e.test.tsFile · 0.85
cli.test.tsFile · 0.85
captureHelpOutputFunction · 0.85
help.e2e.test.tsFile · 0.85
runCompletionFunction · 0.85
renderCompletionScriptFunction · 0.85
completion.test.tsFile · 0.85
runCliFunction · 0.85

Calls 8

createCliCommandFunction · 0.85
configureCliHelpFunction · 0.85
registerConfigCommandFunction · 0.85
registerDiscoverCommandFunction · 0.85
registerScanCommandFunction · 0.85
registerRulesListCommandFunction · 0.85
registerEstimateCommandFunction · 0.85

Tested by 3

captureHelpOutputFunction · 0.68
runCompletionFunction · 0.68
renderCompletionScriptFunction · 0.68