Dependency Discovery#

APX provides two commands for discovering APIs released to the canonical repository: apx search for finding APIs by keyword or filter, and apx show for viewing full identity and release details of a specific API.

Both commands accept a local file path or a remote URL as the catalog source, so you can query the canonical catalog without cloning the repo.

Configuring Remote Catalog Access#

Add catalog_url to your apx.yaml to avoid passing --catalog every time:

org: acme
repo: myapp
catalog_url: https://raw.githubusercontent.com/acme/apis/main/catalog/catalog.yaml

With this setting, apx search and apx show automatically fetch the remote catalog. You can still override with --catalog for local or alternate sources.


apx show#

Display the full identity, derived coordinates, and catalog release data for a specific API.

Usage#

apx show <api-id> [flags]

Examples#

# Show full details for an API
apx show proto/payments/ledger/v1

# Show with explicit source repo
apx show --source-repo github.com/acme/apis proto/payments/ledger/v1

# JSON output
apx --json show proto/payments/ledger/v1

Flags#

Flag

Description

--source-repo

Source repository (defaults to github.com/<org>/<repo> from apx.yaml)

--catalog

Path or URL to catalog.yaml (default: catalog_url from apx.yaml, then catalog/catalog.yaml)

Output#

apx show merges two data sources:

  1. Derived fields computed from the API ID — Go module path, import path, tag pattern, source path

  2. Catalog fields read from catalog.yaml — latest stable/prerelease versions, lifecycle, owners, tags

Example output:

API:        proto/payments/ledger/v1
Format:     proto
Domain:     payments
Name:       ledger
Line:       v1
Lifecycle:  stable
Source:     github.com/acme/apis/proto/payments/ledger/v1

Compatibility
  Level:    full
  Promise:  Backward compatible within the v1 line
  Breaking: Not allowed (use v2 line for breaking changes)
  Use:      Recommended for production

Latest stable:      v1.2.3
Latest prerelease:  v1.3.0-beta.1

Go module:  github.com/acme/apis/proto/payments/ledger
Go import:  github.com/acme/apis/proto/payments/ledger/v1

If no catalog data is found, only derived fields are shown and a warning suggests running apx catalog generate.

Workflow#

A typical discovery workflow:

# 1. Search for APIs related to your domain
apx search payments

# 2. Inspect a specific API
apx show proto/payments/ledger/v1

# 3. Add as a dependency
apx add proto/payments/ledger/v1@v1.2.3

# 4. Generate client code
apx gen go

Next Steps#