mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-23 02:29:35 +00:00
feat(cli): add runner start with optional SRT sandboxing
This commit is contained in:
@@ -7,6 +7,7 @@ import { cliExtensions } from './operations/extensions'
|
||||
import { registerOperationCommands } from './operations/generate'
|
||||
import type { Output } from './operations/render'
|
||||
import { version } from '../package.json'
|
||||
import { startRunner } from './runner/client'
|
||||
|
||||
export interface ProgramOptions {
|
||||
callOperation?: CallOperation
|
||||
@@ -43,6 +44,20 @@ export function createProgram(options: ProgramOptions = {}): Command {
|
||||
extensions: cliExtensions,
|
||||
})
|
||||
|
||||
program
|
||||
.command('runner')
|
||||
.description('Connect a local bash runner to Shumai.')
|
||||
.command('start')
|
||||
.description('Run in the foreground using a key created in Settings → Agent Runners.')
|
||||
.option('--url <url>', 'Shumai server URL (or SHUMAI_API_SERVER).')
|
||||
.option('--key <key>', 'Runner key (prefer SHUMAI_RUNNER_KEY to avoid shell history).')
|
||||
.option('--cwd <directory>', 'Runner workspace directory (defaults to the current directory).')
|
||||
.option(
|
||||
'--srt <file>',
|
||||
'Wrap bash commands with locally installed srt using this JSON settings file.',
|
||||
)
|
||||
.action(startRunner)
|
||||
|
||||
program
|
||||
.command('upload')
|
||||
.description('Upload a local file or folder to a parent folder.')
|
||||
|
||||
Reference in New Issue
Block a user