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

Function builder

src/commands/installedapps/rename.ts:31–53  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

29const describe = 'rename an installed app instance'
30
31export const builder = (yargs: Argv): Argv<CommandArgs> =>
32 formatAndWriteItemBuilder(apiCommandBuilder(yargs))
33 .positional('id', { describe: 'installed app id', type: 'string' })
34 .option('location', {
35 alias: 'l',
36 describe: 'filter installed apps for prompt by location',
37 type: 'string',
38 array: true,
39 })
40 .option('verbose',
41 { alias: 'v', describe: 'include location names in prompt', type: 'boolean', default: false })
42 .option('new-name', { describe: 'the new name for the installed app', type: 'string' })
43 .example([
44 [
45 '$0 installedapps:rename',
46 'prompt for an installed app and new name for it',
47 ],
48 [
49 '$0 installedapps:rename 80b76675-86c6-470d-a65e-d996b28764b8 "New Name"',
50 'rename the installed app with the specified id to "New Name"',
51 ],
52 ])
53 .epilog(buildEpilog({ command }))
54
55const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
56 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 2

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected