Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>FastDoc AINew to Visual Studio Code? Get it now.
FastDoc AI

FastDoc AI

FastDocDevTeam

|
2 installs
| (0) | Free
Automatically generates inline documentation (JSDoc / Python docstrings) for functions using an LLM backend.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

FastDoc AI

A VS Code extension that automatically generates inline documentation (JSDoc / Python docstrings) for functions — powered by a local or remote LLM.

Features

  • One-command doc generation — Place your cursor on or near a function, run FastDoc: Generate Documentation, and a properly formatted doc block is inserted above the function.
  • Language-aware — Detects JavaScript, TypeScript (including JSX/TSX), and Python, and applies the correct format (JSDoc or docstring).
  • LLM-powered — Uses a large language model to generate meaningful, context-aware documentation.
  • Privacy first — Defaults to a locally running Ollama instance so no source code leaves your machine.
  • Remote LLM opt-in — Optionally connect to any remote OpenAI-compatible API with a data-privacy warning shown on each use.
  • Smart detection — Recognises existing documentation and prompts before overwriting (no silent data loss).
  • Multiple triggers — Command Palette, right-click context menu, or keyboard shortcut (Ctrl+Shift+D / Cmd+Shift+D).
  • Preview & edit before insert — A side panel shows the generated doc block so you can review or edit it before it is committed to the file.
  • Multiple variants — Generate up to 3 documentation variants in parallel and pick the best one via a Quick Pick menu.
  • Session telemetry — A status bar item shows how many documentation blocks have been generated this session. Click it to open the output log.
  • Workspace memory — Remembers the last model and provider used per workspace.

Prerequisites

Requirement Details
VS Code 1.70 or later
Ollama (recommended) Install Ollama and pull a model

Quick Start

  1. Install the extension from the VS Code Marketplace.
  2. Open a .ts, .js, .jsx, .tsx, or .py file.
  3. Place the cursor on or within 3 lines of a function.
  4. Press Ctrl+Shift+D (Cmd+Shift+D on Mac) — or open the Command Palette and run FastDoc: Generate Documentation.
  5. Review the generated doc block in the preview panel, edit if needed, then click Insert.

Setting Up a Backend

FastDoc needs an LLM backend to generate documentation. Choose one:

Local — Ollama (default, no data sent externally)

# Install from https://ollama.com/download, then:
ollama pull gpt-oss:20b
ollama serve

FastDoc will connect to http://localhost:11434 automatically.

Remote — OpenAI-compatible API

  1. Open the Command Palette and run FastDoc: Open Settings for a graphical configuration panel, or:
  2. Open VS Code Settings (Ctrl+, / Cmd+,) and search for FastDoc.
  3. Set Provider to remote.
  4. Enter your Remote URL (e.g. https://api.openai.com/v1).
  5. Store your API Key securely by running FastDoc: Set API Key from the Command Palette (the key is stored in VS Code SecretStorage, not in settings.json).
  6. Set the Model name (e.g. gpt-4o).

A data-privacy warning is shown every time documentation is generated with a remote provider.

Commands

Command Description
FastDoc: Generate Documentation Generate a doc block for the nearest function (Ctrl+Shift+D)
FastDoc: Set API Key Securely store your remote LLM API key in VS Code SecretStorage
FastDoc: Open Settings Open a graphical settings panel for configuring the LLM backend

Extension Settings

Setting Default Description
fastdoc.llm.provider ollama ollama (local) or remote
fastdoc.llm.model gpt-oss:20b Model name (e.g. codellama:latest, gpt-4o)
fastdoc.llm.ollamaUrl http://localhost:11434 Ollama API base URL
fastdoc.llm.remoteUrl (empty) Remote LLM API base URL
fastdoc.llm.apiKey (empty) Deprecated — use FastDoc: Set API Key instead. API key is now stored in SecretStorage.
fastdoc.llm.variantCount 1 Number of variants to generate (1–3). When > 1, a Quick Pick lets you choose before insertion.

How It Works

  1. FastDoc validates the active editor and detects the file language.
  2. It scans outward from the cursor for a function within ±3 lines.
  3. It checks for an existing doc block and prompts before overwriting.
  4. It builds an LLM prompt (optionally generating multiple variants in parallel).
  5. The generated block is shown in a preview panel — you can edit it freely.
  6. The approved block is validated for structural correctness (JSDoc /** */ markers or Python """ delimiters) and inserted above the function.
  7. The session counter in the status bar increments, and the model/provider is saved for this workspace.

Troubleshooting

Symptom Fix
command not found: ollama Install Ollama and restart your terminal / VS Code.
"No function found at cursor" Move the cursor onto the function name or within 3 lines of it.
Nothing inserted, no error Check the FastDoc AI output channel and confirm a backend is configured.
Remote: 401 / 403 error Your API key is invalid or expired — update it in VS Code Settings.
Remote: connection refused Check the Remote URL in VS Code Settings.
Generated doc looks generic The extension will automatically retry once with a stricter prompt. If it still fails, try a larger model.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft