Skip to main content

Search Module

The search module (@backstage/cli-module-search) provides intent-based commands for searching across Backstage content, such as docs search "my service".

Prerequisites​

Before using search commands you must authenticate with a Backstage instance using auth login and register the search plugin source using actions sources add search.

All commands support --output human|json and --instance <name> to target a specific authenticated instance. Unknown flags are rejected.

Human output shows how many results were shown and, when more are available, prints the --cursor value to continue from. JSON output contains a single page and nextPageCursor.

Search across all content types (catalog entities, TechDocs, templates).

Usage: backstage-cli search <term> [options]

Options:
--type <type> Document type (repeatable)
--filter <key=value> Query filter (repeatable)
--limit <number> Results per page
--cursor <cursor> Continue from the cursor of a previous page
--output <format> Output format: human (default), json
--instance <name> Instance name

Repeat --type or --filter to add more.

Examples​

yarn backstage-cli search "deployment guide"
yarn backstage-cli search "auth" --type techdocs --type software-catalog
yarn backstage-cli search "service" --filter kind=Component --filter lifecycle=production

Search TechDocs content specifically.

Usage: backstage-cli docs search <term> [options]

Options:
--limit <number> Results per page
--cursor <cursor> Continue from the cursor of a previous page
--output <format> Output format: human (default), json
--instance <name> Instance name

Only TechDocs content is searched.

Examples​

yarn backstage-cli docs search "getting started"