CLI

The CLI library provides access to data lineage directly from the console. It also allows you to manually create, update, and delete Nodes and Edges from yaml files.

Install the CLI and configure your default server credentials (they will be the same as the credentials used for the Client).

Grai uses OS specific search paths to find it's configuration file

  • macOS: ~/.config/grai and ~/Library/Application Support/grai
  • Unix: ~/.config/grai and /etc/grai
  • Windows: %APPDATA%\grai where the APPDATA environment variable falls back to %HOME%\AppData\Roaming if undefined
pip install grai-cli
grai config init

To confirm that your settings are working with your server:

grai client is_authenticated

The Grai CLI has a range of commands to explore your data. For more details type

grai --help

To apply a configuration by file name:

grai apply <file name>

You can also use the flag --d for a dry run before committing your changes.

To adjust or view config settings which were set above use the config command, for instance to view your settings:

grai config view

To get details about your lineage, such as querying for nodes and edges, use "grai get [noun]". For example, if you wanted to query for all of the nodes in your graph you would type

grai get nodes

or if you wanted to search for a specific node named "customer.name" you would instead

grai get nodes customer.name