Skip to main content

Environment setup

This article explains how to set up a development environment for developing Datagrok packages.

Tools

NOTE: To avoid permission issues when installing packages globally via -g, use a version manager to install both Node.js and npm following the instructions .

NOTE: On macOS and Unix systems, you may also need to use sudo at the beginning of the installation command and enter the root password if prompted.

  1. Install Node.js 22 or later (npm comes with it)
  2. Install datagrok-tools: npm install -g datagrok-tools
  3. If you work inside the public repository, run grok setup once at the repository root. It enables pnpm and installs dependencies for every package. See Build system. A standalone package created with grok create uses npm install and needs nothing else. The bundler and TypeScript come with the package's @datagrok/build-config dependency.

NOTE: The Node.js version from Snap can produce issues with the datagrok tools installation. We recommend avoiding Snap and following the installation instructions provided above.

Configuration

  1. Retrieve your developer key by opening your user profile, clicking on Developer key and copying it to the clipboard

  2. Configure your environment with the following command:

    grok config

    Enter developer keys and set the default server. Your credentials will be stored locally in config.yaml. Once created, this file will be used for publishing all your packages. Administrators can manage existing keys and grant or revoke privileges.

Next steps

Now you are ready to create your first package.

See also: