Installation#

Planning Engine ships one package per language. With your license or trial you received a username and a password for one of two editions:

  • Full: the registry path contains plen.
  • Trial: the registry path contains plen-trial, and the package name has a trial suffix. The trial is the full engine with a limit on the number of tasks per project. The limit depends on the language and is listed in each section. The API is the same, so code written against the trial runs unchanged on the full edition.

Each account sees only its own edition: trial credentials can't install the full packages.

Language Full Trial Trial limit
WASM @dhx/plen-wasm @dhx/plen-wasm-trial 25 tasks
JavaScript @dhx/plen-js @dhx/plen-js-trial 100 tasks
.NET Plen.Core, Plen.Assign, Plen.Wire Plen.Core.Trial, Plen.Assign.Trial, Plen.Wire.Trial 50 tasks
Java com.dhtmlx:plen com.dhtmlx:plen-trial 50 tasks

WASM#

Requirements: Node.js 18 or later, or a modern browser with WebAssembly support. No runtime dependencies.

Edition Registry URL Package
Full https://git.dhtmlx.com/api/packages/plen/npm/ @dhx/plen-wasm
Trial https://git.dhtmlx.com/api/packages/plen-trial/npm/ @dhx/plen-wasm-trial

The trial rejects a project with more than 25 tasks with a validation error at path tasks, "limited build supports at most 25 tasks". Adding tasks past the limit with apply, preview or evaluate fails the same way.

Sign in to the registry#

Replace USERNAME and PASSWORD with your own, and keep the single quotes. For the trial, replace plen with plen-trial in both lines.

macOS and Linux:

npm config set @dhx:registry https://git.dhtmlx.com/api/packages/plen/npm/
npm config set //git.dhtmlx.com/api/packages/plen/npm/:_auth "$(printf '%s' 'USERNAME:PASSWORD' | base64 | tr -d '\n')"

Windows (PowerShell):

npm config set "@dhx:registry" https://git.dhtmlx.com/api/packages/plen/npm/
npm config set "//git.dhtmlx.com/api/packages/plen/npm/:_auth" ([Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes('USERNAME:PASSWORD')))

Check the result. It prints your username:

npm whoami --registry https://git.dhtmlx.com/api/packages/plen/npm/

npm, pnpm, Bun and Yarn 1 read this config. On a CI server, run the same commands in a setup step, with the username and password from secrets. If you already install DHTMLX packages from npm.dhtmlx.com, see Already using npm.dhtmlx.com.

Install the package#

Full edition:

npm install @dhx/plen-wasm

Trial edition, installed under the full name with an npm alias, so your imports don't change when you move to the full edition:

npm install @dhx/plen-wasm@npm:@dhx/plen-wasm-trial

With pnpm or Yarn, use pnpm add or yarn add with the same argument.

To move to the full edition, run the sign-in commands again with the plen registry and your full-edition username and password, then run npm install @dhx/plen-wasm@^1.

Next: WASM quick start for the raw exports, or JavaScript usage for the Project class.

JavaScript#

Requirements: Node.js 18 or later, or any modern browser with a bundler. No WebAssembly and no runtime dependencies. The package ships ES module and CommonJS builds with type declarations.

Edition Registry URL Package
Full https://git.dhtmlx.com/api/packages/plen/npm/ @dhx/plen-js
Trial https://git.dhtmlx.com/api/packages/plen-trial/npm/ @dhx/plen-js-trial

Sign in to the registry#

The JavaScript and WASM packages share the registry. If you've already signed in for WASM, skip this step.

Replace USERNAME and PASSWORD with your own, and keep the single quotes. For the trial, replace plen with plen-trial in both lines.

macOS and Linux:

npm config set @dhx:registry https://git.dhtmlx.com/api/packages/plen/npm/
npm config set //git.dhtmlx.com/api/packages/plen/npm/:_auth "$(printf '%s' 'USERNAME:PASSWORD' | base64 | tr -d '\n')"

Windows (PowerShell):

npm config set "@dhx:registry" https://git.dhtmlx.com/api/packages/plen/npm/
npm config set "//git.dhtmlx.com/api/packages/plen/npm/:_auth" ([Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes('USERNAME:PASSWORD')))

