> This page is for v0.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemoclaw/llms.txt.

# Choose Between NemoClaw and OpenShell CLIs

> Choose between the NemoClaw CLI and the OpenShell CLI for common sandbox operations.

NemoClaw uses two host-side CLIs. Use `nemo-deepagents` for NemoClaw-managed workflows. Use `openshell` when you need a lower-level OpenShell operation that NemoClaw intentionally leaves available.

## Rule of Thumb

If the task changes how NemoClaw creates, rebuilds, preserves, or configures a sandbox, start with `nemo-deepagents`.

If the task inspects or changes the live OpenShell gateway, TUI, raw policy, port forwarding, inference route, or intentionally bypasses a NemoClaw file-transfer wrapper, use `openshell`.

Do not create or recreate NemoClaw-managed sandboxes directly with `openshell sandbox create` unless you intend to manage OpenShell yourself. Run `nemo-deepagents onboard` afterward if you need to return to a NemoClaw-managed environment.

## Use `nemo-deepagents` For NemoClaw Workflows

Use `nemo-deepagents` for operations where NemoClaw adds product-specific state, safety checks, backup behavior, credential handling, or agent configuration.

* Install, onboard, or recreate a NemoClaw sandbox:

  ```bash
  nemo-deepagents onboard
  nemo-deepagents onboard --fresh --name <sandbox-name> --recreate-sandbox
  ```

Use `--resume` only when you are recovering an interrupted onboarding session. For a completed sandbox, use `--fresh --name <sandbox-name> --recreate-sandbox` when you need NemoClaw to recreate it.

* List, connect to, check, or delete NemoClaw-managed sandboxes:

  ```bash
  nemo-deepagents list
  nemo-deepagents my-assistant connect
  nemo-deepagents my-assistant status
  nemo-deepagents my-assistant logs --follow
  nemo-deepagents my-assistant destroy
  ```

* Rebuild or upgrade while preserving workspace state:

  ```bash
  nemo-deepagents my-assistant rebuild
  nemo-deepagents upgrade-sandboxes --check
  ```

* Mount or manually copy sandbox state:

  ```bash
  nemo-deepagents my-assistant share mount
  ```

* Add or remove NemoClaw policy presets:

  ```bash
  nemo-deepagents my-assistant policy add pypi --yes
  nemo-deepagents my-assistant policy list
  nemo-deepagents my-assistant policy remove pypi --yes
  ```

* Manage NemoClaw credentials, diagnostics, and cleanup:

  ```bash
  nemo-deepagents credentials list
  nemo-deepagents credentials reset nvidia-prod
  nemo-deepagents debug --sandbox my-assistant
  nemo-deepagents gc --dry-run
  ```

## Use `openshell` For OpenShell Operations

Use `openshell` when the docs explicitly call for a live OpenShell gateway operation or when you need a lower-level view beneath the NemoClaw wrapper.

* Open the OpenShell TUI for network approvals and live activity:

  ```bash
  openshell term
  ```

* Manage arbitrary user-owned OpenShell forwards. For a NemoClaw-managed dashboard, API, or messaging forward, run `nemo-deepagents <name> recover` instead:

  ```bash
  openshell forward start --background <port> <sandbox-name>
  openshell forward list
  ```

* Inspect the underlying sandbox state:

  ```bash
  openshell sandbox list
  openshell sandbox get <sandbox-name>
  openshell logs <sandbox-name> -n 20
  openshell doctor check
  ```

* Move files or run raw one-off commands when you intentionally want to bypass NemoClaw's sandbox registry and wrappers:

  ```bash
  openshell sandbox upload <sandbox-name> ./local-file /sandbox/
  openshell sandbox download <sandbox-name> /sandbox/output ./output
  openshell sandbox exec -n <sandbox-name> -- env | grep '^HOME='
  ```

  The direct download command does not use NemoClaw's source validation, private staging, or destination publication safeguards.

* Merge a single endpoint into the live OpenShell policy:

  ```bash
  openshell policy update <sandbox-name> --add-endpoint api.example.com:443:read-only:rest:enforce
  ```

* Export the parsed OpenShell base policy through NemoClaw, then replace it through OpenShell:

  This workflow requires OpenShell 0.0.72+ for `policy get --base` and `policy set --wait`.

  ```bash
  nemo-deepagents <sandbox-name> policy get > current-policy.yaml
  ```

  NemoClaw parses the policy, strips the OpenShell metadata header, and replaces literal credentials with `[STRIPPED_BY_MIGRATION]`. Replace every marker with a supported OpenShell credential binding or resolver placeholder before you apply the file. NemoClaw exits nonzero if it cannot validate the base policy. Do not use `--raw` for a file that you plan to reapply.

  Edit or review `current-policy.yaml`, then apply it:

  ```bash
  openshell policy set --policy current-policy.yaml --wait <sandbox-name>
  ```

