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

Function builder

src/commands/rules/execute.ts:25–43  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

23const describe = 'execute a rule'
24
25export const builder = (yargs: Argv): Argv<CommandArgs> =>
26 formatAndWriteItemBuilder(apiCommandBuilder(yargs))
27 .positional('id', { describe: 'rule id', type: 'string' })
28 .option('location', {
29 alias: 'l',
30 describe: 'include only rules from the specified location when prompting',
31 type: 'string',
32 })
33 .example([
34 [
35 '$0 rules:execute',
36 'prompt for a rule to execute and then execute it',
37 ],
38 [
39 '$0 rules:execute 699c7308-8c72-4363-9571-880d0f5cc725',
40 'execute the rule with the specified id',
41 ],
42 ])
43 .epilog(buildEpilog({ command, apiDocs: ['executeRule'] }))
44
45const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
46 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 2

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected