CodeScribe
A Visual Studio Code extension that generates, updates, and keeps project documentation in sync with your codebase.
Key Features
- Generate professional README.md files from project metadata
- Create summaries and API-style docs using AI-powered prompts
- Sync documentation to reflect folder and file structure changes
- Configurable AI backend and temperature/max-token settings
Requirements
- Visual Studio Code 1.60 or later
- Node.js 16+ (for development tasks)
Quickstart
- Install the extension locally or from the Marketplace.
- Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P).
- Run the
CodeScribe: Generate README command to create a README from your project.
Configuration
Open Settings and configure the following under the codescribe section:
codescribe.openRouterApiKey (string) — Required. Your OpenRouter / DeepSeek API key used for AI generation. Keep this secret; do not commit it to source control.
codescribe.defaultTemperature (number) — Optional. Controls AI creativity (default: 0.4).
codescribe.maxTokens (number) — Optional. Max tokens for generation (default: 1200).
Commands
CodeScribe: Generate README — Generate or refresh README.md for the current workspace.
CodeScribe: Sync Docs — Scan the project and update documentation files to match folder structure.
Set / Update API Key (command)
Use this command to securely set or update your OpenRouter API key without editing settings.json manually:
- Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P).
- Run
CodeScribe: Set / Update API Key.
- Enter your OpenRouter API key when prompted — the key is stored in your global VS Code settings under
codescribe.openRouterApiKey.
If you need to remove or change the key later, re-run the command and provide a new key, or remove the value from Settings.
Developer Guide
To build and run the extension locally:
npm install
npm run compile
Run the extension in the debugger:
- Press
F5 in VS Code or choose Run > Start Debugging.
- A new Extension Development Host window opens with the extension loaded.
To watch for TypeScript changes while developing:
npm run watch
Run tests:
npm test
Lint and format:
npm run lint
Security and Secrets
- Do not hard-code API keys in source files. Use the
codescribe.openRouterApiKey setting or environment variables when running locally.
- Treat generated content as a draft: review AI-generated text before publishing.
Contributing
Contributions are welcome. Open issues or submit pull requests for bug fixes and enhancements. Follow standard GitHub flow and include tests for new features.
Troubleshooting
- If AI calls fail, check
codescribe.openRouterApiKey in Settings and verify network connectivity.
- For TypeScript build errors, run
npm run compile to see detailed diagnostics.
License
MIT — see the LICENSE file for details.
⚠️ Important: API Key Required
CodeScribe uses AI (via OpenRouter + DeepSeek) to generate README files.
You must provide your own OpenRouter API key:
- Go to https://openrouter.ai
- Create a free account
- Generate an API key
- Open VS Code Settings
- Search for
CodeScribe
- Paste your API key into
codescribe.openRouterApiKey
Without an API key, AI generation will not work.