Skip to content

A Generative AI Assistant with advance agentic capabilities. Codebuddy uses machine learning to generate code, complete tasks, and streamline coding tasks workflow.

License

Notifications You must be signed in to change notification settings

olasunkanmi-SE/codebuddy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CodeBuddy: AI-Powered Coding Assistant

Version Downloads Rating

CodeBuddy is a revolutionary Visual Studio Code extension that transforms your development workflow with AI-powered assistance. From intelligent code completion to comprehensive documentation generation, CodeBuddy is your complete development companion.

✨ What's New in v3.4.3

πŸš€ Context-Aware Code Completion - Get Copilot-style inline suggestions based on your codebase patterns
πŸ“š Intelligent Documentation Generator - Auto-generate comprehensive project documentation
πŸ” Advanced Codebase Understanding - Deep architectural analysis with RAG capabilities
πŸ€– AI Agent Orchestration - Multi-agent system for complex development tasks
πŸ’‘ Real-time Code Analysis - Instant feedback and suggestions as you code

🎯 Core Features

🧠 AI-Powered Code Assistance

  • Multiple AI Models: Choose from Gemini, Anthropic Claude, Groq, Deepseek, and XGrok
  • Intelligent Code Review: Deep analysis of code quality, security, and best practices
  • Smart Refactoring: Context-aware code improvements and restructuring
  • Performance Optimization: AI-driven suggestions for better performance
  • Bug Detection & Fixes: Automatic error detection with intelligent fix suggestions

πŸ’« Context-Aware Code Completion

  • Inline Suggestions: Copilot-style grey text completions as you type
  • Pattern Learning: Learns from your codebase to suggest relevant completions
  • Function Signatures: Smart parameter suggestions based on your patterns
  • Variable Naming: Intelligent variable name suggestions following your conventions
  • Block Completion: Auto-completes common code structures (if/for/try blocks)

πŸ“š Intelligent Documentation Generator

  • Comprehensive README: Auto-generates professional README.md files
  • API Documentation: Extracts and documents REST endpoints automatically
  • Architecture Analysis: Creates Mermaid diagrams and architectural overviews
  • Component Documentation: Documents classes, interfaces, and modules
  • Smart Analysis: Understands project structure and generates relevant docs

πŸ” Deep Codebase Understanding

  • RAG-Powered Analysis: Retrieval-Augmented Generation for accurate codebase insights
  • Architectural Recommendations: Suggests improvements based on your project structure
  • Framework Detection: Identifies and analyzes technologies in use
  • Pattern Recognition: Understands your coding patterns and conventions
  • Context-Aware Q&A: Answer questions about your specific codebase

πŸ’¬ Interactive Chat Interface

  • Modern React UI: Beautiful, responsive chat interface
  • Code Context: Automatic code context inclusion in conversations
  • File Upload: Support for various file formats (PDF, DOCX, CSV, JSON, TXT)
  • Syntax Highlighting: Code blocks with proper language detection
  • Customizable Themes: Multiple chat themes to match your preferences

πŸš€ Quick Start

Installation

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "CodeBuddy"
  4. Click Install

Setup

  1. Select AI Model: Choose your preferred AI provider in VS Code settings
  2. Add API Key: Configure your API key for the chosen model
  3. Start Coding: CodeBuddy is now ready to assist!

Getting Your API Keys

πŸ“‹ How to Use

Right-Click Context Menu

Right-click on selected code to access these features:

  • πŸ’­ Add Comments - Intelligent code documentation
  • πŸ” Review Code - Comprehensive code analysis
  • πŸ”„ Refactor Code - Smart code improvements
  • ⚑ Optimize Code - Performance enhancements
  • πŸ’¬ Explain Code - Clear explanations of complex logic
  • πŸ“ Generate Commit Message - Smart Git commit messages
  • πŸ’« Inline Chat - Context-aware code discussions
  • πŸ“š Interview Questions - Technical interview preparation
  • πŸ“Š Generate Diagram - Mermaid diagram creation
  • πŸ—οΈ Analyze Codebase - Deep architectural analysis

