> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mirurobotics.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Stage

Stage a deployment of a [release](/primitives/releases) from config files on disk. This is the inverse of [`miru device clone`](/references/cli/device-clone).

The deployment is [staged](/cfg-mgmt/deploy/staging-area), not deployed.

### API key scopes

If staging from a [CI pipeline](/developers/ci/overview), the following API key scopes are required:

* `devices:read`
* `releases:read`
* `config_instances:write`
* `deployments:write`
* `deployments:stage`

### Usage

<Tabs>
  <Tab title="Current directory">
    By default, staging a device reads the config files from the current directory.

    ```bash theme={null}
    miru device stage {device-name} 
      \ --release {version}
      \ --description {description}
    ```
  </Tab>

  <Tab title="Custom root">
    Use the `--root` flag to read the config files from a custom root directory.

    ```bash theme={null}
    miru device stage {device-name} 
      \ --release {version} 
      \ --description {description}
      \ --root ./robot-42-fs
    ```
  </Tab>
</Tabs>

<Tip>
  Use `sudo miru ...` to read config files from restricted paths.
</Tip>

**Arguments**

<ParamField path="device-name" type="string" required>
  Device name as the dashboard shows it. Names are unique within a workspace.

  Examples: `robot-42`
</ParamField>

**Flags**

<ParamField path="--release" type="string" required>
  Release version to stage, matched exactly.

  Examples: `v1.2.0`
</ParamField>

<ParamField path="--root" type="string">
  Directory to read the config files from. Defaults to the current directory.

  Each slot is read from its device path relative to this directory, so `/srv/miru/configs/mobility.json` is read from `{--root}/srv/miru/configs/mobility.json`. Pass `/` to read at the computer's root.

  Examples: `./robot-42-fs`, `/`
</ParamField>

<ParamField path="--description" type="string">
  Description stored on the staged deployment. Defaults to `staged from local files via miru CLI`.

  Examples: `"updated gains"`
</ParamField>

### Examples

```bash theme={null}
$ miru device stage robot-42 
  \ --release v1.2.0
  \ --description "a descriptive message about the changes"

◐ Staging release v1.2.0 for device robot-42

  /home/you
  └── srv/miru/configs
      ├── mobility.json  Mobility
      └── nav.json       Navigation

✓ Stage successful
  Deployment  DPL-NxrPt · staged
  Device      robot-42
  Release     v1.2.0
  Configs     2 created
```
