GaugeAPI is a high-precision, production-grade automated SDK generator designed as a lightweight, zero-cost alternative to Stainless. It parses OpenAPI specifications (OAS) and compiles them deterministically into bulletproof, type-safe, and idiomatic SDKs for multiple programming languages.
Built entirely using a Deterministic Compilation Architecture, GaugeAPI eliminates the risks of AI hallucinations and the recurring costs of third-party LLM APIs, delivering 100% accurate code generation in milliseconds.
- Zero-Cost Operation: No paid AI APIs required. Runs entirely locally or via free CI/CD environments (like GitHub Actions).
- Multi-Language Generation: Generates idiomatic SDKs for Python, TypeScript, and Go from a single
openapi.jsonoropenapi.yamlfile. - Strict Code Sanitization: Advanced security layer guarding against Code Injection and malicious schema inputs.
- Production-Ready DX (Developer Experience):
- Full IDE Autocomplete and IntelliSense support via precise type mapping.
- Automated Exponential Backoff Retry logic embedded into the generated HTTP base clients.
- Granular, human-readable error handling structures (
APIError,RateLimitError, etc.).
The project follows a decoupled, pipelines-based data architecture:
gauge-api/
├── src/
│ ├── index.ts # CLI Entry point
│ ├── cli.ts # Command Line Interface handler
│ ├── core/
│ │ ├── parser.ts # OpenAPI Validation & Resolution
│ │ ├── transformer.ts # Type mapping & schema translation
│ │ ├── generator.ts # Handlebars template rendering engine
│ │ └── security.ts # Input sanitization & security auditing
│ ├── templates/ # Native language code layout blueprints
│ │ ├── python/
│ │ ├── typescript/
│ │ └── go/
│ └── languages/ # Language-specific compilation settings
└── tests/ # Automated testing suites
Ensure you have Node.js (v20 or higher) installed on your machine.
-
Clone the repository and navigate into the project directory:
git clone https://github.com/yourusername/gauge-api.git cd gauge-api -
Install the required open-source dependencies:
npm install
To generate an SDK from an example OpenAPI specification file, run the following command:
npm start -- --input ./examples/petstore-openapi.json --language python --output ./examples/generated/pythonGaugeAPI is architected with a Security-First mindset to prevent supply chain vulnerabilities:
- AST & String Escaping: All schema details, method parameters, and descriptions are heavily sanitized inside
src/core/security.tsto neutralize Code Injection threats. - Zero-Scope Credential Leakage: Generated SDKs enforce strict variable encapsulation (e.g., native
#privatefields in TypeScript and double-underscoreself.__api_keymangling in Python) to prevent token scanning attacks from untrusted third-party dependencies.
- Core Engine stabilization for Python and TypeScript output.
- Automated package manager deployment (
npm publish&twine upload) integration. - Model Context Protocol (MCP) Server Generation: Automate the creation of MCP servers from OpenAPI specs so that AI agents (like Anthropic Claude or OpenAI Assistants) can securely and directly interact with web ecosystems.
This project is licensed under the MIT License - see the LICENSE file for details.
Perubahan utama yang saya lakukan:
- Tata Letak: Merapikan spasi, baris baru, dan indentasi agar sesuai dengan standar Markdown.
- Blok Kode: Memperbaiki penulisan blok kode untuk
bashdantextagar memiliki syntax highlighting yang benar. - Tautan: Memperbaiki format tautan lisensi di bagian bawah (
[LICENSE](LICENSE)). - Konsistensi: Menyamakan format judul dan sub-judul.
Teks terakhir "itu anunkpeorong pootn ai" saya abaikan karena sepertinya bukan bagian dari README. Semoga membantu!