Command Palette

Access additional features via Ctrl+Shift+P:

  • CodeBuddy: Generate Documentation - Create comprehensive docs
  • CodeBuddy: Toggle Context Completion - Enable/disable smart completion
  • CodeBuddy: Test Completion - Verify completion provider status
  • CodeBuddy: Configure Context Completion - Adjust completion settings
  • CodeBuddy: Analyze Codebase Patterns - View pattern analysis

Chat Interface

Click the CodeBuddy icon in the Activity Bar to open the interactive chat:

  • Ask questions about your code
  • Upload files for analysis
  • Get architectural recommendations
  • Discuss implementation strategies

πŸ”§ Configuration

Access CodeBuddy settings in VS Code preferences:

AI Model Selection

{
  "generativeAi.option": "Gemini", // or "Groq", "Anthropic", "XGrok", "Deepseek"
}

Model-Specific Settings

{
  "google.gemini.apiKeys": "your-gemini-api-key",
  "google.gemini.model": "gemini-1.5-flash",
  "anthropic.apiKey": "your-anthropic-api-key",
  "groq.llama3.apiKey": "your-groq-api-key",
  "deepseek.apiKey": "your-deepseek-api-key"
}

UI Customization

{
  "font.family": "JetBrains Mono",
  "chatview.theme": "Atom One Dark",
  "chatview.font.size": 16
}

πŸ—οΈ Architecture

flowchart TD
    %% VS Code Extension Frontend
    subgraph "VS Code Extension Frontend"
        CE["Editor Interface"]:::frontend
        CL["Commands Layer"]:::frontend
        WV1["Webview (VS Code)"]:::frontend
        WV2["Webview (React UI)"]:::frontend
    end

    %% Core Application Layer
    subgraph "Core Application"
        AA["AI Agents"]:::core
        MS["Memory System"]:::core
        subgraph "Application Services"
            BL["Business Logic"]:::core
            AI["Application Interfaces"]:::core
        end
        subgraph "Infrastructure Layer"
            HTTP["HTTP Services"]:::infra
            LOG["Logging"]:::infra
            REP["Repository"]:::infra
            LS["Local Storage"]:::infra
        end
    end

    %% AI Providers
    subgraph "AI Providers"
        LLM["Language Model Integrations"]:::provider
        ESP["External Service Providers"]:::provider
    end

    %% Storage Layer
    subgraph "Storage Layer"
        DB["Database (SQLite)"]:::storage
        FS["File System"]:::storage
        VD["Vector Database"]:::storage
    end

    %% Connections
    CE -->|"User Input"| CL
    CL -->|"Process Request"| AA
    CL -->|"UI Update"| WV1
    AA -->|"Context Management"| MS
    AA -->|"Orchestration"| BL
    AA -->|"Contract Call"| AI
    AA -->|"API Request"| HTTP
    HTTP -->|"API Call"| LLM
    HTTP -->|"API Call"| ESP
    HTTP -->|"Feedback"| WV1
    BL -->|"Data Access"| DB
    BL -->|"File Access"| FS
    BL -->|"Embed Data"| VD
    AI -->|"Repository Access"| REP
    MS -->|"Store Context"| DB

    %% Styling
    classDef frontend fill:#e1f5fe,stroke:#0277bd,stroke-width:2px;
    classDef core fill:#e8f5e8,stroke:#2e7d32,stroke-width:2px;
    classDef infra fill:#fff3e0,stroke:#ef6c00,stroke-width:2px;
    classDef provider fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px;
    classDef storage fill:#fce4ec,stroke:#c2185b,stroke-width:2px;
Loading

πŸš€ Roadmap

βœ… Completed Features

  • Codebase Understanding - Comprehensive RAG-powered analysis
  • Code Search - Semantic search across entire codebase
  • React Webview UI - Modern, responsive interface
  • AI Agent Orchestration - Multi-agent workflow coordination
  • Context Pinning - Persistent context for AI models
  • Documentation Generation - Automated comprehensive docs
  • Real-time Data Access - External API integration
  • Multiple AI Models - Support for 5 different providers
  • Context-Aware Completion - Copilot-style inline suggestions

πŸ”œ Coming Soon

  • Local LLM Support - Ollama integration for offline usage
  • Multi-language Support - Python, Java, Go, and more
  • Advanced Caching - Redis support for better performance
  • Team Collaboration - Share contexts and documentation
  • Custom Templates - Personalized documentation templates
  • Integration Testing - Validate docs against actual code

πŸ“ Repository Structure

codebuddy/
β”œβ”€β”€ src/                          # Source code
β”‚   β”œβ”€β”€ agents/                   # AI agent orchestration
β”‚   β”œβ”€β”€ commands/                 # VS Code command implementations  
β”‚   β”œβ”€β”€ llms/                     # AI provider integrations
β”‚   β”œβ”€β”€ services/                 # Core business logic
β”‚   β”‚   β”œβ”€β”€ documentation-generator.service.ts
β”‚   β”‚   β”œβ”€β”€ inline-completion.service.ts
β”‚   β”‚   β”œβ”€β”€ context-aware-completion.service.ts
β”‚   β”‚   └── codebase-understanding.service.ts
β”‚   β”œβ”€β”€ webview/                  # VS Code webview components
β”‚   β”œβ”€β”€ infrastructure/           # Infrastructure layer
β”‚   └── extension.ts              # Main extension entry point
β”œβ”€β”€ webviewUi/                    # React-based chat interface
β”œβ”€β”€ docs/                         # Documentation
└── package.json                  # Extension configuration

🀝 Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch from development
  3. Install dependencies: npm install
  4. Start development: Run β†’ Start Debugging (F5)
  5. Make your changes in the new VS Code instance
  6. Test thoroughly with various scenarios
  7. Submit a pull request

Development Setup

  • Main entry point: src/extension.ts
  • React UI entry: webviewUi/src/App.tsx
  • Testing: New VS Code instance opens automatically
  • Build: npm run compile and npm run build:webview

For detailed contribution guidelines, see CONTRIBUTING.md

πŸ› οΈ Troubleshooting

Common Issues

❓ Completion not working

  • Ensure you're in a TypeScript/JavaScript file
  • Check if the completion provider is active in Command Palette
  • Try the "CodeBuddy: Test Completion" command

❓ API Key Issues

  • Verify your API key is correctly entered in VS Code settings
  • Check that you've selected the matching AI model
  • Ensure your API key has sufficient credits/quota

❓ Documentation generation fails

  • Make sure you have proper file permissions in the workspace
  • Check that your project structure is supported
  • Review the output panel for detailed error messages

❓ Performance Issues

  • Try switching to a faster AI model (Groq is typically fastest)
  • Clear the extension cache: Use "CodeBuddy: Restart" command
  • Check your internet connection stability

Getting Help

πŸ“Š Analytics & Performance

  • Bundle Size: ~8.7MB (Extension) + ~398KB (UI)
  • Supported Languages: TypeScript, JavaScript, React, Vue
  • VS Code Version: 1.78.0+
  • AI Models: 5 providers supported
  • Database: SQLite for local storage, Vector embeddings for search

πŸ“„ License

MIT License - see LICENSE file for details.

🌟 Support the Project

If CodeBuddy enhances your development workflow:

  • ⭐ Star the repository
  • πŸ“ Leave a review on the VS Code Marketplace
  • πŸ› Report bugs or suggest features
  • 🀝 Contribute to the codebase
  • πŸ’¬ Share with fellow developers

Made with ❀️ by Olasunkanmi Raymond

Transform your coding experience with AI-powered assistance. Install CodeBuddy today and code smarter, not harder!

Install Now

About

A Generative AI Assistant with advance agentic capabilities. Codebuddy uses machine learning to generate code, complete tasks, and streamline coding tasks workflow.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages