@cognite/cdf-cli v0.0.3--alpha
CDF CLI
Confluence
The CDF CLI's aim is to make it easier for developers to develop an app or solution on top of CDF. The CLI's current focus is on enabling key data modeling functionality, and we will expand towards other features in the future.
NOTE: This package is still in early alpha and under active development. We will document and test actively, but please file bug report via the Cognite Hub group
Install (Globally)
yarn global add @cognite/cdf-cliCommands
We currently support these top level commands
| Top Level Command | Description |
|---|---|
cdf login | Login with the CLI |
cdf logout | Logout the currently logged-in user |
cdf status | Show user's logged-in status (fails is user not logged in) |
Templates (alias: t)
Use templates backend to perform the action there (cdfrc.json file is the config file that helps execute the commands)
| Templates Command | Description |
|---|---|
cdf t init | Init a templates project locally by creating a cdfrc.json |
cdf t list | Show list of the templates group's external ids |
cdf t create | create a new template group |
cdf t delete | delete some existing templates group |
cdf t generate | Generate client side code for the specified templates group and generate typings based on the selected plugins |
Templates Schema
Operate with schema inside templates instance
| Templates Command | Description |
|---|---|
cdf t schema pull | Pull and override the graphql schema locally based on the version specified in cdfrc.json file |
cdf t schema publish | Publish the local graphql schema file to the backend |
cdf t schema version list |
Solutions (alias: s) 
Use new schema service backend to perform the action there (cdfrc.json file is the config file that helps execute the commands)
| Templates Command | Description |
|---|---|
cdf s generate | Generate client side code for the specified APISpec and generate typings based on the selected plugins |
Options (Global)
These global --options are supported for helping with the executions
| Templates Command | Description |
|---|---|
--help | Show help message and command description |
--verbose | Show debug logs and detailed message to the users helping with debugging |
--no-interactive | Not show prompts rather fails if required args are missing |
--versions | Show the CLI Version |
Command Description
Login
See the login section for more details
Logout
This will logout and clear the global config files for the CLI (not project config use templates delete for that)
cdf logoutStatus
This command will tell about the login status and later on status of the backend your project is connected to.
cdf statusTemplates Generate
This command generates the client side code for the specified project in cdfrc.json.
Currently following plugins are supported only:
--operations-file option will specify which graphql operations to generate hooks, functions for, like certain mutation or query
Example:
cdf templates generate --operations-file operations.graphql --plugins typescript typescript-operationsMetrics, Logs and Telemetry
Update Notifier
We check in background if a newer version of the package is published in npm and notify the user about the same if a newer version is available.
To opt-out set
optOuttotruein~/.config/configstore/update-notifier-@cognite/cdf-cli.jsonor set envNO_UPDATE_NOTIFIER
Contributing to CDF CLI
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
6 years ago