Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cognite.com/llms.txt

Use this file to discover all available pages before exploring further.

This quickstart is for developers who build Flows custom apps and want the fastest path from an empty folder to an app running in Cognite Data Fusion (CDF). Following the steps below, you will scaffold a React app with @cognite/cli, deploy it to your project, and activate a version users can open in CDF.

Prerequisites

  • Node.js v18 or later
  • A CDF project where you can deploy Flows custom apps
  • Basic familiarity with the terminal (optional: mkcert for local HTTPS — see Local HTTPS)

Deploy your first app

1

Verify the CLI

Confirm @cognite/cli@latest runs (no global install required):
npx @cognite/cli@latest --version
You see a version number printed to the terminal.
2

Create a new app

Run the interactive scaffolder:
npx @cognite/cli@latest apps create my-app
You are prompted for display name, description, CDF organization, CDF project, and CDF cluster (for example greenfield).For scripts or CI, pass flags instead of prompts:
npx @cognite/cli@latest apps create my-app \
  --display-name "My App" \
  --description "My first Flows app" \
  --org my-org \
  --project my-project \
  --cluster greenfield \
  --base-url https://greenfield.cognitedata.com
A new my-app directory exists with app.json and a React project scaffold.
3

Deploy to CDF

From the app directory, deploy a draft version:
cd my-app
npx @cognite/cli@latest apps deploy
Use npx @cognite/cli@latest apps deploy --interactive to sign in through the browser when you do not have deploy secrets configured locally.
For CI, set deployClientId and deploySecretName in app.json, set the referenced environment variable, then run deploy. See Authentication and the command reference.
export MY_CLIENT_SECRET=<my-client-secret>
npx @cognite/cli@latest apps deploy
The command completes without errors and reports a successful deployment.
4

Publish and activate

Promote the draft, then set the version users receive:
npx @cognite/cli@latest apps publish .
npx @cognite/cli@latest apps activate .
activate combines publish and setting the ACTIVE alias in one step.
Your app opens in CDF and shows the version you deployed.

Authentication

Most commands accept one of the following authentication modes.
ModeHowWhen to use
Environment variable (default)deployClientId + deploySecretName in app.jsonCI and repeated local deploys.
Browser (interactive)--interactiveLocal development without storing secrets.
With --interactive, pass --base-url, --project, and --org to skip prompts. Full flag lists are in the command reference.

Local HTTPS

Browsers sometimes require HTTPS for localhost. Generate trusted certificates with mkcert:
npx @cognite/cli@latest apps setup-https
Certificates are written to ./certificates/mkcert by default. See apps setup-https for --cert-dir and other options.

Code signing

Certified Flows custom apps must be signed before submission. See apps sign and keys in the command reference, and App certification.

Next steps

You scaffolded a Flows custom app, deployed it to CDF, and activated a version for users.
Last modified on May 28, 2026