AutoDoc Generator is a VSCode extension that uses AI to automatically generate documentation for your functions as you write them. It detects when you pause typing, analyzes your code, and inserts meaningful docstrings using the LLM of your choice via OpenRouter.
Features
AI-Powered Documentation: Uses OpenRouter to access models from OpenAI, Anthropic, Google, and more
Automatic Detection: Intelligently detects new functions and methods as you write them.
Language Support: Works out of the box with TypeScript, JavaScript, and Python.
Configurable: Choose your preferred AI model and manage your API keys securely in VSCode settings.
Non-Intrusive: Runs in the background and only activates when you pause typing to avoid interrupting your flow.
Usage
Generating a new docstring for a function
Changing an existing docstring when a function changes
Open a supported file (TypeScript, JavaScript, Python).
Write a function.
The extension will automatically insert a docstring above your function.
Alternatively, you can manually trigger generation:
Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
Run AutoDoc: Generate Docs
Requirements
You must have an OpenRouter API Key to use this extension.