# Get script

> Get a Cloud Code script.

Get a Cloud Code script.

## Command

Authentication Required: `Yes`

```text
ugs cloud-code scripts get <script-name> [options]
```

## Arguments

`<script-name>` The name of the script to get

## Options

|             | Alias                  | Description                                             |
| ----------- | ---------------------- | ------------------------------------------------------- |
| project-id  | -p, --project-id       | The Unity cloud project ID.                             |
| environment | -e, --environment-name | The services environment name.                          |
| versions    | --versions             | Expand each version instead of listing version numbers. |
| help        | -?, -h, --help         | Display help and usage information.                     |
| quiet       | -q, --quiet            | Reduce logging to a minimum.                            |
| json        | -j, --json             | Use JSON as the output format.                          |

## Versions

By default `versions` is a list of published version numbers. With `--versions`, each version is
expanded:

```yaml
versions:
  - isDraft: true
    dateUpdated: 2026-09-08T11:47:37
  - version: 2
    isDraft: false
    dateUpdated: 2026-09-08T11:47:37
    dateCreated: 2026-09-01T09:14:02
    tags:
      tier: a
```

The first entry is the working copy. It has no version number, which is why it appears only in the
expanded form, and it is the only entry that can have `isDraft: true`.

Each version's code and parameters are not shown, as the code would dominate the output. Use
[publish](publish) to promote a version, and note that `datePublished` belongs to `activeScript`
rather than to an individual version.
