Codito - VSCode Coding Assistant
Codito is a VSCode extension that provides AI-powered coding assistance directly in your editor. With a friendly robot-themed interface, it helps you write, understand, and refactor code more efficiently.
Features
- Ask Questions: Get answers to your programming questions without leaving VSCode
- Generate Code: Describe what you want to build, and Codito will generate the code for you
- Explain Code: Select code and get a detailed explanation of what it does
- Refactor Code: Select code and get suggestions for how to improve it
- Multiple AI Providers: Choose between OpenAI, Claude, or Gemini as your AI provider
- Model Selection: Select from various models across all providers to balance speed, cost, and capabilities
- Robot Assistant: A friendly robot-themed UI to assist with your coding tasks
Commands
Codito provides the following commands:
Codito: Ask a question
- Ask a programming question
Codito: Generate code
- Generate code based on a description
Codito: Explain selected code
- Get an explanation of the selected code
Codito: Refactor selected code
- Get suggestions for refactoring the selected code
Codito: Set API Key
- Set your API key for OpenAI, Claude, or Gemini
Codito: Select API Provider
- Choose which AI provider to use
Codito: Select AI Model
- Choose which AI model to use from any provider
Installation
- Open VSCode
- Go to Extensions (Ctrl+Shift+X)
- Search for "Codito"
- Click Install
Setup
Before using Codito, you need to set up your API key:
- Get an API key from one of the supported providers:
- Open the Command Palette (Ctrl+Shift+P)
- Run
Codito: Set API Key
- Select your provider and enter your API key
You can configure your preferred provider and model:
- Open the Command Palette (Ctrl+Shift+P)
- Run
Codito: Select API Provider
to choose between OpenAI, Claude, or Gemini
- Run
Codito: Select AI Model
to choose a specific model from any provider
Available Models
OpenAI Models
- GPT-3.5 Turbo: Faster and more cost-effective
- GPT-4: More capable but slower and more expensive
- GPT-4 Turbo: Improved version of GPT-4 with better performance
Claude Models
- Claude 3 Haiku: Fastest and most compact model
- Claude 3 Sonnet: Balanced performance and capabilities
- Claude 3 Opus: Most powerful model with highest capabilities
Gemini Models
- Gemini Pro: Standard model for text generation
- Gemini 1.5 Pro: Advanced model with improved capabilities
Usage
Codito provides a simple and intuitive interface at the bottom of your VSCode window:
- Click the Codito robot icon in the status bar to show/hide the input panel
- Type your task or question in the input field
- Choose between "Plan" or "Act" mode:
- Plan Mode: Codito will analyze your code and provide a detailed plan without making changes
- Act Mode: Codito will analyze your code and make the necessary changes
- Press Enter to submit your prompt
Reading Files and Suggesting Improvements
One of Codito's key features is the ability to read your files and suggest improvements or make edits based on your requirements. Here's how to use this feature:
- Open the file(s) you want Codito to analyze in VSCode
- Click the Codito robot icon in the status bar to show the input panel
- Type your request in the input field
- Choose "Plan" mode to get suggestions or "Act" mode to apply changes
- Press Enter to submit
- Describe what you want Codito to do, for example:
- "Analyze this code and suggest improvements"
- "Implement the TODO items in this file"
- "Fix the bug in the calculateTotal function"
- "Add responsive styles for mobile devices"
- "Refactor the calculateArea function to use switch statements"
Codito will:
- Read the currently open files
- Analyze the code based on your requirements
- Provide suggestions or code edits
- If code edits are suggested, you'll have the option to:
- Apply the edits directly
- View a diff of the proposed changes
- Cancel and make the changes manually
Example Prompts
Here are some example prompts you can try with the included test files:
For test-file.js:
- "Implement the subtract and divide functions"
- "Refactor the calculateArea function to be more maintainable"
- "Add JSDoc comments to all functions"
For test-page.html:
- "Add responsive styles for mobile devices"
- "Improve the button styling"
- "Add a form section with validation"
- "Fix the calculateTotal function to handle negative numbers"
Requirements
- VSCode 1.60.0 or higher
- An API key for at least one of the supported AI providers
Development
Building the Extension
- Clone the repository
- Run
npm install
to install dependencies
- Press F5 to start debugging
Packaging the Extension
npm install -g vsce
vsce package
This will create a .vsix
file that can be installed in VSCode.
License
MIT