Add automatic discovery of CLI modules from project dependencies

The CLI now scans the project root's dependencies and devDependencies
for packages with the cli-module role, loading them automatically.
Falls back to the built-in set with a deprecation warning when no
modules are found. Updated create-app templates and the monorepo root
to include all CLI modules as explicit devDependencies.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
This commit is contained in:
Patrik Oldsberg
2026-03-14 12:34:24 +01:00
parent 64a96d9d9f
commit d806b0cc9f
8 changed files with 191 additions and 22 deletions
+11
View File
@@ -125,6 +125,17 @@
},
"devDependencies": {
"@backstage/cli": "workspace:*",
"@backstage/cli-module-auth": "workspace:*",
"@backstage/cli-module-build": "workspace:*",
"@backstage/cli-module-config": "workspace:*",
"@backstage/cli-module-create-github-app": "workspace:*",
"@backstage/cli-module-info": "workspace:*",
"@backstage/cli-module-lint": "workspace:*",
"@backstage/cli-module-maintenance": "workspace:*",
"@backstage/cli-module-migrate": "workspace:*",
"@backstage/cli-module-new": "workspace:*",
"@backstage/cli-module-test-jest": "workspace:*",
"@backstage/cli-module-translations": "workspace:*",
"@backstage/codemods": "workspace:*",
"@backstage/create-app": "workspace:*",
"@backstage/e2e-test-utils": "workspace:*",