repl_spawn
Launch an interactive REPL or CLI process under a PTY. Specify a command and session name to start a new process with options for environment variables, working directory, and shell execution.
Instructions
Start an interactive REPL or CLI process under a PTY. Returns the session id. cmd is exec'd directly (argv split, no shell): env-var prefixes, redirections (2>&1), pipes and globs are NOT interpreted — pass env via the env param, or set shell:true to run cmd through /bin/sh -c.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Session name (unique) | |
| cmd | Yes | Command line to spawn | |
| cwd | No | ||
| env | No | ||
| cols | No | ||
| rows | No | ||
| shell | No | Run cmd via /bin/sh -c so shell syntax (env prefixes, 2>&1, pipes, globs, &&) works. | |
| promptRegex | No |