bdy target exec
$bdy target exec [options] [command]
Run commands on a target and manage executions
Examples
Return the execution state using semantic exit codes
bdy target exec command target-identifier "SELECT 1" --exit-code$Run a command on a target and print its output
bdy tg exec command target-identifier "ls -la"$Run SQL on a MySQL target
bdy tg exec command target-identifier "SELECT 1"$Start a command in background and return the execution id
bdy tg exec command target-identifier "ls -la" --async$Run a command from a file
bdy tg exec command target-identifier --file ./query.sql$Print the result with execution metadata as JSON
bdy tg exec command target-identifier "SELECT 1" --format json$Cancel running execution
bdy tg exec kill target-identifier exec-id$Cancel running execution and automatically confirm
bdy tg exec kill target-identifier exec-id -f$List executions of a target
bdy tg exec ls target-identifier$List last 5 executions
bdy tg exec ls target-identifier --limit 5$Return the execution state using semantic exit codes
bdy target exec logs target-identifier exec-id --exit-code$Show logs of execution
bdy tg exec logs target-identifier exec-id$Show logs of execution starting from line 100
bdy tg exec logs target-identifier exec-id --offset 100$Return log records as JSONL
bdy target exec logs target-identifier execution-id --format jsonl$Return the execution state using semantic exit codes
bdy target exec status target-identifier exec-id --exit-code$Show status of execution
bdy tg exec status target-identifier exec-id$