Diagrid CLI
The Diagrid CLI allows you to manage and interact with your Catalyst resources. The CLI can perform most actions available in the Catalyst Console and provides additional utilities you can use to develop your applications using the APIs. For example, use the Diagrid CLI to:
- Create and manage App IDs, components, subscriptions and more
- Invoke the Catalyst APIs and listen for incoming requests on a given App ID
- Connect Catalyst to your local machine to receive pubsub events, service invocations, input bindings, etc. while developing
- View App ID logs
Installing the CLI
Once you have created your Diagrid Catalyst account, you can access your organization at https://catalyst.diagrid.io.
Next, download and install the Diagrid CLI using the following command:
- MacOS
- Linux
- Windows
curl -o- https://downloads.diagrid.io/cli/install.sh | bash
Move the diagrid binary into your path so you can run it from anywhere. For example:
sudo mv ./diagrid /usr/local/bin
curl -o- https://downloads.diagrid.io/cli/install.sh | bash
Move the diagrid binary into your path so you can run it from anywhere. For example:
sudo mv ./diagrid /usr/local/bin
Download the PowerShell installer
iwr -Uri https://downloads.diagrid.io/cli/install.ps1 -OutFile install.ps1
Execute the PowerShell installer
.\install.ps1
You may need to temporarily set the PowerShell execution policy to Unrestricted to allow the installer to execute.
Set-ExecutionPolicy Unrestricted -Scope CurrentUser
.\install.ps1
Set-ExecutionPolicy Restricted -Scope CurrentUser
Move the diagrid.exe executable into your path so you can run it from anywhere. For example:
Move-Item .\diagrid.exe "$($env:USERPROFILE)\bin"
Support for the Diagrid CLI on Windows is experimental and we recommend installing it via WSL2 if available. The CLI on WSL2 requires https://wslutiliti.es/wslu/ to support deeper OS integration.
Using the CLI
The CLI is a static binary that should be executed from the command line. Help pages are available for you to navigate the command tree and see what flags are available on each command.
To login to Diagrid Catalyst:
diagrid login
The Diagrid CLI is compatible with both products: Catalyst and Conductor. If you have access to both products, you can choose which set of commands to use by specifying the product name with the command:
diagrid product use catalyst
To verify the current user identity and organization:
diagrid whoami