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.

Flows (@cognite/cli) scaffolds React applications for CDF so you can focus on product features instead of wiring authentication and build tooling. The generated stack uses TypeScript, Vite, the Cognite SDK through React hooks, and paths to deploy to CDF.

Prerequisites

Before you begin, ensure you have the following:
  • Node.js 20.19 or later (npm 11.10.0 or later required).
  • Cursor (recommended) or another editor for TypeScript and React.
  • Access to a CDF project (organization, project name, and cluster).
  • App hosting capabilities assigned by your administrator in CDF groups. See Flows access control.
  • Access to cogniteappsdata.com in your network allowlist. If your organization uses a firewall or proxy that restricts domains, ensure this domain is allowlisted. For other URLs CDF may require, see Allowlist URLs.
Flows apps work well with any modern coding agent — Claude Code, GitHub Copilot, Google Antigravity, and others. Skills ship with every generated app so agents stay aligned with Cognite best practices without extra configuration.
Builder certification for customer environments: If you plan to develop and deploy Flows custom apps, you must complete Builder certification. This ensures you understand security requirements, development best practices, and compliance standards for production deployments.

Install Node.js

We recommend nvm (Node Version Manager) to install and manage Node.js versions.
# Download and install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash

# Load nvm (or restart your terminal):
. "$HOME/.nvm/nvm.sh"

# Install Node.js:
nvm install 20.19.5

Verify installation

node --version  # Should be v20.19.0 or higher
npm --version   # Should be v11.10.0 or higher
If you need to upgrade your Node.js or npm versions:
Use nvm or Homebrew.
nvm install 20
nvm use 20
# OR if using Homebrew:
brew install node@20
Cursor is the recommended IDE for developing Flows custom apps. It provides AI-assisted coding with rules included in generated apps.
  1. Download Cursor from cursor.com.
  2. Install and open the application.
  3. Sign in or create an account.

GitHub (optional)

For version control, create an account at github.com and configure Git:
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"

Cognite Data Fusion (CDF) access

You need:
  • Your organization name (for example, your-org-name).
  • Your project name (for example, your-project-name).
  • Your cluster (for example, your-cluster-name).
Contact your Cognite administrator if you need access.

Create and run your app

1

Create your app

Run:
npx @cognite/cli@latest apps create
Or create the app in a specific directory:
npx @cognite/cli@latest apps create [directory]
Or create in the current directory by using a special . syntax:
npx @cognite/cli@latest apps create .
2

Fill out the parameters

You are prompted for information such as app name (pre-filled if you provided a directory), display name, description, org, project, cluster, base URL, and whether to enable spec-driven development.
PromptDescriptionExample
App nameKebab-case identifier.my-analytics-app
Display nameHuman-readable name.My Analytics App
DescriptionBrief description.Analytics dashboard
OrgYour Cognite organization.your-org-name
ProjectYour CDF project.your-project-name
ClusterCluster subdomain.your-cluster-name
Base URLCDF cluster base URL, pre-filled from your cluster but can be changed. For private-link setups, replace with your internal URL.https://your-cluster-name.cognitedata.com
Enable spec-driven developmentAdds a SPEC.md file and spec-kit slash commands to your app for structured feature planning. See Spec-driven development.yes or no.
Pass flags to skip individual prompts — useful in scripts or when you want to avoid interactive mode:
npx @cognite/cli@latest apps create my-app \
  --display-name "My App" \
  --description "Analytics dashboard" \
  --org your-org-name \
  --project your-project-name \
  --cluster your-cluster-name \
  --base-url https://your-cluster-name.cognitedata.com \
  --no-spec-kit
Any flag you omit will still be prompted interactively.
3

Open the project in Cursor

In the terminal, run the following command to open the generated folder.
cursor my-analytics-app
Ensure the app folder is the workspace root. Cursor detects rules, MCP configuration, and skills from that root so your coding agent picks them up.
You can also drag the folder into Cursor.
4

Install and run

Install dependencies and start the development server:
npm install
npm start
On the first run, you’ll be prompted to install a locally trusted SSL certificate. Enter your sudo password (macOS/Linux) or confirm the browser certificate installation (Windows). This is a one-time setup.
Your app opens in CDF when the dev server is ready.
5

Optional: Initialize Git

Use Cursor to initialize a Git repository and make your first commit.
git init
git add .
git commit -m "Initial commit"
You can also use the Source Control panel in Cursor.
6

Build your app

Start building your application. See the following resources and tips for help:
When you start building:
  • Aura — Ensure @cognite/aura is listed under dependencies in package.json (for example "@cognite/aura": "0.1.1"). If it is missing, ask your coding agent to add that dependency and install it.
  • SPEC.md — Keep product intent in the app root so you and the AI share the same requirements as you iterate.
  • SDK and data — Call CDF through connectToHostApp() from @cognite/app-sdk; TanStack Query is already set up for loading and error handling around SDK calls.
7

Deploy

When you’re ready to deploy your app to CDF, run:
npx @cognite/cli@latest apps deploy --interactive
See Deploy for options and CI/CD.

Generated structure

Here is the generated structure of your app:
my-analytics-app
src
App.tsx
App.test.tsx
main.tsx
styles.css
app.json
AGENTS.md
CLAUDE.md
eslint.config.mjs
index.html
manifest.json
package.json
SPEC.md
tsconfig.json
vite.config.ts
vitest.config.ts

What the template includes

The tree above shows where files live. When you run npx @cognite/cli@latest apps create, the generator also wires in the following capabilities (not only folders and config files):
  • Project scaffolding — Application layout, app.json, configuration files, and skills for AI-assisted development.
  • CDF authentication — Use connectToHostApp() from @cognite/app-sdk to get an authenticated Cognite SDK inside CDF (see Auth API).
  • Local development — Vite with hot module replacement and HTTPS; run commands with npm. See Run your app locally.
  • Data fetchingTanStack Query (React Query) is included to use with connectToHostApp() for SDK calls.
  • Tests and qualityVitest and React Testing Library, plus linting/formatting via your template’s scripts in package.json.
  • Deployment — Interactive deploy from your machine or automation in CI/CD. See Deploy your Flows app.
For more detail on each area (including TypeScript, examples, and build commands), see Flows features.

Further reading

Last modified on May 12, 2026