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
Log in to your server with a keypair:
grok login <server>
The CLI opens your browser to approve the login and saves the server to config.yaml. This file is used for
publishing all your packages. See
Keypair authentication.
The developer key is deprecated. As a legacy fallback, copy it from Developer key... on your profile, then run
grok config and enter it. Datagrok 1.28 and later accept the developer key only from datagrok-tools 6.6.0 or later.
Next steps
Now you are ready to create your first package.
See also: