Skip to content

phantasos

Generate native, self-contained Python SDKs and command-line tools from OpenAPI specs. phantasos wraps OpenAPI Generator and adds generic spec preprocessing, codegen-bug patches, vendored components (auth, pagination, errors, a resource facade), and a complete project scaffold — so the output is a real, shippable package, not just models/ and api/.

Install

pip install -e .

Build an SDK and CLI

phantasos sdk build <product>    # SDK from products/<product>
phantasos cli build <product>    # matching CLI from the built SDK

Generate SDK documentation

Generated SDKs can ship their own documentation site — guides for authentication, pagination, and CRUD, plus an API reference auto-generated from the emitted docstrings. Opt in by adding a docs: block to the product's sdk.yml:

docs:
  showcase_resource: applications   # the resource whose CRUD drives the examples

phantasos sdk build <product> then scaffolds the site inside the generated SDK. Build it from the SDK directory:

cd ../my-product-sdk
uv run nox -s docs        # strict mkdocs build

See Authoring a product → docs: for the full field reference.

Where to next

  • Architecture — what phantasos is, its scope, and how the two-stage build works (with diagrams).
  • Authoring a product — create a products/<name>/ directory and configure a build, end to end.
  • CLI reference — the host commands and their flags.
  • Development — contribute to phantasos: branching, tests, CI/CD, and running the nox task runner.