Welcome to the new Golem Cloud Docs! 👋
Application Manifest

Golem Application Manifest Reference

JSON schema

For the application manifest format we also publish JSON schemas. The current version (1.4.0) is available here (opens in a new tab).

The JSON schema is intended to be used with editors and IDEs, to help with base validation and code completion.

Use the following YAML comments at the start of your golem.yaml documents to enable schema support:

# $schema: https://schema.golem.cloud/app/golem/1.4.0/golem.schema.json

Note that on top of the above schema there are other checks performed by golem, see the field reference below for details.

Loading of Application Manifest documents

The Golem CLI commands that use Application Manifest start by searching for golem.yaml documents in the current and the parent directories. Once the top level manifest document is found, more manifests are searched based on the includes fields.

After resolving relative paths in the documents they are merged, then component selection happens: this can be either explicit, by using --component-name CLI flags, or implicit, in which case only components defined in the directory - including subdirectories - from where the Golem CLI was executed are used.

Application Manifest documents can also be explicitly passed to the CLI, using the --app flag. Note that when using explicit documents the includes field is not used, it is expected that all relevant documents are provided for the CLI.

Template variables and functions

The Application Manifest has some fields which are used as templates, these fields are marked as Templated in the field reference below. The templates are using minijinja (opens in a new tab), which is a minimal templating engine based on Jinja2 syntax.

Available template variables:

  • component_name: contains the current component name in which the template is used

Available naming related string transforming functions:

  • to_snake_case
  • to_kebab_case
  • to_lower_camel_case
  • to_pascal_case
  • to_shouty_kebab_case
  • to_shouty_snake_case
  • to_snake_case
  • to_title_case
  • to_train_case
  • to_upper_camel_case
Example usage:
build: tool-name build {{ component_name | to_snake_case }}.wasm

Field reference

includes
available since1.1.0

Optional list of glob patterns that are used for adding search patterns for other Application Manifests when using auto discovery of them. The patterns are relative to the manifest document in which they are defined.

The default search pattern is **/golem.yaml, which searches for golem.yaml documents in every subdirectory recursively. Templates and examples provided by Golem usually use more specific search patterns to make the lookups more efficient.

The includes fields can be defined in one manifest only, usually in the project root directory. Defining it multiple times results in validation error.

