List running processes
ProcessInfo includes pid, command, and running. The list endpoint is
useful for reconnecting to background work after a client restart.
Send stdin
send_stdin writes text to the process stdin stream. Use it for interactive
programs that are not full terminal sessions; use PTY sessions
when terminal behavior, resize, or shell line editing matters.
Logs
stdout and stderr are split streams. output is the interleaved stream when
the backend has it. exit_code is None while the process is still running and
an integer after it exits.
Kill
REST and CLI map
| Task | Python SDK | CLI | API |
|---|---|---|---|
| List processes | machine.commands.list() | nullspace machine process list mch_123 | GET /v1/machines/{id}/processes |
| Fetch logs | machine.commands.get_logs(pid) | nullspace machine process logs mch_123 1234 | GET /v1/machines/{id}/processes/{pid}/logs |
| Send stdin | machine.commands.send_stdin(pid, data) | printf ... | nullspace machine process stdin mch_123 1234 | POST /v1/machines/{id}/processes/{pid}/stdin |
| Kill | machine.commands.kill(pid) | nullspace machine process kill mch_123 1234 | POST /v1/machines/{id}/processes/{pid}/kill |
| Attach stream | machine.commands.connect(pid) | nullspace machine process attach mch_123 1234 | exec WebSocket |
--json for automation. stdin --json
returns the PID and bytes_sent; attach --json returns a CommandResult.