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.
- Install Node.js 22 or later (npm comes with it)
- Install datagrok-tools:
npm install -g datagrok-tools - If you work inside the public repository, run
grok setuponce at the repository root. It enables pnpm and installs dependencies for every package. See Build system. A standalone package created withgrok createusesnpm installand needs nothing else. The bundler and TypeScript come with the package's@datagrok/build-configdependency.
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
-
Retrieve your developer key by opening your user profile, clicking on
Developer keyand copying it to the clipboard -
Configure your environment with the following command:
grok configEnter 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: