---
title: "Find packages that provide a command"
method: GET
path: "/api/v1/catalog/by-command"
tags: ["catalog"]
---

# Find packages that provide a command

`GET /api/v1/catalog/by-command`

Reverse lookup: which package(s) provide the given command name.

Required Query Parameters:
- **system**: The system architecture to search for (e.g., x86_64-linux)
- **name**: The command name to look up (e.g., readelf, rg, gcc-13)

Returns:
- **ByCommandResult**: Providers of the command and total count

Note: first pass returns a hardcoded mock so the OpenAPI contract can
freeze before the command_index table lands. No database query yet.

## Query parameters

- `system` 'aarch64-darwin' | 'aarch64-linux' | 'x86_64-darwin' | 'x86_64-linux' | 'invalid', required
- `name` string, required

## Response `200`

Packages that provide the given command

- ByCommandResult — Packages that provide a command name (reverse command→package lookup).
  - `command_name` string, required
  - `providers` CommandProvider[], required
    - `attr_path` string, required
    - `pname` string, required
    - `exact_name_match` boolean, required
    - `system` 'aarch64-darwin' | 'aarch64-linux' | 'x86_64-darwin' | 'x86_64-linux' | 'invalid', required
  - `total_count` integer, required
  - `listing_known` boolean, required

## Other responses

- `422` — The command name or system could not be processed

---

[API](https://skmtc.net/flox/apis/floxhub-catalog-server.md) · [All operations](https://skmtc.net/flox/apis/floxhub-catalog-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flox/floxhub-catalog-server/revisions/11bdb74527de/schema)
