UNPKG

alwaysai

Version:

The alwaysAI command-line interface (CLI)

16 lines (14 loc) 510 B
import { createLeaf, createStringArrayInput } from '@alwaysai/alwayscli'; import { targetConfigFile } from '../../util/target-config-file'; export const appExecCliLeaf = createLeaf({ name: 'exec', description: 'Run a command in the application target directory', args: createStringArrayInput({ placeholder: '<command> [<args>]', required: true, }), action([exe, ...args]) { const spawner = targetConfigFile.readSpawner(); spawner.runForegroundSync({ exe, args, cwd: '.' }); }, });