Cognite Data Fusion CLI
Beta
The features described in this section are currently in beta testing and are subject to change.
Use the Cognite Data Fusion (CDF) CLI to manage data models from the command line.
Install the CDF CLI
Prerequisites
To install the CDF CLI, you must first install Node v16 or higher. For more information, see Node JS.
Follow the steps below to install the CDF CLI.
Install the CDF CLI globally
- To install the CDF CLI globally, run the following command from a terminal:
- npm
- Yarn
- pnpm
npm install --global @cognite/cdf-cli
yarn global add @cognite/cdf-cli
pnpm add --global @cognite/cdf-cli
Install the CDF CLI locally (JavaScript)
- To install the CLI locally, run the following command from a terminal:
- npm
- Yarn
- pnpm
npm install @cognite/cdf-cli
yarn add @cognite/cdf-cli
pnpm add @cognite/cdf-cli
Installing the CLI globally
You can also install the CLI globally and skip the project setup below with npm install -g @cognite/cdf-cli
or yarn global add @cognite/cdf-cli
Use the CDF CLI easily in a javascript project
If you need to use the CLI in your project, add it within the scripts
section in your package.json
file.
{
"name": "xxx",
...
"scripts":{
...
"cdf": "cdf"
...
}
}
This will allow you to run npm run cdf
or yarn cdf
within your project.