# nodus shell

> Open an interactive shell in a Sandbox, creating it if it is not there

Source: https://nodus-platform-site.pages.dev/docs/reference/cli/nodus_shell/
Build revision: 211ad9f836655b1c3a2668c4693e442471f28614

## nodus shell

Open an interactive shell in a Sandbox, creating it if it is not there

### Synopsis

shell opens a terminal in a Sandbox. A name that does not exist yet is created from the same flags as `nodus create sandbox` (image nodus/agent-tools unless –image says otherwise), and the Sandbox stays after the shell exits, so the next `nodus shell` finds /workspace as you left it; –rm deletes a Sandbox this command created when the shell exits. Without a name the shell gets a Sandbox of its own, which is deleted when it exits unless –keep is set. The command after – replaces bash.

```plaintext
nodus shell [sandbox/NAME] [flags] [-- COMMAND...]
```

### Examples

```plaintext
  nodus shell sandbox/dev
  nodus shell sandbox/dev --cpu 4 --memory 8Gi
  nodus shell sandbox/dev --rm
  nodus shell
  nodus shell sandbox/dev -- zsh
```

### Options

```plaintext
      --cpu string            vCPU floor
      --disk string           Disk floor, such as 50Gi
      --gpu string            Accelerator TYPE[:COUNT], such as L4 or H100:8
  -h, --help                  help for shell
      --idle-timeout string   Stop after this idle time
      --image string          Container image (default "nodus/agent-tools")
      --keep                  Without a name: keep the Sandbox after the shell exits
      --max-cost string       Spend limit in USD
      --memory string         Memory floor, such as 16Gi
      --rm                    Delete the Sandbox when the shell exits (only one this command created)
      --secret stringArray    Secret to mount (repeatable)
```

### Options inherited from parent commands

```plaintext
      --context string   Context from the config file to use
      --org string       Organization (selects the context for that org)
  -p, --project string   Project to work in
  -v, --verbose          Log each API request (never credentials)
```

### SEE ALSO

* [nodus](https://nodus-platform-site.pages.dev/docs/reference/cli/nodus/) - Run compute Jobs on Nodus

### Tested examples

These invocations run in CI against the CLI’s fake API.

Terminal window

```sh
nodus shell sandbox/lab
nodus shell sandbox/lab -- zsh
nodus shell sandbox/scratch --rm
nodus shell
```