Check the result. It prints your username:

npm whoami --registry https://git.dhtmlx.com/api/packages/plen/npm/

npm, pnpm, Bun and Yarn 1 read this config. On a CI server, run the same commands in a setup step, with the username and password from secrets.

Install the package#

Full edition:

npm install @dhx/plen-js

Trial edition, installed under the full name with an npm alias, so your code imports "@dhx/plen-js" with either edition:

npm install @dhx/plen-js@npm:@dhx/plen-js-trial

With pnpm or Yarn, use pnpm add or yarn add with the same argument. You can also install @dhx/plen-js-trial under its own name and import from "@dhx/plen-js-trial".

To move to the full edition, run the sign-in commands again with the plen registry and your full-edition username and password, then run npm install @dhx/plen-js@^1. It replaces the alias in package.json with the real package, so your code doesn't change.

Already using npm.dhtmlx.com#

This applies to both the JavaScript and the WASM package. The @dhx scope can point to one registry only. If npm config get @dhx:registry prints https://npm.dhtmlx.com/, your projects already install DHTMLX packages such as @dhx/gantt from there. The sign-in commands above would move @dhx to git.dhtmlx.com and break those installs. Keep that setup: the Planning Engine packages are published there too. If you aren't signed in there yet:

npm login --scope=@dhx --registry=https://npm.dhtmlx.com/

If that login can't see the packages, contact DHTMLX support.

If the install fails#

  • E401 or Unable to authenticate: the username or password is wrong. Run the sign-in commands again and check with npm whoami --registry <registry URL>.
  • E404 Not Found: the registry and the package don't match. Trial credentials see only the -trial packages on the plen-trial registry. Check the registry with npm config get @dhx:registry.
  • Requests go to npm.dhtmlx.com or registry.npmjs.org: another @dhx:registry line wins. A project .npmrc overrides your user config.
  • The lockfile still points at the old registry after a change: the lockfile stores full tarball URLs. Delete node_modules and the package's lockfile entry, then install again.

Next: JavaScript quick start.

.NET#

Requirements: .NET 10. The packages target net10.0.

Edition Feed URL Packages
Full https://git.dhtmlx.com/api/packages/plen/nuget/index.json Plen.Core, Plen.Assign, Plen.Wire
Trial https://git.dhtmlx.com/api/packages/plen-trial/nuget/index.json Plen.Core.Trial, Plen.Assign.Trial, Plen.Wire.Trial

The trial rejects a project with more than 50 tasks. Only the package ids differ. The assemblies, namespaces and types are the same.

Configure access to the feed#

The examples use the full feed. For the trial, replace plen with plen-trial in the URL.

Option A: nuget.config in your solution (recommended). Create a nuget.config next to your solution file (.sln or .slnx), or next to the project if you have no solution:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
    <add key="dhtmlx" value="https://git.dhtmlx.com/api/packages/plen/nuget/index.json" />
  </packageSources>

  <packageSourceCredentials>
    <dhtmlx>
      <add key="Username" value="%DHTMLX_NUGET_USER%" />
      <add key="ClearTextPassword" value="%DHTMLX_NUGET_PASSWORD%" />
    </dhtmlx>
  </packageSourceCredentials>

  <!-- Optional: take Plen.* only from the DHTMLX feed. -->
  <packageSourceMapping>
    <packageSource key="nuget.org">
      <package pattern="*" />
    </packageSource>
    <packageSource key="dhtmlx">
      <package pattern="Plen.*" />
    </packageSource>
  </packageSourceMapping>
</configuration>

The username and password come from environment variables, so the file can go into source control. Set them in your shell, and as secrets on your CI server:

# bash / zsh
export DHTMLX_NUGET_USER=your-username
export DHTMLX_NUGET_PASSWORD=your-password
# PowerShell
$env:DHTMLX_NUGET_USER = "your-username"
$env:DHTMLX_NUGET_PASSWORD = "your-password"

Option B: register the feed once per machine:

dotnet nuget add source https://git.dhtmlx.com/api/packages/plen/nuget/index.json \
  --name dhtmlx \
  --username your-username \
  --password your-password \
  --store-password-in-clear-text

--store-password-in-clear-text is required on macOS and Linux. On Windows, leave it out and the password is stored encrypted.

Visual Studio and Rider read the same nuget.config. Without one, add the feed in the IDE's NuGet package sources and enter the username and password when asked.

Add the package#

dotnet add package Plen.Core          # trial: Plen.Core.Trial

Plen.Assign adds skill matching for auto-assignment. Plen.Wire reads and writes the JSON format, and pulls in Plen.Core and Plen.Assign. With the trial, use the .Trial id of each package.

To move to the full edition, change the feed URL from .../plen-trial/... to .../plen/..., use your full-edition credentials, and swap each .Trial package for its full id with the same version. The code doesn't change.

If the restore fails#

  • 401 Unauthorized: the username or password is wrong, or the variables aren't set in the shell that runs dotnet.
  • Unable to find package Plen.Core: the feed and the package don't match. Trial credentials see only the .Trial packages.
  • Changed credentials aren't picked up: run dotnet nuget locals http-cache --clear.

Next: .NET quick start.

Java#

Requirements: JDK 21 or newer. The library is a single JAR with no dependencies.

Edition Registry URL Coordinates
Full https://git.dhtmlx.com/api/packages/plen/maven com.dhtmlx:plen
Trial https://git.dhtmlx.com/api/packages/plen-trial/maven com.dhtmlx:plen-trial

The trial rejects a project with more than 50 tasks. Only the artifact id differs. The package org.dhtmlx.plen and its classes are the same.

The examples use the full edition. For the trial, replace plen with plen-trial in the registry URL and in the artifact id.

Maven#

Add the credentials to ~/.m2/settings.xml, not to the project. They come from environment variables:

<settings>
  <servers>
    <server>
      <id>dhtmlx</id>
      <username>${env.DHTMLX_MAVEN_USER}</username>
      <password>${env.DHTMLX_MAVEN_PASSWORD}</password>
    </server>
  </servers>
</settings>

In pom.xml, add the repository and the dependency. The repository id must match the server id in settings.xml:

<repositories>
  <repository>
    <id>dhtmlx</id>
    <url>https://git.dhtmlx.com/api/packages/plen/maven</url>
  </repository>
</repositories>

<dependencies>
  <dependency>
    <groupId>com.dhtmlx</groupId>
    <artifactId>plen</artifactId>
    <version>1.0.0</version>
  </dependency>
</dependencies>

Set the variables, then resolve the dependency:

export DHTMLX_MAVEN_USER=your-username
export DHTMLX_MAVEN_PASSWORD=your-password
mvn dependency:resolve

Gradle#

In settings.gradle.kts, add the registry:

dependencyResolutionManagement {
    repositories {
        mavenCentral()
        maven {
            name = "dhtmlx"
            url = uri("https://git.dhtmlx.com/api/packages/plen/maven")
            credentials(PasswordCredentials::class)
            // Optional: take com.dhtmlx only from this registry.
            content { includeGroup("com.dhtmlx") }
        }
    }
}

credentials(PasswordCredentials::class) reads the dhtmlxUsername and dhtmlxPassword properties. Put them in ~/.gradle/gradle.properties:

dhtmlxUsername=your-username
dhtmlxPassword=your-password

On CI, set them as the environment variables ORG_GRADLE_PROJECT_dhtmlxUsername and ORG_GRADLE_PROJECT_dhtmlxPassword. Then add the dependency in build.gradle.kts:

dependencies {
    implementation("com.dhtmlx:plen:1.0.0")
}

To move to the full edition, change the registry URL from .../plen-trial/maven to .../plen/maven, use your full-edition credentials, and change the artifact id from plen-trial to plen. Keep the version. The code doesn't change.

If the build can't resolve the library#

  • 401 Unauthorized: the username or password is wrong, or the variables aren't set in the shell that runs the build. With Maven, check that the server id in settings.xml matches the repository id in pom.xml.
  • Could not find com.dhtmlx:plen: the registry and the artifact don't match. Trial credentials see only plen-trial.
  • A failed download is cached: run mvn -U ..., or gradle --refresh-dependencies.

Next: Java quick start.