@cognite/cdf-cli v0.1.0--alpha-dev2
CDF CLI
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 signin | Login with the CLI (alias: login) |
cdf signout | Logout the currently logged-in user (alias: logout) |
cdf status | Show user's logged-in status (fails is user not logged in) |
Data-models (alias: dm)
| Data model Commands | Description |
|---|---|
cdf data-models create | Creates a new data model in CDF that allows you to store and retrieve data to your needs. |
cdf data-models delete | Deletes a data model stored in CDF (including all its data and versions). This is an irreversible action! |
cdf data-models list | List all data models stored in CDF |
cdf data-models publish | Updates a data model with a new GraphQL definition. In case of any breaking changes, a new version of the data model will be published. For non-breaking changes, the existing version of the data model will be updated |
cdf data-models generate | Generate a GraphQL client code for the schema you provide by fetching the introspection query from the server |
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 |
--interactive | (Default: true) Show prompts rather than failing if required arguments are missing |
Command Description
Signin
See the login section for more details
cdf signincdf loginSignout
This will logout and clear the global config files for the CLI.
cdf signoutcdf logoutStatus
This command will tell about the login status and later on status of the backend your project is connected to.
cdf statusData models generate
This command generates the client side code for the specified project.
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 data-models 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