MCPcopy Create free account
hub / github.com/SmartThingsCommunity/smartthings-cli / builder

Function builder

src/commands/edge/drivers/installed.ts:31–52  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

29const describe = 'list all drivers installed on a given hub'
30
31const builder = (yargs: Argv): Argv<CommandArgs> =>
32 outputItemOrListBuilder(apiCommandBuilder(yargs))
33 .positional('id-or-index', { describe: 'driver id or number in list', type: 'string' })
34 .option('hub', { alias: 'H', describe: 'hub id', type: 'string' })
35 .option('device', { describe: 'include only drivers matching the device', type: 'string' })
36 .option('verbose', { alias: 'v', describe: 'include channel name in output', type: 'boolean', default: false })
37 .example([
38 ['$0 smartthings edge:drivers:installed', 'list all installed drivers'],
39 [
40 '$0 smartthings edge:drivers:installed --verbose',
41 'list all installed drivers and include the channel name in the output',
42 ],
43 [
44 '$0 smartthings edge:drivers:installed 1',
45 'list the first driver in the list retrieved by running "smartthings edge:drivers:installed',
46 ],
47 [
48 '$0 smartthings edge:drivers:installed 3f9f151d-3022-4b9f-814a-afcbf69b650f',
49 'display details for an installed driver by id',
50 ],
51 ])
52 .epilog(buildEpilog({ command, apiDocs: ['listHubInstalledDrivers', 'getHubDeviceDriver'] }))
53
54const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
55 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 2

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected