Optional app.yml manifest for Snowflake App Runtime

The optional app.yml manifest lives in your application source. When present, it describes how your application is built and run in Snowflake: install commands, build commands, the container entrypoint, which build outputs become the package, and optional profile metadata. When you omit it, Snowflake auto-detects build and run behavior from your project layout (for example, package.json for Node.js).

Note

Cortex Code CLI and Cortex Code Desktop generate this file automatically when scaffolding Snowflake App Runtime projects.

Deployment with the Snowflake CLI uses a separate snowflake.yml file at the repository root. The snow app setup command creates that file (it does not read an existing snowflake.yml to run). After snowflake.yml exists, commands such as snow app deploy, snow app bundle, and snow app validate read it. See Getting started with Snowflake App Runtime for a walkthrough and snow app setup for snow app setup.

Optional app.yml manifest

You do not need this file for every project. When you add it, you are providing the manifest that tells Snowflake how to install, build, run, and package your application in the remote build environment, instead of relying on auto-detection alone.

Name the manifest file app.yml and place it in your application source.

Top-level structure

install:
  commands:
    - [ <command>, <arg>, ... ]
build:
  commands:
    - [ <command>, <arg>, ... ]
run:
  command: [ <command>, <arg>, ... ]
artifacts:
  - src: <glob_pattern>
    dest: <destination_path>
profile:
  icon: <relative_path_to_png>
  label: <display_label>
  description: <description_text>

All top-level keys are optional. Snowflake ignores unknown keys.

Keys

install

Commands Snowflake runs during the install phase, before the build. Each entry under commands is an argv-style list, passed directly without a shell. Use install for setup steps such as installing dependencies.

install:
  commands:
    - [ npm, ci ]

build

Commands Snowflake runs during the build phase. Each entry under commands is an argv-style list.

build:
  commands:
    - [ npm, run, build ]

run

The entry-point command that starts the application container. command is an argv-style list.

run:
  command: [ node, server.js ]

artifacts

Copy rules that move files produced by the build into the final package. Each entry has these fields:

  • src: Glob pattern, relative to the build working directory, that matches the files to copy. The pattern supports ** for recursive matching (provided by the doublestar library). For example, dist/** matches every file under dist at any depth.
  • dest: Destination path within the package. Set dest to . to flatten matched files into the package root by basename. Set dest to any other path to preserve the directory structure of the matched files relative to the glob base, rooted at dest.

Only files that match the glob are copied; directories themselves aren’t copied. To include a directory tree, use **.

artifacts:
  - src: "dist/**"
    dest: "."
  - src: "package.json"
    dest: "."

profile

Presentation metadata surfaced alongside the deployed service.

  • icon: Relative path to a .png file inside the package. The path must not contain ...
  • label: Short display label.
  • description: Longer human-readable description.

The label and description values appear in the additional_properties column of SHOW APPLICATION SERVICES.

profile:
  icon: assets/logo.png
  label: Customer Portal
  description: Web UI for the customer-facing portal.

Example

install:
  commands:
    - [ npm, ci ]
build:
  commands:
    - [ npm, run, build ]
run:
  command: [ node, dist/server.js ]
artifacts:
  - src: "dist/**"
    dest: "."
profile:
  icon: assets/logo.png
  label: Customer Portal
  description: Customer portal web UI.