capabilities.work

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.

  1. Create a devbox to host the file round trip.
  2. Poll until the devbox is running, looping back while it boots.
  3. Write the supplied UTF-8 contents to the file path on the devbox.
  4. Execute a command that operates on the written file, waiting for completion.
  5. 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.