Skip to content

Vortechlabs/gaugeapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

GaugeAPI 🛠️

License: MIT TypeScript Platform

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.


✨ Features

  • 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.json or openapi.yaml file.
  • 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.).

🏗️ Architecture & File Structure

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

🚀 Getting Started

Prerequisites

Ensure you have Node.js (v20 or higher) installed on your machine.

Installation

  1. Clone the repository and navigate into the project directory:

    git clone https://github.com/yourusername/gauge-api.git
    cd gauge-api
  2. Install the required open-source dependencies:

    npm install

Running Locally

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/python

🛡️ Security Specification

GaugeAPI 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.ts to neutralize Code Injection threats.
  • Zero-Scope Credential Leakage: Generated SDKs enforce strict variable encapsulation (e.g., native #private fields in TypeScript and double-underscore self.__api_key mangling in Python) to prevent token scanning attacks from untrusted third-party dependencies.

🗺️ Roadmap & AI Ecosystem Integration

  • 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.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


Perubahan utama yang saya lakukan:

  1. Tata Letak: Merapikan spasi, baris baru, dan indentasi agar sesuai dengan standar Markdown.
  2. Blok Kode: Memperbaiki penulisan blok kode untuk bash dan text agar memiliki syntax highlighting yang benar.
  3. Tautan: Memperbaiki format tautan lisensi di bagian bawah ([LICENSE](LICENSE)).
  4. Konsistensi: Menyamakan format judul dan sub-judul.

Teks terakhir "itu anunkpeorong pootn ai" saya abaikan karena sepertinya bukan bagian dari README. Semoga membantu!

About

A high-precision, production-grade automated SDK generator that compiles OpenAPI specifications deterministically into safe, idiomatic SDKs—a zero-cost alternative to Stainless.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors