# apigenie-generator search

Source: https://api-genie.dev/docs/reference/generator/search
Part of the reference of [apigenie-generator](https://api-genie.dev/docs/reference/generator.md).
Its other pages: [Conformance results](https://api-genie.dev/docs/reference/generator/conformance.md), [docs](https://api-genie.dev/docs/reference/generator/docs.md), [data](https://api-genie.dev/docs/reference/generator/data.md), [schema zod](https://api-genie.dev/docs/reference/generator/schema-zod.md), [client csharp](https://api-genie.dev/docs/reference/generator/client-csharp.md), [client elixir](https://api-genie.dev/docs/reference/generator/client-elixir.md), [client fetch](https://api-genie.dev/docs/reference/generator/client-fetch.md), [client go](https://api-genie.dev/docs/reference/generator/client-go.md), [client java](https://api-genie.dev/docs/reference/generator/client-java.md), [client python](https://api-genie.dev/docs/reference/generator/client-python.md), [client rust](https://api-genie.dev/docs/reference/generator/client-rust.md), [client swift](https://api-genie.dev/docs/reference/generator/client-swift.md), [server aspnet](https://api-genie.dev/docs/reference/generator/server-aspnet.md), [server axum](https://api-genie.dev/docs/reference/generator/server-axum.md), [server express](https://api-genie.dev/docs/reference/generator/server-express.md), [server fastapi](https://api-genie.dev/docs/reference/generator/server-fastapi.md), [server go](https://api-genie.dev/docs/reference/generator/server-go.md), [server hummingbird](https://api-genie.dev/docs/reference/generator/server-hummingbird.md), [server mcp](https://api-genie.dev/docs/reference/generator/server-mcp.md), [server orpc](https://api-genie.dev/docs/reference/generator/server-orpc.md), [server phoenix](https://api-genie.dev/docs/reference/generator/server-phoenix.md), [server spring](https://api-genie.dev/docs/reference/generator/server-spring.md), [server vapor](https://api-genie.dev/docs/reference/generator/server-vapor.md), [client csharp](https://api-genie.dev/docs/reference/generator/client-csharp-asyncapi.md), [client elixir](https://api-genie.dev/docs/reference/generator/client-elixir-asyncapi.md), [client go](https://api-genie.dev/docs/reference/generator/client-go-asyncapi.md), [client java](https://api-genie.dev/docs/reference/generator/client-java-asyncapi.md), [client kafkajs](https://api-genie.dev/docs/reference/generator/client-kafkajs.md), [client python](https://api-genie.dev/docs/reference/generator/client-python-asyncapi.md), [client ws](https://api-genie.dev/docs/reference/generator/client-ws.md), [server aspnet](https://api-genie.dev/docs/reference/generator/server-aspnet-asyncapi.md), [server faststream](https://api-genie.dev/docs/reference/generator/server-faststream.md), [server go](https://api-genie.dev/docs/reference/generator/server-go-asyncapi.md), [server kafkajs](https://api-genie.dev/docs/reference/generator/server-kafkajs.md), [server phoenix](https://api-genie.dev/docs/reference/generator/server-phoenix-asyncapi.md), [server spring](https://api-genie.dev/docs/reference/generator/server-spring-asyncapi.md), [server ws](https://api-genie.dev/docs/reference/generator/server-ws.md), [client elixir](https://api-genie.dev/docs/reference/generator/client-elixir-protobuf.md), [server elixir-grpc](https://api-genie.dev/docs/reference/generator/server-elixir-grpc.md), [server absinthe](https://api-genie.dev/docs/reference/generator/server-absinthe.md).

Since 0.13.0, `apigenie-generator search` prints the generators for a language, framework or
standard, from the index of generators that the website publishes. The index has room for
generators shipped as plugins. No plugin is published yet, and this release of
`apigenie-generator` can't run one.

## Usage

```sh
apigenie-generator search [--offline] [--json] WORDS...
```

## Description

The command prints the generators that match every word. A word matches a word of a generator's
command, languages, standards, keywords, plugin name or summary, ignoring case. A word of 3
characters or more that is no word of the index also matches the start of a word: `typesc` finds
TypeScript. A word of the index matches whole words only: `java` finds Java and not JavaScript. A
word found in the command, a language, a standard, a keyword or the plugin name ranks above one
found in the summary or by its start. Ties keep the order of the index.

```sh
apigenie-generator search java spring
```

```text
client java  (built in, Tier 1 (OpenAPI), Tier 2 (AsyncAPI))
    Java client from OpenAPI on Spring's RestClient, RestTemplate, OpenFeign or HTTP interfaces; Java Kafka client from AsyncAPI.
    Run: apigenie-generator client java --help
server spring  (built in, Tier 1 (OpenAPI), Tier 2 (AsyncAPI))
    Spring Boot server from OpenAPI; Spring Boot Kafka application from AsyncAPI.
    Run: apigenie-generator server spring --help
Searched the index at https://api-genie.dev/plugins/generators.json (updated 2026-11-09).
```

Each generator gets its command, where it comes from, its
[support tier](/docs/reference/generator/conformance) per standard when the index has tiers
(`Tier 1 (OpenAPI)`, `Tier 2, experimental (OpenAPI)`, `experimental (OpenAPI)`), its summary, and
what to do next. The `plugin` row describes an entry the index can hold; the published index has
none yet.

| Shown as | Meaning | Next line |
| --- | --- | --- |
| `built in` | This binary has the command. | `Run: apigenie-generator COMMAND --help` |
| `built into a newer release` | A later release of `apigenie-generator` has it. | `Upgrade apigenie-generator: https://api-genie.dev/downloads` |
| `plugin NAME VERSION` | A plugin ships it. | `Install: LINE`, or `Install: see HOMEPAGE` when the index gives only a homepage |

When no generator matches every word, the command says so and lists up to five generators that
match some of them, those matching more words first.

## Where the index comes from

The website publishes the index at `https://api-genie.dev/plugins/generators.json`. The command
reads, in this order:

1. **The website's index**, unless `--offline` is given. The command waits up to 3 seconds for the
   connection, and gives up when the answer stops for 10 seconds. It keeps a copy of the index it
   read in the cache directory: `$XDG_CACHE_HOME/apigenie/generators.json` or
   `~/.cache/apigenie/generators.json` on Linux and other Unix systems,
   `~/Library/Caches/apigenie/generators.json` on macOS, `%LOCALAPPDATA%\apigenie\generators.json`
   on Windows.
2. **The copy kept by the last search that read the website's index**, when the website's index
   can't be used. That is the case when the connection fails or times out, the status isn't 200
   after up to 3 redirects (never from `https` to `http`), the answer is over 4 MB, or it isn't an
   index of format 1: one with a string that holds control characters or isn't UTF-8 included.
3. **The index of this release**, built into the binary: its built-in generators, without the
   plugins published since and without tiers.

Whichever index is searched, the built-in generators it lacks are added from the index of this
release, so a copy written by an older release still finds them. A generator this binary has is
shown as `built in`, even when the index lists it as a plugin.

The waits are per address connected to, and name resolution has none of its own, so a slow
network can make a search take longer; it never makes it fail. The command doesn't use a proxy;
behind one, it searches the copy or the index of the release. The
last line names the index searched and, when the website's index couldn't be used, why:

| Index searched | Last line |
| --- | --- |
| The website's | `Searched the index at URL (updated DAY).` |
| The copy, with `--offline` | `Searched the copy of the index kept by the last search (updated DAY).` |
| The copy, after a failure | `Searched the copy of the index kept by the last search (updated DAY): URL can't be read (REASON).` |
| The release's, with `--offline` | `Searched the index of this release; plugins published since aren't in it.` |
| The release's, after a failure | `Searched the index of this release, as URL can't be read (REASON); plugins published since aren't in it.` |

## Options

| Option | Description |
| --- | --- |
| `--offline` | Doesn't connect to the website: searches the copy of the index kept by the last search, or the index of this release. |
| `--json` | Prints the [status of the run](/docs/reference/cli#json-output) as one JSON document, with the text of the search in its `output`. There is no structured list of the matches. |

## Configuration

The command reads no configuration file. `APIGENIE_GENERATOR_INDEX_URL` replaces the address of the
website's index, for a mirror; a blank value is ignored.

## Exit status

| Status | Meaning |
| --- | --- |
| 0 | The search ran, whether or not a generator matched, from whichever index was searched. |
| 2 | No words were given (`search` alone, or only blank words), or the command line can't be parsed. Nothing is searched. |

See the [exit statuses of `apigenie-generator`](/docs/reference/generator#exit-status).
