Setup the client

The JavaScript Studio command line client is an open source tool hosted on GitHub . It encrypts and uploads your script for analysis, fetches the report and pretty prints the results in your console.

Install the command line interface with npm :

npm install @studio/cli -g

This makes the studio command available. Try studio --help.

Configuration

Copy your personal configuration from https://javascript.studio/settings into your preferred config file location.

The CLI will try to load a configuration file in these locations:

  • .studio in the current directory
  • .studio in your home directory
  • $XDG_CONFIG_HOME/studio
  • .config/studio in your home directory

Make sure to never check this file into version control!

Environment variables

The access token and the encryption secret can also be specified via environment variables:

  • STUDIO_TOKEN: Your access token.
  • STUDIO_SECRET: Your encryption secret.

Environment variables take precedence over configured values. If STUDIO_TOKEN is defined in the environment, the .studio file is optional.

Available options

These properties can be configured:

  • token: Your JavaScript Studio access token (required).
  • secret: Your encryption secret. If provided, uploads are encrypted.
  • api: The API endpoint to use. Defaults to https://api.javascript.studio/beta.

Next: Using the client