Ollama Code Hero
A Visual Studio Code extension that leverages Ollama models to generate code files directly in your workspace.
Features
- 🚀 Generate complete code files from natural language prompts
- 💻 Direct integration with local Ollama models
- 🔄 Two chat modes:
- Write: Generates complete code files and setup commands
- Talk: Regular chat mode for programming help
- ⚙️ Easy model switching and API configuration
- 📁 File tree visualization for generated files
- 🛠️ Command suggestions with copy and run capabilities
- 🔍 Code templates for quick starts
Prerequisites
- Visual Studio Code v1.80.0 or higher
- Ollama installed and running locally
- At least one Ollama model downloaded (e.g., codellama, mistral, etc.)
Installation
- Install from VS Code Marketplace: Search for "Ollama Code Hero"
- Or install manually:
code --install-extension efebalun.ollama-code-hero
Getting Started
- Ensure Ollama is running locally (
ollama serve )
- Open VS Code and click the Ollama icon in the activity bar
- Select your preferred model from the dropdown
- Enter your prompt and click Send or press Ctrl/Cmd + Enter
Configuration
- API URL: Configure the Ollama API endpoint (default: http://localhost:11434)
- Model Selection: Choose from your installed Ollama models
- Chat Mode: Switch between Write (file generation) and Talk (chat) modes
Usage
- Write Mode: Enter a natural language prompt to generate a code file
- Talk Mode: Engage in a conversation with the model for programming help
| |