Develop in Snowsight Workspaces

Build, preview, and deploy a Snowflake App Runtime app from your browser, with nothing to install. Create the app from + Add new in a workspace or with Cortex Code in Snowsight, preview it as you edit, and deploy it from the same place.

For step-by-step instructions, see Get started with Snowflake App Runtime and choose the Snowsight Workspaces tab.

How preview works

When you select Preview, Snowflake syncs your project to a dev server, installs its dependencies (including devDependencies), and runs the project’s dev script. Each user gets a dev server for each project, so a preview is yours alone and has no shareable URL. To share the app, deploy it.

Workspaces saves your edits as you type and syncs them to the dev server within a second, and the app reloads in place. Edits to package.json or a lockfile (package-lock.json, pnpm-lock.yaml, or yarn.lock) reinstall dependencies and restart the dev server. Lockfiles that the installer writes sync back to the workspace.

The dev server runs on Snowflake compute. It suspends after a period of inactivity and resumes when you reopen Preview. Closing the Preview pane or the browser tab leaves it running until then. To stop it now, select Shutdown from the Preview pane’s menu.

Supported projects

Workspaces supports Next.js projects. A project needs an app.yml manifest and a package.json with a dev script. If the project uses snowflake.yml, Workspaces offers to upgrade it. When you bring an existing project into a workspace, don’t upload node_modules.

Other projects with a dev script that listens on the port Snowflake provides might run, but they aren’t supported.

Preview compared to a deployed app

CapabilityPreviewDeployed app
Where it runsOne dev server for each user and projectAn Application Service
SourceSynced from the workspaceBuilt into the deployed version
Commandnpm run dev (or the equivalent for pnpm/yarn)The run command in app.yml
NODE_ENVdevelopmentproduction
ShareableNoYes, at the app’s URL
LogsLive logs in the Preview paneLive logs and the event table. See Monitor a Snowflake App Runtime app
Caller’s rightsNot availableAvailable

Because preview has no caller’s rights, test row access and masking policies in a deployed app.

Configure preview

Preview reads three fields from app.yml:

  • external_access_integrations: the integrations the dev server can reach. Preview doesn’t start if your role can’t see one of them.
  • secrets: GENERIC_STRING, PASSWORD, and OAUTH2 secrets. Each one is mounted at /secrets/<name>/<key>, the same path a deployed app uses.
  • environment_variables: passed to the dev server. You can’t use the names that preview sets: SNOWFLAKE_HOST, NODE_OPTIONS, SNOWFLAKE_PREVIEW_ORIGIN, SNOWFLAKE_PREVIEW_FRAME_ANCESTORS, and SNOWFLAKE_PREVIEW_PARENT_ORIGIN.

Preview accepts some names that deploy rejects, such as lowercase names, PORT, and NODE_ENV. To use one app.yml for both, follow the naming rules for environment_variables and secrets.

Changes to these fields apply the next time preview starts. To apply them now, select Shutdown, then select Preview again.

More about Workspaces