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
| Plugin | Detects | Description |
|---|---|---|
nx-js-project | package.json | JavaScript and TypeScript projects |
nx-java-project | pom.xml | Java projects |
nx-spring-boot-project | pom.xml | Spring Boot services |
nx-react-project | package.json | React applications |
nx-openapi-project | openapi.yaml | OpenAPI specifications |
Build & Deploy
| Plugin | Detects | Description |
|---|---|---|
nx-docker-project | Dockerfile | Docker container builds |
nx-jib-project | jib.yaml | Java container builds with Jib |
nx-helm-project | Chart.yaml | Helm chart packaging and publishing |
nx-maven-devkit | pom.xml | Maven build utilities |
nx-vite-devkit | vite.config.* | Vite bundler support |
CI/CD & Quality
| Plugin | Description |
|---|---|
nx-gitlab-project | GitLab CI/CD integration and coverage reporting |
nx-conformance-project | Workspace conformance rules |
nx-playwright-project | End-to-end testing with Playwright |
nx-devcloud-legacy-project | DevCloud 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 innx.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 normalizationbuildInitGeneratorFn()— scaffolds init generators that register your pluginSubCreateNodes— composable pattern for detecting files and creating build targets
See the CLI Reference for generator commands to scaffold new plugins.