Installing / Integrating CLI

Get the Supernova CLI ready for development.

CLI is npm dependent, and it can run anywhere where npm is installed. You need at least Node 16 to be able to run the CLI. To install, simply run:


                                                        
                                                        
                                                            npm install --save-dev @supernovaio/supernova-sdk
                                                        yarn add --dev @supernovaio/cli
                                                        
                                                            

in your target environment, or include CLI dependency in your CI/CD pipelines, like this:


                                                        
                                                        
                                                            {
                                                          "dependencies": {
                                                              "@supernovaio/cli": "latest"
                                                          }
                                                        }
                                                        
                                                            

Installing CLI globally

You can also install the CLI as global package, and make the CLI globally available under > supernova command to your command line. To install the CLI globally, just run the following command:


                                                        
                                                        
                                                            npm install -g @supernovaio/cli
                                                        yarn global add @supernovaio/cli
                                                        
                                                            

You can now test that everything was properly set up by running the supernova command:


                                                        
                                                        
                                                            ~ % supernova --version
                                                        > @supernovaio/cli/1.x.x ...
                                                        
                                                            

Node 16 or newer installed globally is required to run the Supernova CLI.

Updating CLI globally

You can update globally installed CLI by running npm update command on the package:


                                                        
                                                        
                                                            npm update -g @supernovaio/cli
                                                        yarn global upgrade @supernovaio/cli
                                                        
                                                            

This will upgrade the CLI to the latest version and make it immediately last default used version.

Obtaining key information

You'll need an API key and design system ID for most of the commands you will run. Here is how to obtain them.

Obtaining an API key

Supernova CLI requires an API key to authenticate. You can obtain an API key from your Supernova profile. We strongly recommend keeping your API key in secure storage, either through use of environment variables or a key vault if you are using services like GitHub (actions). Never share your API key with anyone!

Use your newly obtained key as the value for the --apiKey attribute for most CLI commands.

null

Obtaining design system ID

You'll also need to obtainthe ID of the Supernova design system you want to target. Go to your design system and anywhere, in any section, obtain the ID from the URL of your browser. Make sure you have selected the correct design system before copying the ID.

Use your newly obtained key as the value for the --designSystemId attribute for most CLI commands.

null

Migrating from 0.x to 1.x

We officially released a stable, production-ready version of the CLI in November 2023. As we worked with the community closely throughout the duration of the development and stabilized the CLI interface over time, there are no changes necessary.

We strongly suggest you move to 1.0.0+ version as soon as possible, as it contains lot of improvements and some new features that everyone will appreciate.