`openshell policy update` merges specific endpoint and rule changes into the live sandbox policy. `openshell policy set` replaces the live policy with the file you provide. For normal NemoClaw network access changes, prefer `nemo-deepagents <name> policy add` when a maintained or custom preset expresses the intended change. Rebuild preserves the complete current OpenShell policy, including approved host-side edits.

## Common Decisions

This section covers common decisions when using the NemoClaw CLI and the OpenShell CLI.

### First Setup or Full Recreate

Use `nemo-deepagents onboard`. It starts the OpenShell gateway when needed, registers providers, builds the selected agent sandbox image, applies NemoClaw policy choices, and creates the sandbox.

The OpenShell CLI does not provide a command that starts a gateway. Avoid running `openshell sandbox create` directly for NemoClaw-managed sandboxes because it does not update NemoClaw's registry, session metadata, workspace-preservation flow, or agent-specific configuration.

### Connect to the Sandbox

Use `nemo-deepagents <name> connect` for an interactive NemoClaw sandbox shell. It waits for readiness, handles stale SSH host keys after gateway restarts, and prints agent-specific hints.

Use `openshell sandbox connect <name>` only when you intentionally want the raw OpenShell connection path.

For a one-off command in a NemoClaw-managed sandbox, use `nemo-deepagents <name> exec` instead of opening an interactive shell. It resolves the sandbox by its NemoClaw registry name and runs through the standard NemoClaw CLI surface. The command executes as the sandbox user with `HOME=/sandbox` inside the provisioned sandbox, where the agent configuration, inference routing, and policy state are already in place.

```bash
nemo-deepagents my-assistant exec -- cat /tmp/gateway.log
```

Use `openshell sandbox exec` for the raw OpenShell execution path, such as when you address a sandbox by its gateway name or intentionally bypass the NemoClaw CLI and registry.

```bash
openshell sandbox exec -n my-assistant -- cat /tmp/gateway.log
```

### Check Health or Logs

Use `nemo-deepagents <name> status` and `nemo-deepagents <name> logs` first. They combine NemoClaw registry data, OpenShell state, selected agent process health, inference health, policy details, and messaging-channel warnings for that sandbox. Use `nemo-deepagents status` only for the global all-sandbox and host-service overview.

Use `openshell sandbox list`, `openshell sandbox get`, `openshell logs <name> -n 20`, or `openshell doctor check` when debugging lower-level OpenShell behavior. When using `openshell logs` directly, `-n <lines>` controls the line count; use `--tail` only when you want live OpenShell log streaming.

### Approve Blocked Network Requests

Use `openshell term`. The OpenShell TUI owns live network activity and operator approval prompts.

Approved endpoints are session-scoped unless you also add them to the policy through a NemoClaw preset or raw OpenShell policy update.

### Change Models or Providers

Deep Agents has no runtime `inference set` path.
For a managed image, recreation for a verified provider or model change keeps the replacement's generated configuration.
The backup retains the previous `/sandbox/.deepagents/config.toml` for manual recovery of custom settings.
For unchanged or unverifiable selections, or custom images, recreation restores the saved configuration.
If restored preferences conflict with the requested selection, validation stops before NemoClaw updates the registry.
To change the provider or model, follow [Recreate a Deep Agents Sandbox](../inference/manage-inference/switch-providers#recreate-a-deep-agents-sandbox).

Verify the change with:

```bash
nemo-deepagents <name> status
```

### Update Network Policy

Use `nemo-deepagents <name> policy add` or `policy remove` for NemoClaw presets and custom preset files. NemoClaw merges the requested change with the live OpenShell policy. Rebuild preserves the complete current policy.

Use `openshell policy update` for precise live endpoint or REST rule changes. Use `nemo-deepagents <name> policy get` and `openshell policy set --policy <file> --wait <name>` only when you need to edit and replace the complete base policy. Replace every `[STRIPPED_BY_MIGRATION]` marker before you apply the file. Use `openshell policy get --full <name>` only to inspect the effective policy, including provider-composed rules.

### Move Workspace Files

OpenShell preserves the native sandbox home through stop, start, and reconnect. Use `nemo-deepagents <name> share mount` for direct workspace editing or `download` for an independent host copy.

Use `nemo-deepagents <name> download` for manual host downloads when you need control over source and destination paths.
Use `openshell sandbox upload` when you intentionally want the raw OpenShell upload path.

## Related Topics

* [Commands](commands) for the full NemoDeepAgents command reference.
* [Network Policies](network-policies) for baseline policy and approval behavior.
* [Customize the Network Policy](../network-policy/customize-network-policy) for persistent network access changes.
* [Approve or Deny Network Requests](../network-policy/approve-network-requests) for the OpenShell TUI approval flow.
* [Understand Sandbox State](../manage-sandboxes/state-and-backups/understand-sandbox-state) for Deep Agents state and file transfer guidance.
* [Persist Sandbox State](../manage-sandboxes/state-and-backups/create-and-restore-snapshots) for OpenShell persistence and whole-home rebuild transfer.
* [Choose an Inference Provider](../inference/learn-and-choose/choose-inference-provider) for provider configuration details.