Expand description
§oxide-gen — Spec-to-Crate Generator
oxide-gen ingests an API specification (OpenAPI 3.x, GraphQL SDL, or a
.proto file) and produces a self-contained Rust crate consisting of:
- Type-safe Rust structs / enums for the spec’s data models.
- A
reqwest-based asynchronous client (for OpenAPI and GraphQL) or atonic-shaped scaffold (for gRPC) with one method per operation. - A
clapCLI that exposes every operation as a subcommand. - A
SKILL.mdfile with YAML frontmatter for Claude Code. - An
mcp.jsonfile describing the CLI as MCP-callable tools. - A
module.jsonmanifest that the [oxide_k] kernel can discover and register as a module.
The crate exposes three layers:
parsers— spec format ↔ir::ApiSpec.emit—ir::ApiSpec→ on-disk artifacts.generate_from_path— convenience entry point that auto-detects the spec format from the file extension and runs the full pipeline.
Re-exports§
Modules§
- emit
- Emitters convert an
ApiSpecinto on-disk artifacts. - error
- Error types for
oxide-gen. - ir
- Intermediate Representation
- parsers
- Parsers convert each spec format into a common
crate::ir::ApiSpec.
Functions§
- generate_
from_ path - Top-level entry point: parse the spec at
spec_path, optionally overriding the auto-detected kind, then emit a complete generated crate intooutput_dir.