# Install swagger-codegen with Homebrew, MacPorts, Nix

Generate clients, server stubs, and docs from an OpenAPI spec. Version 3.0.81 via Homebrew; verified 2026-05-18.

## Install

```sh
sudo av install brew:swagger-codegen
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install swagger-codegen
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install swagger-codegen
```

  Evidence: MacPorts ports tree: devel/swagger-codegen/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#swagger-codegen
```

  Evidence: nixpkgs package indexes: pkgs/by-name/sw/swagger-codegen/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:swagger-codegen
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/swagger-codegen>
- **Version:** 3.0.81
- **Source summary:** Generate clients, server stubs, and docs from an OpenAPI spec
- **Homepage:** <https://swagger.io/tools/swagger-codegen/>
- **Repository:** <https://github.com/swagger-api/swagger-codegen>
- **Upstream docs:** <https://github.com/swagger-api/swagger-codegen#readme>
- **License:** Apache-2.0
- **Source archive:** <https://github.com/swagger-api/swagger-codegen/archive/refs/tags/v3.0.81.tar.gz>
- **Last updated:** 2026-05-18T14:26:15Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- swagger-codegen (cli)
- swagger-codegen (alias)

## Dependencies

- openjdk

## Build dependencies

- maven

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 3.0.81
- Package-manager updated: 2026-05-18
- Local data: ok
- Upstream repository: https://github.com/swagger-api/swagger-codegen
- Upstream latest detected: v3.0.81 (current)
## Project history and usage

Swagger Codegen is the Swagger/OpenAPI project's command-line code generator for API clients, server stubs, and documentation. The Homebrew `swagger-codegen` formula tracks the modern 3.x line, which adds OpenAPI 3.0 support while sharing the long-running upstream repository.

### Project history

The swagger-api/swagger-codegen repository was created on GitHub in July 2011. Official Swagger documentation describes Swagger Codegen as a project that generates API client libraries, server stubs, and documentation automatically from an OpenAPI Description.

### Adoption history

Swagger Codegen became widely packaged because it is a single Java CLI that can generate code for many languages and frameworks. The official README lists client generators for languages including Java, Go, Python, Ruby, PHP, Swift, TypeScript, and many others, plus server stubs and documentation outputs.

### How it is used

The common CLI pattern is to run the codegen jar with `generate`, pass an input spec with `-i`, select a target language with `-l`, and choose an output directory with `-o`. Official docs also describe querying generator capabilities and integrating generation into Maven, Gradle, Docker, GitHub, and CI workflows.

### Why package nerds care

For package-manager users, Swagger Codegen is important because it converts API descriptions into language-specific source trees without requiring each language ecosystem to maintain its own generator. It is also a classic example of a large Java CLI distributed through system package managers, Maven artifacts, Docker, and release jars.

### Timeline

- 2011: GitHub repository created.
- 2014: v2.0.13 appears in GitHub releases.
- 2018: v3.0.0 released with the 3.x line.
- 2025: Official docs list 3.0.71 as a stable 3.x release with OpenAPI 3.0 compatibility.
- 2026: GitHub releases list later 3.x releases during research.

### Related projects

- The official docs tie Swagger Codegen to the OpenAPI Specification and Swagger tooling. The README also points to Swagger online generators, a validator, and workflow integrations.

### Sources

- <https://api.github.com/repos/swagger-api/swagger-codegen>
- <https://api.github.com/repos/swagger-api/swagger-codegen/releases>
- <https://github.com/swagger-api/swagger-codegen#readme>
- <https://swagger.io/docs/open-source-tools/swagger-codegen/codegen-v3/about>


## Security Notes

No matching local secret-handling manifest was found for swagger-codegen. Nucleus package metadata is still published here so future coverage has a stable package URL.


## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** swagger-codegen
- **Aliases:** swagger-codegen@3
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Nix - swagger-codegen: normalized package name match | nixpkgs package indexes: pkgs/by-name/sw/swagger-codegen/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - swagger-codegen: normalized package name match | MacPorts ports tree: devel/swagger-codegen/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [openjdk](https://www.automicvault.com/pkg/brew/openjdk/) - Runtime dependency declared by Homebrew.
- [maven](https://www.automicvault.com/pkg/brew/maven/) - Build dependency declared by Homebrew.
- [create-api](https://www.automicvault.com/pkg/brew/create-api/) - Shares av.db curated category or tags: api-client, cli, code-generation, developer-tools, openapi.
- [kiota](https://www.automicvault.com/pkg/brew/kiota/) - Shares av.db curated category or tags: api, cli, code-generation, developer-tools, openapi.
- [openapi-generator](https://www.automicvault.com/pkg/brew/openapi-generator/) - Shares av.db curated category or tags: cli, code-generation, developer-tools, openapi.
- [swag](https://www.automicvault.com/pkg/brew/swag/) - Shares av.db curated category or tags: api, cli, developer-tools, openapi, swagger.
- [swagger2markup-cli](https://www.automicvault.com/pkg/brew/swagger2markup-cli/) - Shares av.db curated category or tags: api, cli, developer-tools, openapi, swagger.
- [tfplugingen-openapi](https://www.automicvault.com/pkg/brew/tfplugingen-openapi/) - Shares av.db curated category or tags: cli, code-generation, developer-tools, openapi.
- [vacuum](https://www.automicvault.com/pkg/brew/vacuum/) - Shares av.db curated category or tags: api, cli, developer-tools, openapi, swagger.
- [ain](https://www.automicvault.com/pkg/brew/ain/) - Shares av.db curated category or tags: api, api-client, cli, developer-tools.

## Combined YAML source

View the package source record on GitHub. [combined/swagger-codegen.yml](https://github.com/automic-vault/db/blob/main/combined/swagger-codegen.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
