Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cognite/itg-cli

Package Overview
Dependencies
Maintainers
184
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cognite/itg-cli

A CLI for itg.cognite.ai

  • 0.0.1-alpha.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
184
Created
Source

itg - A CLI for https://itg.cognite.ai

Install

npm install -g @cognite/itg-cli

Commands

# Creates a new project and dumps details in .itgrc
itg init

itg schema view
# Also includes all generated types and queries
itg schema view --full
itg schema view --type=Equipment

# Check if a schema is valid graphql and fits ITG requirements
itg schema validate -f mymodel.graphql

# For CI/CD, add flag to fail when invalid schema detected
itg schema validate --fail-on-invalid -f mymodel.graphql

# Add and replace a schema in itg
itg schema update -f mymodel.graphql

itg nodes add --type Equipment -f equipment.csv
itg nodes add --type Document -f documents.csv

itg relations add Equipment.documents -f relations.csv

# Delete the project, including the .itgrc
itg prune

Global variables

Set the COGNITE_CREDENTIALS variable with an api key for the respective cdf project to get access Set COGNITE_CREDENTIALS_CLIENT_ID and COGNITE_CREDENTIALS_CLIENT_SECRET variables (and COGNITE_TENANT if the clientId/secret are not for itg-testing tenant) with clientId & clientSecret for the respective cdf project to get access

CI/CD

We expect the main use of the CLI for CI/CD will be validating and updating schemas. The validate step should be added to the create pr workflow, while the update step should be added to the merge to master workflow. Remember to include the --fail-on-invalid flag in the validate command to avoid false positives in the workflow.

FAQs

Package last updated on 02 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc