Long jobs and servers run in the background and survive your terminal disconnecting.
$ froog exec my-box --detach -- 'npm run build && npm test'
job_3f2a9c1d8e7b6a50
$ froog logs my-box job_3f2a9c1d8e7b6a50 -f # follow; exits with its exit code
$ froog jobs my-box # running, exited, killed
$ froog kill my-box job_3f2a9c1d8e7b6a50 # and everything it started
$ froog exec my-box --timeout 0 -- ./long.sh # stream to the end
$ froog exec my-box --cwd app -e NODE_ENV=test -- npm testOutput and exit code live in ~/.froog/jobs/ and survive a stop; processes don't (lost, or paused during a warm resume). Jobs don't hold off auto-stop: froog extend NAME --hours 8. Each job is also in the command history. -e values aren't recorded.
One-off runs and pushing a folder
$ froog run -- npm test # new sandbox, this folder in ~/FOLDER, run, delete
$ froog run --from web-stack --size large -- make e2e
$ froog run --keep -- ./build.sh
$ froog push my-box # this folder to my-box:~/FOLDER
$ froog push my-box ../api --to src/apifroog run streams output and exits with the command's code. Its last stderr line: exit 0 · 4m 12s · large · not billed · run-x7k2 deleted. The sandbox has a 15-minute auto-stop the CLI keeps pushing back, so if froog run dies it's erased within 15 minutes. Ctrl-C deletes it. --keep leaves it until that auto-stop.
froog push uploads one archive over the API (up to 100 MiB compressed): in git, tracked and non-ignored files; elsewhere all but .git, node_modules, target, .venv, dist, build and the like. Same-named files are overwritten.
froog run flag | Default | What it does |
|---|---|---|
--push DIR | this folder | Push it and run there |
--no-push | off | Push nothing; run in ~ |
--cwd DIR | pushed folder | Working directory |
--timeout SECS | none | Stop and exit 124 |
-e, --env KEY=VALUE | none | Variable; KEY alone copies it from this shell |
--from SAVED, --size | default | Saved snapshot; size |
--no-env | off | Skip your account's environment |
--keep | off | Keep the sandbox, snapshots on |
--json | off | {"type":"output",…} lines, then a summary with exit_code, elapsed_secs, deleted, kept and more |
Standard input. Pipe or redirect into froog exec:
$ froog exec my-box -- python3 - < script.py
$ git diff | froog exec my-box --cwd app -- git apply
$ froog exec my-box --detach -- ./import.sh < rows.csvUp to 1 MiB (413 stdin_too_large); upload a file for more. A pipe silent for 3 seconds is ignored. --no-stdin skips it. API: stdin or stdin_b64 on POST /exec and POST /jobs.
Writing to a running job. Start it with --stdin-open:
$ froog exec my-box --detach --stdin-open -- python3 -i
$ froog stdin my-box job_3f2a9c1d8e7b6a50 'print(6 * 7)' # adds a newline
$ cat more.py | froog stdin my-box job_3f2a9c1d8e7b6a50
$ froog stdin my-box job_3f2a9c1d8e7b6a50 --close # end of fileAPI: stdin_open: true on POST /jobs, then POST /jobs/{id}/stdin {data?, data_b64?, close?}, up to 1 MiB per call. Errors: 409 stdin_blocked (the command isn't reading; 30 s), stdin_not_open, stdin_closed, job_ended.