CLI
Overview
The oblien exec command lets you execute commands inside running workspace runtimes. It supports one-shot execution, streaming output, interactive input, and task lifecycle management.
Quick Start
# Run a command (one-shot)
oblien exec ws_abc123 -- ls -la /app
# Run and stream output in real-time
oblien exec ws_abc123 --stream -- npm start
# Run with JSON output
oblien exec ws_abc123 --json -- echo "hello"Run a Command
oblien exec <ws-id> [--stream] [--json] -- <command...>When --stream is passed, the command output is streamed in real-time as NDJSON events. Without --stream, the command runs and returns the result when complete.
Task Management
List Running Tasks
oblien exec list <ws-id>Get Task Details
oblien exec get <ws-id> <task-id>Send Input to a Task
oblien exec input <ws-id> <task-id> <data>Subscribe to Task Output
oblien exec subscribe <ws-id> <task-id>Streams output from an already-running task.
Kill a Task
oblien exec kill <ws-id> <task-id>Delete All Tasks
oblien exec delete-all <ws-id>Prompts for confirmation before deleting.
Examples
# Install dependencies
oblien exec ws_abc123 -- npm install
# Stream a long-running process
oblien exec ws_abc123 --stream -- python train.py
# Run and get JSON result
oblien exec ws_abc123 --json -- cat /etc/os-release
# Manage active tasks
oblien exec list ws_abc123
oblien exec kill ws_abc123 task_def456