Skip to content
Luna
Esc
↑↓navigate↵open⌘Jpreview
On this page

luna sandboxes

List the sandboxes an environment's lunas have, and stop or delete one by hand.

luna sandboxes lists the sandboxes your lunas have, running or kept, and stops or deletes one.

luna sandboxes list

Reference

luna sandboxes <COMMAND>

luna sandbox is the same command. Every subcommand acts on one environment, and takes these options.

Option Type Default Does
--dir <DIR> path . The app’s folder. Its env file names the project and environment.
--env <ENV> text LUNA_ENV, then production The environment, by name.
--project <PROJECT> text LUNA_PROJECT The project, by name or as organisation/project.
--tenant <TENANT> text The environment’s own A tenant added to the environment, by name.
--token <TOKEN> text LUNA_TOKEN, then your login An API token or account key to act with.

luna sandboxes list

Prints every sandbox: those running, and those kept while asleep or frozen. Each row gives its luna’s type and key, its name, state, size, disk used and when it was last used.

luna sandboxes list [OPTIONS] [TYPE]
Option Type Default Does
[TYPE] text Every type Lists only the sandboxes of lunas of this type.
--json flag Off Prints the answer as JSON.

luna sandboxes stop

Powers a running sandbox off, as its luna’s code stopping it would. Its processes end and its disks are kept. The next request its luna makes of it boots it again.

luna sandboxes stop [OPTIONS] <TYPE> <KEY> <NAME>
Option Type Default Does
<TYPE> text Required The type of the luna that has the sandbox.
<KEY> text Required The luna’s key.
<NAME> text Required The sandbox’s name, as its luna’s code names it.

luna sandboxes delete

Stops a sandbox if it runs, and deletes it with its disks. It asks first. luna sandboxes rm is the same subcommand.

luna sandboxes delete [OPTIONS] <TYPE> <KEY> <NAME>
Option Type Default Does
<TYPE> text Required The type of the luna that has the sandbox.
<KEY> text Required The luna’s key.
<NAME> text Required The sandbox’s name.
--yes flag Off Deletes without asking.

Good to know

  • A key with one field is given as its value, such as u_42. A key with several fields is given as JSON, such as '{"board":"b1","card":"c7"}'.
  • A sandbox’s state is running, frozen or asleep. A stopped one also says what stopped it: idle, code, luna, api or crash.
  • A sandbox that keeps nothing, with persist: "none", is listed only while it runs.
  • list prints at most 1000 sandboxes, and says when there are more.
  • After a delete, its luna’s next request of the sandbox makes a new, empty one.
  • list needs the data:read scope. stop and delete need data:write.
  • Without a terminal to ask at, delete stops with exit code 6 unless you pass --yes.

Examples

List the sandboxes of one type

luna sandboxes list User

Stop a sandbox

luna sandboxes stop User u_42 workspace

Delete a sandbox in a script

luna sandboxes delete User u_42 workspace --yes

Was this page helpful?