A VS Code extension for FastAPI development that discovers and displays your API endpoints in a tree view.
- Automatic discovery of FastAPI routes and routers from your codebase
- Tree view showing all endpoints organized by router hierarchy
- Quick navigation - click any route to jump to its definition
- Smart search - search and filter routes by path, method, or name
- CodeLens integration - navigate from test client calls (e.g.,
client.get('/items')) directly to route definitions - Multi-root workspace support - discovers apps in all workspace folders
| Setting | Description | Default |
|---|---|---|
fastapi.entryPoint |
Path to the main FastAPI application file (e.g., src/main.py). If not set, the extension searches common locations: main.py, app/main.py, api/main.py, src/main.py, backend/app/main.py. |
"" (auto-detect) |
fastapi.showTestCodeLenses |
Show CodeLens links above test client calls (e.g., client.get('/items')) to navigate to the corresponding route definition. |
true |
Note: Currently the extension discovers one FastAPI app per workspace folder. If you have multiple apps, use separate workspace folders or configure fastapi.entryPoint to point to your primary app.
- Bun installed
- VS Code
-
Install dependencies:
bun install
-
Build the extension:
bun run compile
-
Press
F5to open a new window with your extension loaded
bun run compile- Compile the extensionbun run watch- Watch for changes and recompilebun run package- Package the extension into a .vsix filebun run publish- Publish the extension to the marketplace
src/extension.ts- Extension entry pointesbuild.js- esbuild configurationpackage.json- Extension manifesttsconfig.json- TypeScript configuration
- TypeScript
- esbuild
- Bun (package manager)
- VS Code Extension API