Skip to main content
In this tutorial, run tests from the quickstart’s sample project in a persistent cloud environment. Reuse that sandbox for a second command, send a local file to it, and bring back a cloud edit. Finish by stopping the sandbox.

Before you start

Complete the quickstart and keep your terminal in its rwx-quickstart clone. If you followed catching and fixing a local regression, restore the calculation first. Check:
It should print nothing. This lesson uses a POSIX shell on macOS, Linux, or WSL. RWX supplies Node.js and npm in the cloud.

1. Add the sandbox configuration

Create .rwx/sandbox.yml with this definition:
The first three tasks prepare the same project, Node.js version, and dependencies as the quickstart. preserve-git-dir: true retains Git metadata for file syncing. The final task starts the persistent sandbox instead of running one CI check. The sandbox stops after two minutes of inactivity. The five-minute task timeout also bounds this short exercise. Stop it explicitly when you finish. Check the definition:
Expected output:

2. Run the project tests

RWX finds .rwx/sandbox.yml, prepares its tasks, and runs the command. Keep the printed sandbox URL: it opens the setup tasks in RWX Cloud. Look for this test summary:
Sandbox definition with code, node, npm-install, and sandbox tasks The setup may reuse Node.js and dependency results from earlier runs. The sandbox task remains available for your next command.

3. Send a file and receive a cloud edit

Create sandbox-note.txt in the clone:
Run this command before the sandbox’s inactivity timeout expires:
The CLI should report Reconnecting to existing sandbox. The command prints:
Then RWX reports that it pulled sandbox-note.txt back from the sandbox. Read your local copy:
Expected contents:
The sandbox read a file that was still untracked locally, appended a line in Linux, and returned that edit to your machine. Sandbox commands sync local changes up before execution and cloud changes down afterward. Running the append command again adds another cloud edit line.

4. Stop the sandbox

From the same clone and branch, run:
The stop command should confirm Stopped sandbox. Check that the list has no active entry for this clone’s quickstart branch and .rwx/sandbox.yml file. Other sandboxes you have started may still appear. Your sandbox-note.txt remains local after the sandbox stops. You can now use one cloud environment across commands and bring its file edits back to your working directory.

If a step fails

For a larger project, adapt the setup tasks using the CI workflow guide. See the sandbox guide for longer-lived sessions and additional environment setup.