Example usage:
includes:
- components-dir/*/golem.yaml
- custom-templates/golem-*.yaml
app
available since1.4.0

Required application name which will be used as the deployment name for the application.

tempDir
available since1.1.0

Optional path that overrides the default path of the default temporary directory (golem-temp) which is used for storing various intermediate artifacts.

The path is relative to the manifest document in which they are defined.

Example usage:
tempDir: target/golem-temp
witDeps
available since1.1.0

Optional list of paths of directories where WIT dependency packages can be stored. The paths are relative to the manifest document in which they are defined.

During component WIT generation these paths are checked for resolving missing dependencies. It is intended to be used for eliminating duplication of common dependencies and interfaces.

The witDeps fields can be defined in one manifest only, usually in the project root directory. Defining it multiple times results in validation error.

Example usage:
witDeps:
- wit-common/deps
httpApi
available since1.2.4

Optional object for defining HTTP APIs and HTTP API deployments. APIs and deployments can be defined in multiple manifests, and they are merged during deployment.

httpApi.definitions
available since1.2.4

Optional map of HTTP API definitions by API name.

httpApi.definitions.<http-api-name>.version
available since1.2.4

Required string version of the API.

httpApi.definitions.<http-api-name>.project
available since1.2.4

Optional project reference for the API.

httpApi.definitions.<http-api-name>.routes
available since1.2.4

Optional array of HTTP routes.

httpApi.definitions.<http-api-name>.routes[*].method
available since1.2.4

Required HTTP method for the route, accepted values:

  • CONNECT
    available since1.2.4
  • DELETE
    available since1.2.4
  • GET
    available since1.2.4
  • HEAD
    available since1.2.4
  • OPTIONS
    available since1.2.4
  • PATCH
    available since1.2.4
  • POST
    available since1.2.4
  • PUT
    available since1.2.4
  • TRACE
    available since1.2.4
httpApi.definitions.<http-api-name>.routes[*].path
available since1.2.4

Required HTTP path pattern for the route.

httpApi.definitions.<http-api-name>.routes[*].security
available since1.2.4

Optional ID of the required HTTP API security.

httpApi.definitions.<http-api-name>.routes[*].binding
available since1.2.4

Required API binding.

httpApi.definitions.<http-api-name>.routes[*].type
available since1.2.4

*Optional binding type, accepted values:

  • default(default value)
    available since1.2.4
  • cors-preflight
    available since1.2.4
  • file-server
    available since1.2.4
  • file-handle
    available since1.2.4
httpApi.definitions.<http-api-name>.routes[*].componentName
available since1.2.4

Required name of the component to be used in the bindings.

httpApi.definitions.<http-api-name>.routes[*].agent
available since1.4.0

Optional agent name to be used in the bindings.

httpApi.definitions.<http-api-name>.routes[*].idempotencyKey
available since1.2.4

Optional Rib script for calculating the idempotency key.

httpApi.definitions.<http-api-name>.routes[*].invocationContext
available since1.2.4

Optional Rib script for calculating the invocation context.

httpApi.definitions.<http-api-name>.routes[*].response
available since1.2.4

Required Rib script for creating the response.

httpApi.deployments
available since1.2.4

Optional map of HTTP API deployments by environment name.

httpApi.deployments.<environment-name>
available since1.2.4

Optional list of HTTP API deployments for the environment.

httpApi.deployments.<environment-name>[*].domain
available since1.4.0

Required domain for the deployment.

httpApi.deployments.<environment-name>[*].definitions
available since1.2.4

Required list of HTTP API Definitions for the deployment.

environments
available since1.4.0

Optional application environments by environment name.

environments.<environment-name>.default
available since1.4.0

Optional boolean which when set to true marks the environment as default. Only one environment can be marked as default. If missing, the first environment is used as default.

environments.<environment-name>.account
available since1.4.0

Optional account that owns the application environment. When not specified then the current user will be used.

environments.<environment-name>.server
available since1.4.0

Optional server configuration for the environment. Accepted values:

  • local
    available since1.4.0
  • cloud
    available since1.4.0

or a custom server object with the fields documented below.

environments.<environment-name>.server.url
available since1.4.0

Required URL for custom servers.

environments.<environment-name>.server.workerUrl
available since1.4.0

Optional custom URL for golem worker service.

environments.<environment-name>.server.allowInsecure
available since1.4.0

Optional boolean which defaults to false, when set to true it allows insecure connections to the server.

environments.<environment-name>.server.auth.oauth2
available since1.4.0

Optional boolean which when set to true selects OAuth2 based authentication.

environments.<environment-name>.server.auth.staticToken
available since1.4.0

Optional string static token for authentication when using static token based authentication.

environments.<environment-name>.componentPresets
available since1.4.0

Optional preset name or list of preset names which will be used for the application in the given environment.

environments.<environment-name>.cli.format
available since1.4.0

Optional default format for the environment, accepted values:

  • text(default value)
    available since1.4.0
  • json
    available since1.4.0
  • pretty-json
    available since1.4.0
  • pretty
    available since1.4.0
    alias for pretty-json
  • yaml
    available since1.4.0
  • pretty-yaml
    available since1.4.0
environments.<environment-name>.cli.autoConfirm
available since1.4.0

Optional boolean which when set enables the auto-confirm (yes) flag by default.

environments.<environment-name>.cli.redeployAgents
available since1.4.0

Optional boolean which when set enables redeploy-agents flag by default.

environments.<environment-name>.cli.reset
available since1.4.0

Optional boolean which when set enables reset flag by default.

environments.<environment-name>.deployment.compatibilityCheck
available since1.4.0

Optional boolean to enable compatibility checks during deployment.

environments.<environment-name>.deployment.versionCheck
available since1.4.0

Optional boolean to enable version checks during deployment.

environments.<environment-name>.deployment.securityOverrides
available since1.4.0

Optional boolean to allow security overrides during deployment.

components
available since1.1.0

Optional map of Golem components indexed by component-name-s used for defining components.

The components field can be defined in multiple manifest documents, but the used component-name-s must be unique across all the used manifest documents. Using the same component-name more then once results in validation error.

Example usage:
components:
  pack-ns:component-name:
    sourceWit: # ...
    # ...
  pack:comp-b:
    sourceWit: # ...
    # ...
components.<component-name>.templates
available since1.4.0

Optional template name or list of template names which will be used for creating the component fields.

The template name must be one of that are defined in componentTemplates.

See componentTemplates and Template variable and functions for defining templates.

components.<component-name>.presets
available since1.4.0

Optional map of presets used to define preset variations for a component.

A preset contains the same fields as a component. Presets can also specify a components.<component-name>.presets.<preset-name>.default flag to mark it as the default preset for selection.

components.<component-name>.presets.<preset-name>.default
components.<component-name>.componentType
available since1.1.0

Optional string enum of component types, accepted values:

  • durable(default value)
    available since1.1.0
  • ephemeral
    available since1.2.2
  • library
    available since1.2.2

See Ephemeral vs Durable Workers for more information about component types.

Example usage:
components:
  pack-ns:component-name:
    # ...
    componentType: durable
  pack-ns:component-name:
    # ...
    componentType: ephemeral
components.<component-name>.buildMergeMode
available since1.4.0

Optional merge mode for components.<component-name>.build. Accepted values:

  • append(default value)
    available since1.4.0
  • prepend
    available since1.4.0
  • replace
    available since1.4.0
components.<component-name>.files
available since1.1.0

Optional list of files entries, which can be used for defining the Initial File System for the component.

Example usage:
components:
  pack-ns:component-name:
    # ...
    files:
    - sourcePath: ./files/foo.txt
      targetPath: /files/foo.txt
      permissions: read-only
    - sourcePath: ./files/bar.txt
      targetPath: /files/bar.txt
      permissions: read-write
components.<component-name>.filesMergeMode
available since1.4.0

Optional merge mode for components.<component-name>.files. Accepted values:

  • append(default value)
    available since1.4.0
  • prepend
    available since1.4.0
  • replace
    available since1.4.0
components.<component-name>.files[*].sourcePath
available since1.1.0

Required source path of the file to be added to the Initial File System. The path can be a file path relative to the manifest document or an URL.

components.<component-name>.files[*].targetPath
components.<component-name>.files[*].permissions
available since1.1.0

Optional string enum which controls file permissions. Accepted values:

  • read-only(default value)
    available since1.1.0
  • read-write
    available since1.1.0
components.<component-name>.plugins
components.<component-name>.pluginsMergeMode
available since1.4.0

Optional merge mode for components.<component-name>.plugins. Accepted values:

  • append(default value)
    available since1.4.0
  • prepend
    available since1.4.0
  • replace
    available since1.4.0
components.<component-name>.plugins[*].name
components.<component-name>.plugins[*].version
components.<component-name>.plugins[*].account
components.<component-name>.plugins[*].parameters
components.<component-name>.sourceWit
available since1.1.0

Required directory path for the user defined component WIT directory.

The path is relative to the manifest document in which the field is defined.

The WIT directory can omit the deps folder if the required dependencies are available in some of the folders defined in witDeps.

Example usage:
components:
  pack-ns:component-name:
    # ...
    sourceWit: wit
components.<component-name>.env
components.<component-name>.envMergeMode
available since1.4.0

Optional merge mode for components.<component-name>.env. Accepted values:

  • upsert(default value)
    available since1.4.0
  • replace
    available since1.4.0
  • remove
    available since1.4.0
components.<component-name>.generatedWit
available since1.1.0

Required directory path for the generated WIT directory created by the golem tooling, which handles exported interface extraction and includes resolved package and client dependencies.

This directory is intended to be used as source for binding generation.

The path is relative to the manifest document in which the field is defined.

This folder is usually added to .gitignore, as it is generated as part of build.

Example usage:
components:
  pack-ns:component-name:
    # ...
    generatedWit: wit-generated
components.<component-name>.componentWasm
available since1.1.0

Required file path which should point to the built component WASM file before linking.

The path is relative to the manifest document in which the field is defined.

This file is usually added to .gitignore, as it is created as part of build.

Example usage:
components:
  pack-ns:component-name:
    # ...
    componentWasm: build/component.wasm
components.<component-name>.dependencies
components.<component-name>.dependenciesMergeMode
available since1.4.0

Optional merge mode for components.<component-name>.dependencies. Accepted values:

  • append(default value)
    available since1.4.0
  • prepend
    available since1.4.0
  • replace
    available since1.4.0
components.<component-name>.dependencies[*].type
available since1.4.0

Required string enum that defines the dependency type. Accepted values:

  • wasm
    available since1.4.0
  • wasm-rpc
    deprecated since1.3.0|available since1.4.0
  • wasm-rpc-static
    deprecated since1.3.0|available since1.4.0
components.<component-name>.dependencies[*].target
components.<component-name>.dependencies[*].path
components.<component-name>.dependencies[*].url
components.<component-name>.linkedWasm
available since1.1.0

Optional file path which should point to the built component WASM file after linking.

Defaults to golem-temp/linked-wasm/component-name.wasm, see tempDir.

The path is relative to the manifest document in which the field is defined.

This file is usually added to .gitignore, as it is created as part of build.

Example usage:
components:
  pack-ns:component-name:
    # ...
    linkedWasm: golem-temp/component/component.wasm
components.<component-name>.build
available since1.1.0

Optional list of build commands that creates components.<component-name>.componentWasm.

Example usage:
components:
  pack-ns:component-name:
    build:
    - command: bindgen-tool wit-generated
    - command: build-tool wit-generated component.wasm
components.<component-name>.build[*].command
components.<component-name>.build[*].dir
available since1.1.0

Optional directory path which will be used as working directory when executing components.<component-name>.build[*].command.

The path is relative to the manifest document, and defaults to ..

components.<component-name>.build[*].rmdirs
available since1.1.0

Optional list of directory paths which will be deleted before executing the command.

The path is relative to components.<component-name>.build[*].dir.

The rmdirs field is useful when a binding generator does not automatically clean stale bindings.

Directories are not removed if the command is skipped because of up-to-date checks, see components.<component-name>.build[*].sources and components.<component-name>.build[*].targets.

Directories are removed before executing components.<component-name>.build[*].mkdirs.

components.<component-name>.build[*].mkdirs
available since1.1.0

Optional list of directory paths which will be created before executing the command if they do not exists.

The path is relative to components.<component-name>.build[*].dir.

The mkdirs field is useful when a build of binding generator tool does not automatically create required nested folders.

Directories are not created if the command is skipped because of up-to-date checks, see components.<component-name>.build[*].sources and components.<component-name>.build[*].targets.

Directories are created after executing components.<component-name>.build[*].rmdirs.

components.<component-name>.build[*].sources
available since1.1.0

Optional list of paths and globs which are used as sources for performing up-to-date checks.

If defined then components.<component-name>.build[*].targets also have to be used.

The up-to-date check

Example usage:
components:
  pack-ns:component-name:
    # ...
    build:
    - command: build-tool src-dir out.wasm
      sources:
      - src-dir/*
      targets:
      - out.wasm
components.<component-name>.build[*].targets
available since1.1.0

Optional list of paths and globs which are used as targets for performing up-to-date checks.

If defined then components.<component-name>.build[*].sources also have to be used.

See components.<component-name>.build[*].sources for up-to-date check details.

components.<component-name>.customCommands
available since1.1.0

Optional map of component specific external commands, which are useful for defining e.g. one time installation or update related commands for the component.

The commands can be executed using:

golem exec command-name

Multiple components can use the same command-name, the above command will execute all matching commands in this case, both component specific and project ones.

For defining project level custom commands see customCommands.

Example usage:
components:
  pack-ns:component-name:
    # ...
    customCommands:
      npm-install:
      - command: npm install
components.<component-name>.customCommands.<command-name>[*].dir
components.<component-name>.customCommands.<command-name>[*].rmdirs
components.<component-name>.customCommands.<command-name>[*].mkdirs
components.<component-name>.customCommands.<command-name>[*].mkdirs
components.<component-name>.customCommands.<command-name>[*].sources
components.<component-name>.customCommands.<command-name>[*].targets
components.<component-name>.clean
clean
available since1.1.1

Optional list of paths which are added as targets to the golem clean command.

The paths are relative to the manifest document.

The clean command deletes the following paths:

customCommands
available since1.1.1

Optional map of custom external commands, which are useful for defining e.g. one time installation or update related project commands.

The commands can be executed using:

golem exec command-name

Components specific custom commands can use the same command-name, the above command will execute all matching commands in this case, both component specific and project ones.

For defining component specific custom commands see components.<component-name>.customCommands.

Example usage:
customCommands:
  npm-install:
  - command: npm install
customCommands.<command-name>[*].dir
available since1.1.1

Optional directory path which will be used as working directory when executing customCommands.<command-name>[*].command.

The path is relative to the manifest document, and defaults to ..

customCommands.<command-name>[*].rmdirs
available since1.1.1

Optional list of directory paths which will be deleted before executing the command.

The path is relative to customCommands.<command-name>[*].dir.

The rmdirs field is useful when a binding generator does not automatically clean stale bindings.

Directories are not removed if the command is skipped because of up-to-date checks, see customCommands.<command-name>[*].sources and customCommands.<command-name>[*].targets.

Directories are removed before executing customCommands.<command-name>[*].mkdirs.

customCommands.<command-name>[*].mkdirs
available since1.1.1

Optional list of directory paths which will be created before executing the command if they do not exists.

The path is relative to customCommands.<command-name>[*].dir.

The mkdirs field is useful when a build of binding generator tool does not automatically create required nested folders.

Directories are not created if the command is skipped because of up-to-date checks, see customCommands.<command-name>[*].sources and customCommands.<command-name>[*].targets.

Directories are created after executing customCommands.<command-name>[*].rmdirs.

customCommands.<command-name>[*].sources
available since1.1.1

Optional list of paths and globs which are used as sources for performing up-to-date checks.

If defined then customCommands.<command-name>[*].targets also have to be used.

The up-to-date check

customCommands.<command-name>[*].targets
available since1.1.1

Optional list of paths and globs which are used as targets for performing up-to-date checks.

If defined then customCommands.<command-name>[*].sources also have to be used.

See customCommands.<command-name>[*].sources for up-to-date check details.

componentTemplates
available since1.4.0

Optional map of named templates, which can be used in components.<component-name>.templates.

Templates help in extracting common build patterns and reuse them for multiple components.

The templates field can be defined in multiple application manifest documents, but the template names must be unique.

See Template variable and functions for more information about templating.

componentTemplates.<template-name>.componentType
available since1.1.0

Templated components.<component-name>.componentType.

componentTemplates.<template-name>.files
available since1.1.0

Templated components.<component-name>.files.

componentTemplates.<template-name>.files[*].sourcePath
componentTemplates.<template-name>.files[*].targetPath
componentTemplates.<template-name>.files[*].permissions
componentTemplates.<template-name>.sourceWit
available since1.1.0

Templated components.<component-name>.sourceWit.

componentTemplates.<template-name>.generatedWit
available since1.1.0

Templated components.<component-name>.generatedWit.

componentTemplates.<template-name>.componentWasm
available since1.1.0

Templated components.<component-name>.componentWasm.

componentTemplates.<template-name>.linkedWasm
available since1.1.0

Templated components.<component-name>.linkedWasm.

componentTemplates.<template-name>.build
available since1.1.0

Templated components.<component-name>.build.

componentTemplates.<template-name>.build[*].command
available since1.1.0

Templated components.<component-name>.build[*].command.

componentTemplates.<template-name>.build[*].dir
available since1.1.0

Templated components.<component-name>.build[*].dir.

componentTemplates.<template-name>.build[*].rmdirs
available since1.1.0

Templated components.<component-name>.build[*].rmdirs.

componentTemplates.<template-name>.build[*].mkdirs
available since1.1.0

Templated components.<component-name>.build[*].mkdirs.

componentTemplates.<template-name>.build[*].sources
available since1.1.0

Templated components.<component-name>.build[*].sources.

componentTemplates.<template-name>.build[*].targets
available since1.1.0

Templated components.<component-name>.build[*].targets.

componentTemplates.<template-name>.customCommands
available since1.1.0

Templated components.<component-name>.customCommands.

componentTemplates.<template-name>.customCommands.<command-name>[*].dir
componentTemplates.<template-name>.customCommands.<command-name>[*].rmdirs
componentTemplates.<template-name>.customCommands.<command-name>[*].mkdirs
componentTemplates.<template-name>.customCommands.<command-name>[*].mkdirs
componentTemplates.<template-name>.customCommands.<command-name>[*].sources
componentTemplates.<template-name>.customCommands.<command-name>[*].targets
componentTemplates.<template-name>.clean
available since1.1.0

Templated components.<component-name>.clean.

componentTemplates.<template-name>.presets
available since1.4.0

Templated components.<component-name>.presets.

componentTemplates.<template-name>.presets.<preset-name>.default
available since1.4.0

Templated and preset specific components.<component-name>.default.

Fields and changes by releases

available since1.1.0

available since1.1.1

available since1.2.2
added enum values wasm and wasm-rpc-static todependencies.<component-name>.type
component and template schema property cleanups

available since1.2.2.1
external command schema property cleanups

available since1.2.4

available since1.3.0
added enum values pretty-json, pretty and pretty-yaml toprofiles.<profile-name>.format
renamed resetWorkers to resetAgents
deprecated wasm-rpc dependencies

available since1.4.0