grok-cli — Wiki

Module: overview Cohesion: 0.80 Members: 0

grok-cli — Wiki

Welcome to the Code Buddy project wiki!

This is the central hub for understanding, developing, and contributing to Code Buddy. Whether you're a new developer looking to get started, an experienced contributor diving into specific modules, or just curious about the architecture, this wiki is designed to guide you.

What is Code Buddy?

Code Buddy (also known as grok-cli) is an open-source, multi-provider AI coding agent designed for your terminal. It acts as your personal AI-powered development tool and assistant, supporting a wide range of large language models (LLMs) including Grok, Claude, ChatGPT, Gemini, Ollama, and LM Studio.

Inspired by the Native Engine architecture, Code Buddy offers a rich set of features:

High-Level Architecture

Code Buddy's architecture is designed for modularity, extensibility, and robust AI interaction. At its core, it orchestrates communication between users, AI models, and various development tools.

Here's a simplified view of the most important modules and their relationships:

graph TD
    User[User Interaction] --> CLI[Code Buddy CLI]
    IDE[IDE Extensions] --> CLI
    CLI --> Agent[AI Agent (src/agent)]
    Agent --> Providers[LLM Providers (src/providers)]
    Agent --> Tools[Tools & Skills (src/tools)]
    Agent --> Memory[Context & Memory (src/memory)]
    Agent --> Prompts[Prompts & Personas (prompts)]
    Tools --> Sandbox[Execution Sandbox (src/sandbox)]
    Sandbox --> External[External Systems/APIs]

Core Components & Data Flow

The project is structured into several key modules, each with a distinct responsibility:

  1. User Interface & Entry Point:

  1. The AI Core:

  1. Capabilities & Execution:

  1. Context & Data Management:

  1. Development & Operations:

Getting Started for Developers

To get Code Buddy up and running for development:

  1. Clone the repository:
    git clone https://github.com/phuetz/code-buddy.git
    cd code-buddy

  1. Install dependencies: Code Buddy supports both npm and bun.
    # Using npm
    npm install

    # Or using bun
    bun install

  1. Start the development server:
    # Using npm
    npm run dev

    # Or using bun
    bun run dev

This will typically launch the Code Buddy CLI in development mode.

For more detailed development workflows, refer to the scripts module documentation.

Contributing

We welcome contributions from everyone! If you're interested in helping out, please explore the modules, pick an area that interests you, and don't hesitate to reach out on our community channels. The docs module is a great place to start for general project information and guidelines.