Dpm

dpm is a command-line tool that does a lot of useful things related to the SDK. Using dpm, you can:

  • Create new Daml projects: dpm new <path to create project in>

  • Create a new project based on the create-daml-app template: dpm new --template=create-daml-app <path to create project in>

  • Initialize a Daml project: dpm init

  • Compile a Daml project: dpm build

    This builds the Daml project according to the project config file daml.yaml (see Configuration files below).

    In particular, it will download and install the specified version of the Dpm SDK (the sdk-version field in daml.yaml) if missing, and use that SDK version to resolve dependencies and compile the Daml project.

  • Launch the tools in the SDK:

    • Launch Sandbox: dpm sandbox

    • Run Daml codegen: dpm codegen

  • Install new SDK versions manually: dpm install <version>

    Note that you need to update your project config file <#configuration-files> to use the new version.

Command Help

To see information about any command, run it with --help.

Configuration Files

The Daml assistant and the SDK are configured using two files:

  • The global config file, one per installation, which controls some options regarding SDK installation and updates

  • The project config file, one per Daml project, which controls how the SDK builds and interacts with the project

Global Config File (dpm-config.yaml)

The global config file dpm-config.yaml is in the dpm home directory (~/.dpm on Linux and Mac, C:/Users/<user>/AppData/Roaming/dpm on Windows). It controls options related to SDK version installation and upgrades.

By default it’s blank, and you usually won’t need to edit it. It recognizes the following options:

  • auto-install: whether dpm automatically installs a missing SDK version when it is required (defaults to true)

Here is an example dpm-config.yaml:

auto-install: true

Project Config File (daml.yaml)

Multi-Package Config File (multi-package.yaml)

See Multi-Package Build for more information on this file.