MCPcopy
hub / github.com/infinitered/gluegun / run

Function run

src/cli/cli.ts:6–29  ·  view source on GitHub ↗
(argv?: string[] | string)

Source from the content-addressed store, hash-verified

4 * Create the cli and kick it off
5 */
6export async function run(argv?: string[] | string): Promise<GluegunToolbox> {
7 // create a CLI runtime
8 const gluegunCLI = build('gluegun')
9 .src(__dirname)
10 .help()
11 .version()
12 .defaultCommand({
13 run: async (toolbox: GluegunToolbox) => {
14 const { print, meta } = toolbox
15 print.info(`Gluegun version ${meta.version()}`)
16 print.info(``)
17 print.info(` Type gluegun --help for more info`)
18 },
19 })
20 .exclude(['http', 'patching'])
21 .checkForUpdates(25)
22 .create()
23
24 // and run it
25 const toolbox = await gluegunCLI.run(argv)
26
27 // send it back (for testing, mostly)
28 return toolbox
29}

Callers

nothing calls this directly

Calls 9

buildFunction · 0.85
checkForUpdatesMethod · 0.80
excludeMethod · 0.80
defaultCommandMethod · 0.80
versionMethod · 0.80
helpMethod · 0.80
srcMethod · 0.80
runMethod · 0.80
createMethod · 0.65

Tested by

no test coverage detected