Forge
Concepts

Plugins

Extend Forge with plugins to add language and tooling support

Plugins

Forge uses an Nx plugin architecture to provide language and tooling support. Plugins automatically detect project files, infer build targets, and configure tasks — so you don't have to.

How Plugins Work

When you register a plugin in nx.json, it scans your workspace for specific files (e.g. package.json, pom.xml, Dockerfile) and automatically configures the appropriate build, test, and release targets for each project.

{
  "plugins": [
    {
      "plugin": "@bjb-forge/nx-js-project/nx-plugin"
    },
    {
      "plugin": "@bjb-forge/nx-docker-project/nx-plugin"
    }
  ]
}

Plugins can be scoped to specific projects using include:

{
  "plugin": "@bjb-forge/nx-js-project/nx-plugin",
  "include": ["jbar-app/frontend/*"]
}

And configured with options:

{
  "plugin": "@bjb-forge/nx-devcloud-legacy-project/nx-plugin",
  "options": {
    "devcloudProgramName": "sda"
  }
}

Available Plugins

Language & Framework

PluginDetectsDescription
nx-js-projectpackage.jsonJavaScript and TypeScript projects
nx-java-projectpom.xmlJava projects
nx-spring-boot-projectpom.xmlSpring Boot services
nx-react-projectpackage.jsonReact applications
nx-openapi-projectopenapi.yamlOpenAPI specifications

Build & Deploy

PluginDetectsDescription
nx-docker-projectDockerfileDocker container builds
nx-jib-projectjib.yamlJava container builds with Jib
nx-helm-projectChart.yamlHelm chart packaging and publishing
nx-maven-devkitpom.xmlMaven build utilities
nx-vite-devkitvite.config.*Vite bundler support

CI/CD & Quality

PluginDescription
nx-gitlab-projectGitLab CI/CD integration and coverage reporting
nx-conformance-projectWorkspace conformance rules
nx-playwright-projectEnd-to-end testing with Playwright
nx-devcloud-legacy-projectDevCloud platform integration

Devkit vs Project

Forge plugins follow a two-package pattern:

  • Devkit (nx-*-devkit) — reusable utility functions and file detection logic. Can be imported by other plugins or custom code.
  • Project (nx-*-project) — the full Nx plugin that registers in nx.json. Uses the devkit under the hood to provide generators, executors, and automatic project configuration.
nx-docker-devkit       →  utilities (createDockerNodes, Dockerfile parsing)
nx-docker-project      →  Nx plugin (generators, executors, nx.json registration)

Building Custom Plugins

Forge provides nx-plugin-devkit as the foundation for building your own plugins. It offers:

  • buildNxPlugin() — creates an Nx plugin with file discovery, caching, and option normalization
  • buildInitGeneratorFn() — scaffolds init generators that register your plugin
  • SubCreateNodes — composable pattern for detecting files and creating build targets

See the CLI Reference for generator commands to scaffold new plugins.

On this page