DevForgeAI is a Visual Studio Code extension that generates code from natural-language comments. Select a comment describing what you want, run the DevForgeAI command, and it inserts the generated code below your selection — powered by Google's Gemini API.
Features
- Seamless code generation: annotate your file with a comment describing the code you want, select it, and DevForgeAI generates the snippet.
- Powered by Gemini: uses Google's
gemini-3.5-flashmodel by default (configurable). - Multi-line and single-line comment support.
- API key configuration through VS Code settings.
Building and Installing Locally (For Developers)
-
Clone the repository:
git clone https://github.com/karthik137/code-forge-ai.git -
Install dependencies:
npm install -
Package the extension:
npx vsce package -
This generates a
.vsixfile in the project root. -
In VS Code, open the Extensions view (Ctrl+Shift+X), click the "..." menu, choose "Install from VSIX...", and select the generated file.
Configuring the API Key
- Get a free Gemini API key from Google AI Studio.
- Open VS Code settings (Ctrl+,) and search for "DevForgeAI".
- Paste your key into DevForgeAI: Api Key.
- Optionally change DevForgeAI: Model (default:
gemini-3.5-flash).
Getting Started
-
Open a code file.
-
Write a comment describing the code you want, e.g.:
// Generate a function to calculate the sum of two numbers -
Select the comment.
-
Trigger generation either by:
- Command palette: Ctrl+Shift+P → "DevForgeAI"
- Right-click → "DevForgeAI" in the context menu.
-
The generated code is inserted right after your selection.
Feedback and Contributions
Issues and pull requests are welcome on the project's GitHub repository.