Skip to content

Repository files navigation

Swagger Chat

AI-powered Chrome extension that adds a floating chat bubble to Swagger/OpenAPI documentation pages. Ask questions in natural language and the extension automatically calls the right API endpoints.

Features

  • Auto-detection of OpenAPI/Swagger specs on any page
  • Natural language API interaction — just describe what you want
  • Multi-provider AI — supports OpenAI, Anthropic (Claude), and Google Gemini
  • Dynamic tool generation — every endpoint becomes an AI-callable tool
  • Confirmation dialogs for non-GET requests to prevent accidental mutations
  • Response truncation and sensitive field masking
  • Shadow DOM isolation — the chat UI never interferes with the host page

Setup

npm install

Development

npm run dev
  1. Open chrome://extensions/
  2. Enable "Developer mode"
  3. Click "Load unpacked" and select the dist/ folder
  4. Navigate to any Swagger/OpenAPI documentation page

The extension supports HMR — changes to the source will auto-reload.

Production Build

npm run build

The built extension is in dist/.

Configuration

Click the extension icon to open settings:

  • API Keys — enter keys for OpenAI, Anthropic, and/or Google Gemini
  • Provider & Model — select which AI provider and model to use
  • Auto-execute GET — toggle whether GET requests run without confirmation
  • Base URL Override — override the API base URL if needed

How It Works

  1. The content script detects the OpenAPI spec on the current page
  2. All endpoints are parsed and converted into AI-callable tool definitions
  3. When you send a message, it's forwarded to the AI provider via the service worker
  4. The AI selects the appropriate tool(s) and provides parameters
  5. The extension executes the API call directly from the page (same origin)
  6. Results are returned to the AI for summarization

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages