@cognite/cli

0.5.2 • Public • Published

cdf cli

This is in super alpha!

Install

$ npm i -g @cognite/cli

Screencast example

This is how it works

Usage

The project and api-key is specified through the two required environment variables

$ export COGNITE_PROJECT=publicdata
$ export COGNITE_CREDENTIALS=<api-key>

and the optional environment variable

$ export COGNITE_BASE_URL=<cluster-specific-url>

Examples

cdf assets list

cdf assets list --limit=5

cdf assets list --filter.root=true --limit=5

cdf assets retrieve --externalIds=test1,test2

cdf assets retrieve --ids=123,234

cdf assets search --filter.root=true --search.name=name --limit=10

cdf assets create --externalId=test1 --name=somename

cdf assets update --externalId=test1 --update.name.set=somenewname

You can also pipe JSON input to create/delete to create multiple assets at once. Assuming assets.json contains

[
    {"externalId": "test.1"},
    {"externalId": "test.2"}
]

then; cat assets.json | cdf assets create cat assets.json | cdf assets delete

Settings

Contribution

Yes, please. Issues and PRs are highly welcome.

This package is automatically released using semantic release. Please write commit messages that follows the angular commit message conventions (feat:, fix: etc).

Readme

Keywords

none

Package Sidebar

Install

npm i @cognite/cli

Weekly Downloads

3

Version

0.5.2

License

MIT

Unpacked Size

8.23 kB

Total Files

4

Last publish

Collaborators

  • npmwatchtower
  • cognitecicd