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

# Deployment scripts

> Reference for the DirectGVR sample deployment scripts: setup, global settings, credentials and every script's parameters.

The DirectGVR sample deployment scripts work with the [Deployment Console tools](https://docs.directgvr.com/reference/deployment-console-tools.md) to deploy releases, create update paths, promote releases and compile launchers. You don't have to use them as they are: change them, or use them as a reference for another scripting language.

> [!NOTE]
>
> Depending on your support contract, Solid State Networks may not be able to help with changes you make to the scripts.

This page covers version 4.0 of the deployment scripts.

## Install the scripts

You need:

* Python 3.13
* The Python modules listed in `requirements.txt`

Install the modules with pip:

```bash theme={null}
pip install -r requirements.txt
```

### Use a virtual environment

A virtual environment keeps the scripts' dependencies separate from other Python projects. Create it once, when you install.

| Platform | Command |
| - | - |
| POSIX | `python3 -m venv /path/to/new/virtual/environment` |
| Windows | `py -3 -m venv /path/to/new/virtual/environment` |

```bash theme={null}
cd \path\to\repo
py -3 -m venv .venv
```

Activate the environment each time you open a new terminal. After you activate it, use `python` and `pip` instead of `python3` or `py -3`.

| Platform | Shell | Command |
| - | - | - |
| POSIX | bash/zsh | `source <venv>/bin/activate` |
| POSIX | fish | `source <venv>/bin/activate.fish` |
| POSIX | csh/tcsh | `source <venv>/bin/activate.csh` |
| POSIX | PowerShell Core | `<venv>/bin/Activate.ps1` |
| Windows | cmd.exe | `<venv>\Scripts\activate.bat` |
| Windows | PowerShell | `<venv>\Scripts\Activate.ps1` |

## How configuration works

You can set options in three places. Each overrides the one before it:

1. `config.py`
2. A JSON or YAML configuration file passed with `--config=/path/to/file.json`
3. The command line

Avoid editing `config.py` if you can.

* Use forward slashes (`/`) in paths. The consoles convert them to backslashes on Windows automatically.
* Every option starts with two hyphens (`--`).
* Required parameters are in **bold** in the tables below.
* Set Boolean values as `"config_value": true` or `false` in a configuration file, and as `--config_value` (no value) on the command line.
* A "string boolean" can be a Boolean or a string (`"true"`, `"false"`) in a configuration file, and `--config_value=true` or `false` on the command line.

## Global parameters

Several scripts use these settings. Your release package already sets them. You only need to change some of them, such as `console_directory`, if you change the package's folder structure. Don't change parameters in `config.py` that aren't listed here.

| Parameter | Type | Description | Default |
| - | - | - | - |
| **`console_directory`** | directory path | Folder that contains the console executables | `{script_directory}/console/` |
| `axis_version` | string | Tells the Axis API to use this version of the Console tools. Set to null/None to use the version from the local Console app. | 6.0.2 |
| `certificate_identity` | string | Certificate thumbprint or subject name to search `certificate_store` for | null |
| `certificate_password` | string | Password for the certificate in `certificate_path` | null |
| `certificate_path` | file path | Certificate used to sign executable files | null |
| `certificate_store` | string | Name of the store that contains the certificate | null |
| `config_print` | boolean | Write all configuration options to the log for debugging | |
| `console_config` | file path | Additional console configuration JSON file, the same as the console app's `--config=` parameter. Put all server and CDN credentials in this file. | |
| `console_credentials` | dictionary or file path | JSON object, or path to a JSON file, with credentials for the Console apps. See [Login credentials](#login-credentials). Only a file path works on the command line. | |
| `console_stdin` | boolean | Pass all console inputs through stdin for added security. Supported in DIRECT 7.0.1.4, 6.2.2, 6.1.2.85 and newer. | |
| `debug` | boolean | Show and log debug information | false |
| `debug_network` | boolean | Show and log extra debug information when talking to the API. Turns on `debug`. | false |
| `email` | string | Optional value logged to help audit usage | |
| `ksp_alias` | string | Name of the key alias | null |
| `ksp_name` | string | Name of the cryptographic key storage provider | null |
| `ksp_pin` | string | Smart card PIN | null |
| `ksp_pubkey` | string | Path to the public certificate for the signing key | null |
| `location` | boolean | Add CDN credentials from the Location service to your local ones. Ignored if `manifest_api` is null. | true |
| `log_json` | boolean | Write log output as JSON instead of raw text | false |
| `log_path` | file path | Also write log output to this path. Creates the folder if it's missing and renames an existing file. | |
| `manifest_api` | string | Endpoint for the Manifest API. Set to null to turn it off. | `manifest/` |
| `pkcs11_uri` | URI string | PKCS#11 URI | null |
| `process_default` | `API` or `console` | Where certain computing tasks run | |
| `quiet` | boolean | Show and log errors only | false |
| `user_info` | string | Optional user name logged to help audit usage | |

## Login credentials

The DirectGVR Console apps need authentication. The scripts handle login for you when you pass a JSON credentials file with `--console_credentials`.

To log in manually instead, set `console_credentials` to null/None and run the Login Console yourself. It leaves a credentials file at `%USERPROFILE%\.snxd` that's valid for 24 hours.

The file needs a `consoleCredentials` section with these fields:

| Field | Type | Description |
| - | - | - |
| **`grant`** | string | `prompt` to sign in through your default browser, or `clientCredentials` to use a client secret |
| `clientId` | string | Client ID |
| `clientSecret` | string | Client secret, when `grant` is `clientCredentials` |
| `org` | string | Organization slug used for login, provided by Solid State Networks |
| `scope` | string | Comma-separated list of scopes. Default: `openid,profile` |

```json Client credentials theme={null}
{
  "consoleCredentials": {
    "grant": "clientCredentials",
    "clientId": "<your-client-id>",
    "clientSecret": "<your-client-secret>"
  }
}
```

```json Client credentials in a script config file theme={null}
{
  "console_credentials": {
    "grant": "clientCredentials",
    "clientId": "<your-client-id>",
    "clientSecret": "<your-client-secret>"
  },
  "other_config_item": "value"
}
```

```json Browser prompt theme={null}
{
  "consoleCredentials": {
    "grant": "prompt",
    "clientId": "<your-client-id>"
  }
}
```

## Secure metadata

The launcher needs its metadata files (alias, catalog, metafile and so on) to be downloaded from an authenticated server over HTTPS. See [Options for securing metadata](https://docs.directgvr.com/release-automation/securing-metadata.md).

## Use a proxy

Set the proxy for Python's Requests library with environment variables:

```bash theme={null}
export HTTP_PROXY="127.0.0.1:8888"
export HTTPS_PROXY="127.0.0.1:8888"
```

If you use Charles Web Debugging Proxy with SSL proxying, save the Charles root certificate to disk and set:

```bash theme={null}
export REQUESTS_CA_BUNDLE="charles.pem"
```

## Script reference

Each script's parameters are listed below. Required parameters are in **bold**.

### alias.py

Modifies the alias file.
In normal use updates should be done using promote.py, but the display command is useful for troubleshooting.

| Parameter | Type/Usage | Description |
| - | - | - |
| **Command (use one)** | | |
| display | --display | displays alias contents |
| remove | --remove --alias=\{alias} | removes alias from list |
| update | --update --release\_id=\{id} --alias=\{alias} | adds \{alias} to list with ID \{id}, overwriting existing \{alias} if it exists and the --safe keyword is not used |
| **Options** | | |
| **sync\_directory** | string | directory (remote or local) containing repositories |
| **repository** | string | name of repository |

### builder.py

Builds a launcher/downloader executable.

| Parameter | Type/Usage | Description | Example |
| - | - | - | - |
| **launcher\_path** | full path | Local path to launcher executable (or .app directory for Mac) | |
| **skin\_directory** | directory path | Path to skin directory | |
| **target\_os** | **win32**, **win64**, **mac64**, **macarm64**, **lin64**, **ubuntu18**, **ubuntu22**, **ubuntu24** | Operating system for the executable. Note: not all platforms are supported by all versions of DIRECT. | |
| bundle\_id | string | macOS bundle identifier. See Apple documentation for proper format and character formatting. Default value contains only non-alphanumeric characters, hyphens, and periods. | `--bundle_id=com.{companyName}.{productName}` |
| cef\_source\_directory | directory path | Required for CEF builds, as the CEF files are copied from this location. | |
| command\_line | string, multi | Adds command line parameter to resulting launcher when it runs. May be added multiple times. | `--command_line=debug --command_line=debugdir=\"c:\temp\"` |
| compile\_react | string boolean | Peforms build/compile processing for React skins inside script. Default=True | `--compile_react=false` |
| datastore | boolean | If set, datastore will be added during signing | `--datastore` |
| datastore\_size | string | Sets size of datastore, if datastore is set | `--datastore_size=8kb` |
| launcher\_company | string | Company name to be displayed by launcher executable. | |
| launcher\_copyright | string | Copyright information to be displayed by launcher executable. | |
| launcher\_product\_name | string | Name to be displayed by launcher executable. | |
| launcher\_version | string | Version number to be displayed by launcher executable. | |
| safe | boolean | If set, script will exit instead of overwriting existing launcher at --launcher\_path | |
| timestamp\_service\_url | URL | URL to timestamp service for signing. (Required if `certificate_path` is set.) | windows & linux: `http://timestamp.digicert.com/#authenticode`  mac: `http://timestamp.apple.com/ts01` |

### cleanup.py

Compares piece files in a Product on the Organization's default location with pieces required by all releases in the
Product's Environments with that location.
It deletes any extra pieces, and optionally raises an error if any required pieces are missing.
Pieces less than 24 hours old will not be deleted to avoid deleting pieces from in-progress deployments.
Update paths are also checked on a per-update-path basis (individual missing pieces are not flagged).

| Parameter | Type/Usage | Description | Default |
| - | - | - | - |
| **product\_id** | string | Manifest product id to clean; not required if valid `product_name` is provided | |
| product\_name | string | Manifest product name to clean; only used to determine missing `product_id` | |
| cache\_expire\_hours | integer | Hours before now after which to ignore extra pieces instead of deleting | 24 |
| live\_run | boolean | If not present, pieces to be deleted are displayed but not actually deleted. | \{not set} |
| source\_location | URI string | Source location to check for pieces; defaults to organization default location | |

### crash\_report.py

Retrieves crash report and minidump from Solid State Networks Airbag API to aid in debugging.

| Parameter | Type/Usage | Description | Example |
| - | - | - | - |
| **crashsession** | string | crashsession written to debug log | e8a8add56ab7cc4191766d9944ad01ca |
| **output** | full path | Local path to write report. Report will be as given; minidump will be a .dmp file with the same basename. | c:/temp/crashdump.txt |

### direct\_get.py

Downloads the DIRECT package for a given version.
Note that the console\_credentials is required, and the credentials must have "grant": "clientCredentials".

| Parameter | Type/Usage | Description | Default | Example |
| - | - | - | - | - |
| **version** | string | Version of DIRECT to download | | |
| component | string | Download just the given component instead of the entire package | null (entire package) | `--component=console` |
| ignore\_existing | boolean | Exit with success if target\_directory is not empty | | |
| overwrite | boolean | Delete and recreate target\_directory if it is not empty | | |
| platform | string | Parameter query string for restricted platforms | null | `--platform=xbox` |
| target\_directory | directory path | Local directory for output | `~/.snxd/direct/{version}/` | `c:/direct/7.1.0` |

### dmg.py

Builds a launcher/downloader executable and packages it as a MacOS DMG.

| Parameter | Type/Usage | Description | Example |
| - | - | - | - |
| **app\_path** | full path | Local path to launcher .app directory | |
| **output\_dmg** | full path | Local path for writing dmg | |
| **volume** | string | Volume name | |
| app\_alias | boolean | If set, will create an Application folder alias icon. | |
| background\_image | full path | Background image to use for finder window | |
| datastore | boolean | If set, datastore will be added during signing | `--datastore` |
| datastore\_size | string | Sets size of datastore, if datastore is set | `--datastore_size=8kb` |
| icon\_font\_size | integer | Icon font size for finder window | |
| icon\_label\_pos | string | Position of label with respect to icons (rght, botm) | |
| icon\_pos | list of strings | Icon position (h,v,path). May be entered several times. | `--icon_pos=10,10,MyApp.app --icon_pos=20,20,Applications` |
| icon\_size | integer | Icon size for finder window (default=48) | |
| icon\_view | string | Icon view to use for finder window (icons, columns, list, coverflow) | |
| safe | boolean | If set, script will exit instead of overwriting existing DMG at --output\_dmg | |
| save\_hfs | boolean | If set, intermediate raw disk image will be saved alongside dmg | |
| timestamp\_service\_url | URL | URL to timestamp service for signing. (Required if `certificate_path` is set.) | windows & linux: [http://timestamp.digicert.com/#authenticode](http://timestamp.digicert.com/#authenticode),  mac: [http://timestamp.apple.com/ts01](http://timestamp.apple.com/ts01) |
| window\_rect | string | Finder window rectangle (x,y,w,h) | |

### location.py

Wrapper script for Location service. Allows adding to credentials list (with proper permissions)

| Parameter | Type/Usage | Description |
| - | - | - |
| **function** | string | Type of operation. Acceptable values: GET (dump location info to stdout), POST (replace location info with contents of --console\_config file) |

### login.py

Wrapper script for Login Console. Simplifies automation if prompt-type login is used -- run this, and then rely on
cached token file by setting console\_credentials to null for later scripts.

| Parameter | Type/Usage | Description |
| - | - | - |
| auto\_prompt | boolean | For grant=prompt, only prompt if the token file is expired, or will expire in expire\_padding seconds |
| client\_id | string | clientId for credentials; required if console\_credentials is not used |
| client\_secret | string | clientSecret for credentials; required if console\_credentials is not used |
| console\_credentials | path or dictionary | See [Global Parameters](#global-parameters) |
| expire\_padding | integer | During login, if valid token exists but will expire within this many seconds, attempt login as if token is invalid |
| grant | string | "prompt" or "clientCredentials"; required if console\_credentials is not used |

### manifest.py

Command-line access to Manifest API. Use object and task.
The standard REST tasks (get, post, put, delete) are passed through to the API.

Tasks:

* create, delete, and update pass the complete request through to the API, displaying the response on error
* get passes the information through to the API and displays the response

Exceptions:

* history
  * create adds a repository/release pair
  * delete can either delete a timestamp or a repository/release pair, depending on if a created\_time is present
* launch (uses a "launch object" consisting of launch\_name, and optionally launch\_executable and launch\_arguments)
  * add adds the given launch object(s) to the environment's list
  * delete removes the given launch object(s) specified by launch\_name from the environment's list
  * get
    * retrieve the launch object for a given launch\_name
    * returns all objects if no name is given.
  * set will replace the existing set of launch objects with the set objects given
  * update replaces the values for launch\_executable and launch\_arguments for the given launch object(s)

Note on required parameters: `object` and `task` are required. The others *may* be required; see the "Applies to" and "
Description" columns to determine if they are necessary for a given call.

WARNING: Using this script directly allows the user to violate the "business rules." Adding/removing data directly (
especially history data) may cause system instability. Other scripts call these functions in a safe manner.

| Parameter | Type/Usage | Applies to | Description | Default |
| - | - | - | - | - |
| **object** | string: env, history, product, release, repository, update\_path, launch | - | Manifest object to perform task on | - |
| **task** *(except launch)* | string: create, delete, get, update | all objects except `launch` | - | |
| **task** *(launch)* | string: add, delete, get, set, update | `launch` object | - | |
| **env\_id** | string | env, history, launch, release, repository, update\_path | Environment ID. Can be determined from env\_name if required. Not required for `create`. | Auto-generated GUID for `create` tasks; looked up from `env_name` for others |
| **env\_name** | string | env, history, launch, release, repository, update\_path, launch | Environment name | - |
| **launch\_name** | string | launch | Name of a launch object for display/organization purposes. May be entered multiple times to specify multiple objects. (required whenever a launch object is specified) | - |
| **product\_id** | string | env, history, launch, product, release, repository, update\_path | Product ID. Can be determined from product\_name if required. Not required for `create`. | Auto-generated GUID for `create` tasks; looked up from `product_name` for others |
| **product\_name** | string | env, history, launch, product, release, repository, update\_path | Product name | - |
| **release\_id** | string | history, release | Release ID | - |
| **repository\_id** | string | history, release, repository | Repository ID. Can be determined from repository\_name if required. Not required for `create`. | - |
| **repository\_name** | string | history, release, repository | Repository name | Auto-generated GUID for `create` tasks; looked up from `repository_name` for others |
| alias\_location | URI string | env | Alternative uri used by a client when retrieving an asset | *empty string* |
| catalog\_location | URI string | env | Alternative uri used by a client when retrieving an asset | *empty string* |
| chain\_delete | string: true/false | DELETE tasks | Delete all sub-objects before deleting object | True |
| created\_time | timestamp | history | Timestamp of object | - |
| delete\_protect | string: true/false | env, history, product, release, repository, update\_path | If set, object cannot be deleted until un-set. | False |
| description | string | env, product, release, repository | Friendly description for object | *empty string* |
| dry\_run | boolean | DELETE tasks | List items that would have been deleted instead of actually deleting | False |
| force\_update | boolean | snapshot | Re-add snapshot even though current repository/release pair hasn't changed | False |
| history\_version | string | history | Version of history entry. | *empty string* |
| launch\_arguments | string | launch | All arguments to be passed to launch\_executable. May be entered multiple times, once per launch\_name | *empty string* |
| launch\_executable | string | launch | Executable to launch for an Environment in Solsta. May be entered multiple times, once per launch\_name | *empty string* |
| limit | integer | GET tasks | Maximum number of items to return | 0 (unlimited) |
| mask | string | update\_path | Base-64 encoded bitfield | *empty string* |
| metafile\_location | URI string | env | Alternative uri used by a client when retrieving an asset | *empty string* |
| notes\_location | string | release | Location of release notes | *empty string* |
| optional | string boolean | repository | If true, the repository is optional. Otherwise, the repository is required. | False |
| publish\_location | URI string | env | Alternative uri used by a client when retrieving an asset | *empty string* |
| search\_query | query string | GET tasks | Value to search on. `'` and `\ ` must be escaped with `\ ` | *empty string* |
| sort\_direction | string: backward, forward | GET tasks | Direction to perform sort. Forward=start from beginning; backward=start with most-recent | forward |
| sort\_field | string | GET tasks | Sort field to use with sort\_direction. Case-sensitive. Fields vary with API endpoint; see API documentation. | Depends on endpoint |
| size | integer | release, update\_path | Size of data | 0 |
| source | string | update\_path | Release to update from | - |
| source\_location | URI string | env | Uri used by deploy tools when ingesting assets | *empty string* |
| source\_version | string | update\_path | Version string for update path | *empty string* |
| storage\_type | string: pieceshared, piece, file | env | Type of file storage for environment | *pieceShared* |
| target | string | update\_path | Release to update to | - |
| target\_version | string | update\_path | Version string for update path | *empty string* |
| update\_path\_count | integer | env | Number of update paths to create during release/promotion. Set in each environment. | 0 |
| version | string | release | Friendly version string of release | *empty string* |

Note: For `*_name`, `*version`, `description`, and `*_location` parameters, passing `EMPTY_STRING` (e.g. `--description=EMPTY_STRING`) will set the field to a literal empty string `""`.

### manifest\_promote.py

Similar to promote.py, but adds Manifest API. If repository and release are not given, the current
environment will be promoted in its entirety.

| Parameter | Type/Usage | Description | Default |
| - | - | - | - |
| env\_id | string | Target environment ID; required, but may be derived from env\_name | |
| env\_name | string | Target environment name | |
| product\_id | string | Target product ID; required, but may be derived from product\_name | |
| product\_name | string | Target product name | |
| release\_id | string | SourceID to promote; may be derived from release\_version or implied by the current release for the source environment and repository | |
| release\_version | string | Version to promote | |
| repository\_id | string | Target repository ID; may be derived from repository\_name | |
| repository\_name | string | Target repository name | |
| source\_env\_id | string | Source environment ID. May be derived from source\_env\_name | env\_id |
| source\_env\_name | string | Source environment name; if absent, will default to env\_name if needed. | |
| source\_product\_id | string | Source product ID. May be derived from source\_product\_name | product\_id |
| source\_product\_name | string | Source product name | product\_name |
| source\_repository\_id | string | Source repository ID. May be derived from source\_repository\_name | repository\_id |
| source\_repository\_name | string | Source repository name | repository\_name |
| alias\_file\_write | string boolean | Writes alias file for non-Manifest promotion | False |
| env\_file\_write | string boolean | Write environment file alongside alias file (if alias\_file\_write is True) | True |
| env\_dict\_write | string boolean | Write environment dictionary file alongside alias file (if alias\_file\_write is True) | True |

### manifest\_release\_copy.py

Similar to release\_copy.py, but adds Manifest API.
Calls release\_copy internally to perform remote file operations.

| Parameter | Type/Usage | Description | Default |
| - | - | - | - |
| source\_product\_id | string | product to copy from (required, but can be derived from \_name | |
| source\_product\_name | string | product to copy from | *null* |
| target\_product\_id | string | product to copy to (required, but can be derived from \_name) | |
| target\_product\_name | string | product to copy to | *source\_product\_name* |
| source\_env\_id | string | env to copy from (required, but can be derived from \_name) | |
| source\_env\_name | string | env to copy from | *null* |
| target\_env\_id | string | env to copy to (required, but can be derived from \_name)' | |
| target\_env\_name | string | env to copy to | *source\_env\_name* |
| source\_repository\_id | string | repository to copy from (required, but can be derived from \_name)' | |
| source\_repository\_name | string | repository to copy from | *null* |
| target\_repository\_id | string | repository to copy to (required, but can be derived from \_name) | |
| target\_repository\_name | string | repository to copy to | *source\_repository\_name* |
| release\_id | string | source release id (required, but can be derived from --version) | |
| version | string | release version; used to determine release\_id | *null* |

### metafile.py

Mostly metafile functions for other scripts; however, it provides a quick way to read an existing signed metafile.

| Parameter | Type/Usage | Description |
| - | - | - |
| **metafile** | full path | Local path to metafile |

### notary.py

The notary tool can be used to deliver macOS binaries to the Apple Store Connect notary web service.

| Parameter | Type/Usage | Description |
| - | - | - |
| **issuer\_id** | string | Apple store connect issuer id |
| **key\_id** | string | Apple store connect key id |
| **private\_key\_path** | file path | Path to Apple store connect private key pem file |
| **source** | file or directory path | Path to source file or directory. Valid extensions include: .dmg, .dylib, .app.zip |
| staple | boolean | If set, staple the ticket to .app or .dmg |
| target | file path | Path to stapled target. If not set, the source path is stapled |
| wait\_minutes | integer | Maximum time to wait for acceptance not to exceed 20 minutes |

### promote.py

Creates/edits an Alias to make a Release the "required release" for an Environment. Promotes a release between
environments.
Give the script a release\_id, version, description, or an existing environment, and it will add the new/updated
environment to Alias as "repository.environment".

| Parameter | Type/Usage | Description |
| - | - | - |
| **environment** | string | The user-defined environment name (e.g., qa, stage, live, production) |
| **repository** | string | The repository name (all text before the first dot in the Alias name) |
| **sync\_directory** | directory path | directory (remote or local) containing repositories |
| **One of the following source determiners** | | |
| description | string | The internal description you entered when deploying the Release |
| latest | boolean | Selects most recently created release |
| release\_id | string | The hex string unique identifier for a Release |
| source\_environment | string | Allows promotion from source environment to target environment |
| version | string | The internal version you entered when deploying the Release |
| **Other options** | | |
| env\_dict | boolean string | Write environment dictionary file alongside alias. Defaults to true; may be disabled using --option=false |
| env\_file | boolean string | Write environment file alongside alias. Defaults to true; may be disabled using --option=false |

### release\_copy.py

Copies a release from one location/repository to another.
**Required:** provide one of release\_id/version/description to identify the release to be copied.
Note that target is how the target server is accessed,
but base\_url is how the client will get data from the target server (http/https).

| Parameter | Type/Usage | Description | Example |
| - | - | - | - |
| **base\_url** | URL | Base URL for target server/CDN. | `http://mycdn.net/mydir/` |
| **repository** | string | name of repository | |
| **source** | string | Path to source directory | |
| **target** | string | Path to target directory | |
| base\_url\_metafile | URL | Base URL for metafile (defaults to use base\_url) | |
| description | string | The internal description you entered when deploying the Release | |
| release\_id | string | The hex string unique identifier for a Release | |
| target\_repository | string | Name of target repository, if different from repository | |
| version | string | The internal version you entered when deploying the Release | |

### release\_delete.py

Deletes a release, or all update paths to a release, from one location.
This script does not support Manifest API.

**Required:** provide one of release\_id/version/description to identify the release to be deleted.
**Required:** one of the following commands: --release, --updatepath

| Parameter | Type/Usage | Description |
| - | - | - |
| **release** | boolean | If set, delete release. This overrides --updatepath. |
| **repository** | string | name of repository |
| **sync\_directory** | string | Path to source directory |
| **updatepaths** | boolean | If set, delete update paths to release. |
| description | string | The internal description you entered when deploying the Release |
| dry\_run | boolean | If set, files to be deleted are displayed, but not actually deleted. |
| product\_id | string | Product ID; this or product\_name is required if using Manifest |
| product\_name | string | Product name; this or product\_id is required if using Manifest |
| release\_id | string | The hex string unique identifier for a Release |
| version | string | The internal version you entered when deploying the Release |

### release\_deploy.py

Deploys the contents of a directory to a server with `Solid.ReleaseDeploy.Console`, so `--console_directory` must hold DIRECT 8.1.3 or later.

| Parameter | Type/Usage | Description | Example |
| - | - | - | - |
| **base\_url** | URL | Base URL for server/CDN. Required, but can be derived from env\_id | `http://mycdn.net/mydir/` |
| **repository\_id** | string | Unique repository identifier. Cannot contain dots. Required, but may be derived from repository\_name. | |
| **source** | path | Full (not relative) path to file or directory to be deployed. If source is a url to a directory, it *must* end in a trailing slash. | `s3://mybucket/source/v1/` `c:/game/source/v1/` |
| **sync\_directory** | directory path | directory (remote or local) containing repositories. Required, but can be derived from env\_id | `s3://mybucket/delivery/` `c:/local/server/output/` |
| alias\_name | string | Alias, if you don't want to bother using promote.py. Can be given multiple times on the command line, or as a list in a config file. | |
| autocreate | boolean | Automatically create product/env/repository using associated name if name cannot be found in Manifest. False by default. | |
| base\_url\_metafile | URL | Base URL for metafile (defaults to use base\_url) | |
| description | string | Your unique name for this release | |
| env\_id | string | Environment ID for Manifest | |
| env\_name | string | Environment name for Manifest | |
| exclude | string list (semicolon-delimited) | List of files to exclude. Path is relative to source path. Allows wildcards (\*) and wildcard negation (!) | `--exclude=config.ini;*.txt;!readme.txt` |
| executable\_files | relative file path | Relative path (beneath input\_directory) of file to be marked as executable in metafile. Can be set multiple times. | `mygame.app/Contents/MacOS/mygame` |
| gzip | string | Gzip output piece files | `true` or `false` |
| hidden\_files | relative file path | Relative path (beneath input\_directory) of file to be marked as hidden in metafile. Can be set multiple times. | `settings.ini`, `/config/hidden_stuff.txt` |
| include | string list (semicolon-delimited) | List of files to include; all other files in --source path will be ignored. Path is relative to source path. Allows wildcards (\*) and wildcard negation (!) | `--include=*.vmdk;!testmachine.vmdk` |
| notes\_location | string | Location of release notes | `--notes_location=http://mysite.com/releaseNotes/1.2.3.html` |
| password | string | Encrypts output with AES256 using given password | |
| product\_id | string | Product ID for Manifest | |
| product\_name | string | Product name for Manifest | |
| promote | string true/false | Automatically promote release to target env (default=True) | `true` or `false` |
| readonly\_files | relative file path | Relative path (beneath input\_directory) of file to be marked as read-only in metafile. Can be set multiple times. | `settings.ini`, `/config/only_read.txt` |
| repository | string | Maps to repository\_id for backward compatibility | |
| repository\_name | string | Repository name for Manifest | |
| sync\_attributes | boolean | If set, metafiles are created with the file attributes recorded | |
| sync\_timestamps | boolean | If set, metafiles are created with the file timestamps recorded | |
| version | string | Information about this release such as your internal version number. | `2.7.3b` |

### release\_download.py

Downloads a release using Release Console (instead of a built downloader/launcher)

| Parameter | Type/Usage | Description | Example |
| - | - | - | - |
| **target** | path | Directory to put downloaded release files | |
| **env\_id** | string | Environment ID; required, but may be derived from env\_name | |
| env\_name | string | Environment name | |
| **product\_id** | string | Product ID; required, but may be derived from product\_name | |
| product\_name | string | Product name | |
| **release\_id** | string | Release ID; required, but may be derived from release\_version or implied by the current release for the source environment and repository | |
| release\_version | string | Version to download | |
| **repository\_id** | string | Repository ID; required, but may be derived from repository\_name | |
| repository\_name | string | Repository name | |
| password | string | Decrypts AES256-encrypted pieces using given password | |

### release\_expire.py

Deletes releases older than a given number of days. Releases that are the currently promoted release for an environment
are not
deleted.

| Parameter | Type/Usage | Description | Default |
| - | - | - | - |
| **product\_id** | string | Product ID; required, but may be derived from product\_name | |
| **source\_location** | string URI | Location of files; should match the sourceLocation in an Environment in the Product | |
| dry\_run | boolean | If set, releases to be deleted are displayed, but not actually deleted. | False |
| history\_age | integer | Age of history entries, in days, where if an old release is listed it will NOT be deleted | 30 |
| product\_name | string | Product name; used to determine product\_id | |
| release\_age | integer | Age of releases to delete, in days | 30 |

### repository\_sync.py

Synchronizes files from source sync\_directory (or repository in sync\_directory) to target. In addition to copying files
not present in the target directory, **this script deletes files in the target directory not present in the source**. DO
NOT use this to sync multiple source releases to the same target.
This script does not add the target repository to the tracker; to do that, use tracker.py's --rebuild command.

| Parameter | Type/Usage | Description | Example |
| - | - | - | - |
| **source\_sync\_directory** | directory path | directory (remote or local) containing repositories | `c:/local/server/output/` |
| **target\_sync\_directory** | directory path | directory (remote or local) containing repositories | `s3://mybucket/delivery/` |
| dry\_run | boolean | Display number and total size of files to be copied/deleted without actually performing the sync | |
| overwrite | boolean | Copy files from source to target even if they match | |
| repository | string | Repository name | |

### signer.py

Signs files. The parameters here are duplicated from the "global" section, as other scripts (builder.py,
release\_deploy.py, etc.) use the signing functionality exposed by this script.
If multiple signing methods are provided, signing will use the first found from this list: certificate\_path,
certificate\_identity, ksp\_name, pkcs11\_uri.
Note that certificate\_identity requires a certificate\_store, and ksp\_name requires ksp\_alias and ksb\_pubkey.

| Parameter | Type/Usage | Description | Default | Example |
| - | - | - | - | - |
| **source** | path | File to sign | | `c:/myfiles/launcher.exe` |
| target | path | Path to signed file | source | `c:/myfiles/launcher-signed.exe` |
| azkvaccount | string | Azure KeyVault code signing account name | null | |
| azkvclientid | string | Azure KeyVault client ID | null | |
| azkvclientsecret | string | Azure KeyVault client secret | null | |
| azkvendpoint | url | Azure KeyVault regional endpoint url | null | |
| azkvprofile | string | Azure KeyVault certificate profile name | null | |
| azkvtenantid | string | Azure KeyVault tenant ID | null | |
| aztsaccount | string | Azure Trusted Signing code signing account name | null | |
| aztsclientid | string | Azure Trusted Signing client ID | null | |
| aztsclientsecret | string | Azure Trusted Signing client secret | null | |
| aztsendpoint | url | Azure Trusted Signing regional endpoint url | null | |
| aztsprofile | string | Azure Trusted Signing certificate profile name | null | |
| aztstenantid | string | Azure Trusted Signing tenant ID | null | |
| certificate\_identity | string | Certificate thumbprint or subject name to search the certificate\_store for | null | |
| certificate\_password | string | Password for cert specified in certificate\_path | null | |
| certificate\_path | file path | Path to certificate used for signing executable files | null | |
| certificate\_store | string | Name of store containing certificate information | null | `machine` |
| datastore | boolean | Adds an unauthenticated attribute to the signature that can be used for file stamping. | false | |
| datastore\_size | string | Size of datastore | null | `8kb` |
| deep | boolean | If set, will sign all files in the source directory recursively. | false | |
| entitlements | string | Name of entitlements file | null | |
| esclientid | string | eSigner application client ID | null | |
| esclientsecret | string | eSigner application client secret | null | |
| esusername | string | eSigner account username | null | |
| espassword | string | eSigner account password | null | |
| esotpsecret | string | eSigner one time password secret code | null | |
| esalias | string | eSigner certificate alias | null | |
| jwks | file path | Path to an optional jwks file for use when signing jws to assign kid (.jwks.json) | null | |
| ksp\_alias | string | Name of the key alias. (Windows only.) | null | |
| ksp\_name | string | Name of the cryptographic key storage provider. (Windows only.) | null | |
| ksp\_pin | string | Smart card pin. (Windows only.) | null | |
| ksp\_pubkey | string | Path to the public certificate for signing key. (Windows only.) | null | |
| pkcs11\_uri | uri string | PKCS#11 URI. | null | |

### tracker.py

Manipulates the tracker file. Usually handled automatically by other scripts, but these commands may be useful for
troubleshooting.
Rebuild adds all repositories in a given sync\_directory to the tracker; it does not repair a corrupt tracker file.
The tracker file is JSON, so corruption can either be fixed by hand, or by renaming the file and recreating it with
\--rebuild.

| Parameter | Type/Usage | Description | Example |
| - | - | - | - |
| **Command (use one)** | | | |
| display | boolean | displays tracker file contents; can be limited to a single sync\_directory or repository by setting those parameters | |
| rebuild | boolean | adds all repositories and their releases at **sync\_directory** to the tracker | |
| **Options** | | | |
| repository | string (multiple) | Limits display or rebuild to enumerated repository. May be used more than once to generate a list of repositories. | |
| sync\_directory | directory path | directory (remote or local) containing repositories | |

### tracker\_to\_manifest.py

Imports a tracker json file to the Manifest API.

* Tracker repositories are mapped to product\_id, product\_name, and repository\_name.
* Location is mapped to env\_name.
* A GUID is automatically generated for each repository and environment; those GUIDs are mapped as repository\_id and
  env\_id, respectively.

| Parameter | Type/Usage | Description | Example |
| - | - | - | - |
| location | string | Limit import to specified tracker location (sync\_directory) (case sensitive) | |
| repository | string | Limit import to specified tracker repository (case sensitive) | |
| tracker\_file | string path | Override default tracker.json path | |

### update\_path.py

Creates deltas and masks for faster end-user patching with reduced download sizes.
"Target" refers to the release the end-user is asking for; "source" refers to the release they currently have.
If no update path exists from source to target, the end-user's client will download all changed pieces.

| Parameter | Type/Usage | Description | Example |
| - | - | - | - |
| **repository\_id** | string | Unique repository identifier for source and target releases. Cannot contain dots. Required, but may be derived from repository\_name. | |
| **sync\_directory** | directory path | directory (remote or local) containing repositories. Required, but can be derived from env\_id. | |
| **One of the following targets** | | | |
| latest | boolean | Selects most recently created release | |
| target\_description | string | Your unique name for this release (not used with Manifest) | |
| target\_id | string | The hex string unique identifier for a Release | |
| target\_version | string | Your version for this release | |
| **One of the following source determiners:** | | | |
| sources\_built\_after | integer or string | All releases between the current time and the value specified, where `value` is a timestamp in seconds or a date/time string | `1631573299` or `Sept 13 2021 22:48:19 GMT` |
| source\_id | string | The hex string unique identifier for a Release | |
| sources\_before\_target | integer | The most-recent `value` releases with timestamps before the target | |
| sources\_recent | integer | The most-recent `value` releases (ignoring the target) | |
| sources\_within | integer or string | All releases created in the last `value` interval. Value can be integer seconds, hh:mm:ss, or #w #d #h #m #s | `12h 30m` or `12:30:00` |
| **Optional settings:** | | | |
| env\_id | string | Environment ID for Manifest | |
| env\_name | string | Environment name for determining env\_id in Manifest | |
| password | string | Encrypts output deltas with AES256 using given password. (Required if release is encrypted.) | |
| product\_id | string | Product ID for Manifest | |
| product\_name | string | Product name for determining product\_id in Manifest | |
| repository\_name | string | Repository name for determining repository\_id in Manifest | |
| skip\_delta | boolean | Do not create delta pieces. Mask will still be created. | |
| skip\_mask | boolean | Do not create mask. Delta pieces will still be created. | |
| update\_process | string=\[API, console] | Location performing update path computing. Defaults to process\_default. | |

## Related

* [Deploy a release](https://docs.directgvr.com/release-automation/deploy-a-release.md)
* [Create environments and promote releases](https://docs.directgvr.com/release-automation/environments-and-promotion.md)
* [Deployment Console tools](https://docs.directgvr.com/reference/deployment-console-tools.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.