reverse-api-engineer  by kalil0321

Automated API client generation from browser traffic

Created 2 months ago
423 stars

Top 69.7% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a CLI tool that automates the reverse engineering of APIs by capturing browser traffic and generating production-ready Python API clients using AI. It targets developers and researchers seeking to quickly obtain API code without manual effort, streamlining the process from browsing to client generation.

How It Works

The tool employs Playwright for browser automation, including a stealth mode for realistic browsing, and captures network traffic in HAR format. It then utilizes Claude 4.5 to analyze this traffic, generating clean Python code complete with error handling, type hints, and documentation. Users can choose between manual interaction, re-processing existing captures (engineer mode), or fully autonomous AI agent-driven interaction.

Quick Start & Requirements

  • Installation:
    • Basic: uv tool install reverse-api-engineer or pip install reverse-api-engineer.
    • Agent mode: uv tool install 'reverse-api-engineer[agent]' and install browser-use from its specific Git commit.
  • Prerequisites: Python 3.11+, Playwright browsers (playwright install chromium), and API keys for agent mode (e.g., OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY).
  • Configuration: Settings, including model selection and API keys, are managed via a local config file (~/.reverse-api/config.json) or the /settings CLI command.
  • Links: No external quick-start or demo links are provided; the CLI is the primary interface.

Highlighted Details

  • Autonomous Agent Mode: Offers fully automated browser interaction using AI agents (MCP-based, browser-use, or stagehand providers).
  • Production-Ready Output: Generated API clients include authentication handling, clean function interfaces, type hints, docstrings, error handling, and are designed for production use.
  • Multi-SDK Support: Integrates with Claude and OpenCode SDKs, with potential for future Codex SDK support.
  • Cost Tracking: Provides detailed token usage and cost estimations for AI model interactions, with cache support.

Maintenance & Community

The provided README does not detail specific contributors, sponsorships, or community channels like Discord or Slack.

Licensing & Compatibility

The project is licensed under the MIT License, which is generally permissive for commercial use and integration into closed-source projects.

Limitations & Caveats

Some websites employ advanced bot-detection mechanisms that may impede traffic capture or necessitate manual intervention. The tool executes code locally using Claude Code, requiring users to monitor its output.

Health Check
Last Commit

4 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
1
Star History
92 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.