Guides / sandbox work
Work inside the sandbox you already grew.
Commands and files operate on an existing sandbox ID. They do not create a replacement environment, so filesystem changes remain available to later calls for the lifetime of that provider sandbox.
Run a command
Supply a shell command plus an optional existing working directory and per-command environment. The environment map applies only to this command; it is not a durable secret store.
curl --fail-with-body --request POST \ "$WILDFLOWER_URL/v1/sandboxes/$SANDBOX_ID/exec" \ -H "Authorization: Bearer $WILDFLOWER_API_KEY" \ -H "Content-Type: application/json" \ --data '{ "command": "printf hello && exit 7", "cwd": "/tmp", "env": { "FLOWER_COLOR": "orange" } }'A completed process returns HTTP success with exitCode,stdout, and stderr. Check the exit code in your application. Some providers expose only combined output; their adapter returns that text in stdout and an emptystderr.
Write, then read a file
The destination parent directory must already exist. Read and write use the same generated FileEncoding choices:utf8 and base64. UTF-8 is the default. Use base64 when arbitrary bytes must survive JSON.
curl --fail-with-body --request POST \ "$WILDFLOWER_URL/v1/sandboxes/$SANDBOX_ID/files/write" \ -H "Authorization: Bearer $WILDFLOWER_API_KEY" \ -H "Content-Type: application/json" \ --data '{"path":"/tmp/hello.txt","content":"hello","encoding":"utf8"}'curl --fail-with-body --request POST \ "$WILDFLOWER_URL/v1/sandboxes/$SANDBOX_ID/files/read" \ -H "Authorization: Bearer $WILDFLOWER_API_KEY" \ -H "Content-Type: application/json" \ --data '{"path":"/tmp/hello.txt","encoding":"utf8"}'Choose the right primitive
Command
Best for tools, pipelines, package managers, and operations whose exit code matters.
Command operation referenceWrite file
Best when your application already has bounded content and needs an exact destination path.
Write operation referenceRead file
Best for retrieving one bounded result without parsing command output.
Read operation referenceKeep provider access available
A connected project profile lets later processes address the sandbox using only the Wildflower bearer key. If you created it with an inline provider credential, a new process must receive that provider access and any required connection context again.
