Write, Execute, and Read a File on a Devbox
A 5-step recipe with Runloop. We can help you get access.
Recipe · 5 steps
Write, Execute, and Read a File on a Devbox
with Runloop · Environment Management
Write a file, run a command on it, and read it back from a devbox.
- Create a devbox to host the file round trip.
- Poll until the devbox is running, looping back while it boots.
- Write the supplied UTF-8 contents to the file path on the devbox.
- Execute a command that operates on the written file, waiting for completion.
- Read the file contents back from the devbox as text.
What you'll need to have ready
- apiToken: Runloop API bearer token.
- name: Optional friendly name for the devbox.
- commandId: A client supplied UUIDv7 command id for idempotency and tracking.
- filePath: Path on the devbox to write and read, relative to the user home directory.
- contents: The UTF-8 string contents to write to the file.
- command: A shell command that operates on the written file.
For your developer
Arazzo workflow runloop-ai:write-execute-read-file, 5 operations: createDevbox → waitForDevboxStatus → devboxWriteFileContents → executeCommand → devboxReadFileContents. Specs on APIs.io.