This page covers the fast path: you already know the exact command, and you want it to run in a box without opening a longer shell session.
Run one command
run9 box create work
run9 box exec work uname -a
The box wakes for the command. When it is idle, run9 can let it sleep. There is no manual start step.
Reuse the same box
run9 box exec work mkdir -p /work/app
run9 box exec work ls -ld /work /work/app
run9 box exec work find /work -maxdepth 1 -mindepth 1 -type d
Each command sees the same box file system, so later commands can use what earlier commands created.
But each box exec is still a fresh process. Working directory changes, shell variables, and aliases do not carry over from one exec to the next.
Prefer exec flags over shell glue
If you only need one different working directory or one extra env var, keep it as one exec instead of wrapping the command in sh -lc 'cd ... && export ... && ...':
run9 box exec work --workdir /work/app git status
run9 box exec work -e NODE_ENV=test printenv NODE_ENV
Use --workdir for “run this command from that directory.” Use -e KEY=VALUE for “run this command with one extra env var.” Reach for a shell only when the job actually needs shell syntax or several manual steps.
Alternative paths
If the job grows beyond one command, or you simply prefer another client, these pages cover the same box from a different angle:
- Long-running Task keeps one command running after you close the current terminal, then lets you come back by
exec_id. - Interactive Shell keeps you inside one shell session so
cd, shell variables, and trial-and-error work all stay in one place. - Access via SSH reaches the same box through a standard
sshclient.
Those paths are usually clearer than packing package installs, file edits, cd, export, here-docs, pipes, and redirections into one long shell string.
Stopping the box
For day-to-day work, you usually do not stop the box. Use box stop only when you want an immediate quiet point, such as before forking storage.
run9 box stop work