Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ coverage
.vscode
.eslintrc.js
.yarn
templates/plugin-new
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ All notable changes to `@red-hat-developer-hub/cli` are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 2.0.7 - 2026-09-14

### Added

- **`plugin new`:** Add `rhdh-cli plugin new <name>` to create standalone, version-pinned frontend, backend, and catalog processor module dynamic plugin projects ([RHIDP-16671](https://redhat.atlassian.net/browse/RHIDP-16671), [RHIDP-16668](https://redhat.atlassian.net/browse/RHIDP-16668), [#202](https://github.com/redhat-developer/rhdh-cli/pull/202)). Generated projects use the selected RHDH release's Backstage manifest and Yarn 4 configuration.

### Fixed

- Update the RHDH 2.1.0, `main`, and `next` compatibility mappings to Backstage 1.54.6.
- Fall back to the requested RHDH version when remote metadata returns an invalid version value.

## 2.0.6 - 2026-09-11

### Added
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ Use `--dry-run` to preview dependency changes without writing files and `--skip-

For air-gapped environments, provide a local Backstage release manifest with `--manifest-file` and set `RHDH_OFFLINE=true` to skip the RHDH GitHub metadata lookup.

## Creating a Plugin

Use `plugin new` to create a standalone, version-pinned dynamic plugin project:

```bash
rhdh-cli plugin new my-plugin --type frontend --rhdh-version 2.1.0
```

Supported types are `frontend` (a New Frontend System, or NFS, page), `backend` (a minimal new-backend-system plugin), and `catalog-processor-module` (a catalog processor module). Use `--name <plugin-name>` as an alternative to the positional name, and `--output <directory>` to select a destination. The generated project uses the target RHDH release's Backstage manifest for every `@backstage/*` dependency. For air-gapped environments, provide `--manifest-file` and set `RHDH_OFFLINE=true`. Export and package generated plugins with `npx @red-hat-developer-hub/cli`, or through RHDH Dynamic Plugin Factory, rather than adding the CLI as a project dependency.

## Development

### Contributing
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@red-hat-developer-hub/cli",
"description": "CLI for developing Backstage plugins and apps",
"version": "2.0.6",
"version": "2.0.7",
"publishConfig": {
"access": "public"
},
Expand Down
19 changes: 19 additions & 0 deletions src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,25 @@ export function registerPluginCommand(program: Command) {
)
.option('--json', 'Output upgrade results as JSON')
.action(lazy(() => import('./upgrade').then(m => m.command)));

command
Comment thread
gashcrumb marked this conversation as resolved.
.command('new [name]')
.description('Create a standalone RHDH dynamic plugin project')
.option('--name <plugin-name>', 'Plugin name (alternative to the argument)')
.option(
'--type <frontend|backend|catalog-processor-module>',
'Plugin type to create',
)
.option('--rhdh-version <version>', 'Target RHDH version')
.option(
'--output <directory>',
'Output directory (defaults to the plugin name)',
)
.option(
'--manifest-file <path>',
'Path to a local Backstage release manifest JSON file',
)
.action(lazy(() => import('./new').then(m => m.command)));
}

export function registerCommands(program: Command) {
Expand Down
Loading
Loading