Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c10dbc3
add intent based clis to support action execution, other cmd, auth/ac…
yangcao77 Jul 13, 2026
d77e043
Merge branch 'main' of https://github.com/redhat-developer/rhdh-cli i…
yangcao77 Aug 4, 2026
1de9a53
update template
yangcao77 Aug 4, 2026
79e43b9
fix(RHIDP-14129): fix CI failures for intent-based CLI commands
yangcao77 Aug 5, 2026
aff9c29
refactor(RHIDP-14129): bundle intent-based CLI commands into one dire…
yangcao77 Aug 5, 2026
76b6602
fix(RHIDP-14129): resolve backstage-cli via PATH scan instead of which
yangcao77 Aug 5, 2026
a504d15
address review comments
yangcao77 Aug 13, 2026
af820dc
address review comments
yangcao77 Aug 19, 2026
be9adab
resolve conflict
yangcao77 Aug 26, 2026
0a5249e
input and output UX enhancement
yangcao77 Aug 27, 2026
49822e6
Merge branch 'main' of https://github.com/redhat-developer/rhdh-cli i…
yangcao77 Sep 9, 2026
fd308a4
address fullsend review comments, added the new clis in readme
yangcao77 Sep 9, 2026
1c58c3e
address review comments
yangcao77 Sep 10, 2026
1985cf0
resolve conflict
yangcao77 Sep 10, 2026
42a28f0
update doc
yangcao77 Sep 10, 2026
dcd84ff
template value flag should be optional
yangcao77 Sep 10, 2026
06fc2fb
add cli mapping table
yangcao77 Sep 10, 2026
9a96c02
fix ci failure
yangcao77 Sep 10, 2026
fb0dfe3
Merge branch 'main' of https://github.com/redhat-developer/rhdh-cli i…
yangcao77 Sep 10, 2026
4ab0ca4
address review comments
yangcao77 Sep 10, 2026
fa268f1
fix human readable output cannot parse too large json object
yangcao77 Sep 10, 2026
037f688
update CLI reference name
yangcao77 Sep 11, 2026
c9c96f0
address more docs command
yangcao77 Sep 11, 2026
647a270
chore: merge main and fix CLI action resolution
yangcao77 Sep 11, 2026
e52a73e
Merge branch 'main' into intent-based-cli
kadel Sep 14, 2026
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
28 changes: 19 additions & 9 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,31 @@

## Key Conventions

<!-- Add 2-3 conventions an agent couldn't discover by reading the code —
e.g. co-location rules, naming patterns, file organisation decisions. -->
- CLI command groups are co-located under `src/commands/intent-based-actions/`;
register new groups in that directory's `index.ts`.
- Keep human/JSON rendering in `format.ts`, Backstage action invocation in
`client.ts`, and command-level error presentation in `intent-errors.ts`.
- Add or update the co-located `*.test.ts` file when changing command behavior.

## Architecture

<!-- Add non-obvious architectural decisions or places where things live
unexpectedly — e.g. why a module lives where it does, key abstractions,
anything that would surprise a reader unfamiliar with the project. -->
- Intent-based commands invoke the bundled `@backstage/cli` through
`backstage-cli actions execute`; they do not call Backstage HTTP APIs
directly.
- `backstage-passthrough.ts` owns the lower-level `auth`, `actions`, and
`sources` commands, while the other files wrap action execution with
purpose-specific flags and output formatting.
- `docs list`, `docs get`, and `docs coverage` use the RHDH-only
`techdocs-mcp-extras` actions. `docs search` uses the standard
`search:query` action.

## Pattern References

<!-- Point agents to 3-5 real examples for the most common change types.
Example:
- New CLI command: follow the pattern in `src/commands/config/show.ts`
- New lib utility: see `src/lib/parallel.ts` as reference -->
- New command group: `src/commands/intent-based-actions/catalog.ts`
- Shared list/search command behavior: `src/commands/intent-based-actions/helpers.ts`
- Human/JSON output formatting: `src/commands/intent-based-actions/format.ts`
- Structured CLI errors: `src/commands/intent-based-actions/intent-errors.ts`
- Repeatable `key=value` and JSON input parsing: `src/commands/intent-based-actions/kv.ts`

## PR Conventions

Expand Down
64 changes: 64 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,70 @@ or when executing from the project root you can also use:
npx @red-hat-developer-hub/cli
```

## Commands

The CLI provides two categories of commands:

### Plugin Development Commands

- `plugin export`: Export a Backstage plugin as a dynamic plugin
- `plugin package`: Package dynamic plugins for distribution
- `plugin check-versions`: Verify plugin compatibility with RHDH versions

### Intent-Based RHDH Interaction Commands

High-level commands for interacting with RHDH instances:

- `auth`: Log in to, select, inspect, and manage authenticated RHDH instances
- `actions`: List and execute actions, and manage action-discovery sources
- `catalog`: List, get, validate, register, and unregister catalog entities
- `api`: List API entities and retrieve their OpenAPI/AsyncAPI/GraphQL specifications
- `search`: Search catalog, TechDocs, and template content
- `docs`: Search TechDocs and, on RHDH instances with optional plugins, list entities, retrieve pages, and view coverage
- `template`: List, execute, and dry-run software templates

**Quick Examples:**

```bash
# Authenticate with your RHDH instance
rhdh-cli auth login --backend-url https://rhdh.example.com

# List production components
rhdh-cli catalog list --kind Component --filter spec.lifecycle=production

# Search documentation
rhdh-cli search "deployment guide" --types '["techdocs"]'

# Get API specification
rhdh-cli api get-spec --name my-api

# Execute a template
rhdh-cli template execute \
--template-ref template:default/nodejs-service \
--value name=my-app \
--value owner=team-platform
```

All commands support `--help` for detailed usage and `--output json` for machine-readable output.

**📚 For complete documentation, setup guides, and examples, see:**

- **[Intent-Based CLI Documentation](docs/Intent-Based-CLI.md)** - Complete guide for RHDH interaction commands

### Optional TechDocs Features

**TechDocs content retrieval** (`docs list`, `docs get`, `docs coverage`, `docs build`):

- Requires **TechDocs MCP extras plugin** (`techdocs-mcp-extras`)
- See the [CLI documentation](docs/Intent-Based-CLI.md#rhdh-instance-configuration) for setup instructions

**TechDocs search** (`docs search`):

- Requires **TechDocs search backend module** (`search-backend-module-techdocs`)
- Standard Backstage plugin for indexing TechDocs content

All other commands work without these optional plugins.

### Bumping Backstage Dependencies

To update the `@backstage/*` dependencies to a new Backstage release:
Expand Down
Loading
Loading