Skip to main content

A command-line coding assistant using LLMs

Project description

Code Buddy Assist

Code Buddy Assist is a powerful tool designed to enhance your coding experience by leveraging Large Language Models (LLMs) to provide comprehensive support for your codebase. It bridges the gap between your project and AI, offering assistance from high-level architectural decisions down to detailed bug fixing.

What Code Buddy Assist Does

  1. Project Snapshot Creation: Generates a structured JSON representation of your project, providing a clear overview of your codebase structure.

  2. LLM Integration: Utilizes a carefully crafted prompt to set up an AI coding assistant tailored to your needs, whether using Claude, GPT, or other compatible LLMs.

  3. Contextual Code Understanding: By combining the project snapshot with the AI prompt, Code Buddy Assist enables the LLM to understand your specific project context.

  4. Multi-level Support:

    • Architectural Guidance: Assists with high-level design decisions and project structure optimization.
    • Code Review: Offers suggestions for code improvements and best practices.
    • Bug Fixing: Helps identify and resolve issues in your code.
    • Feature Development: Provides guidance on implementing new features.
    • Documentation: Assists in creating and improving code documentation.
  5. Continuous Learning: As you interact with the AI through your project context, it becomes increasingly familiar with your codebase, offering more tailored and insightful assistance over time.

Code Buddy Assist transforms the way developers interact with AI, creating a personalized coding companion that understands the nuances of your project and can assist at every stage of development.

Benefits of LLM Independence

Some LLM-based code assistants run into usage limits or restrictions, which can interrupt the development workflow. Since Code Buddy Assist is LLM-independent, it allows you to easily switch to another LLM when running into usage limits or when specific LLM features are needed. This flexibility ensures continuous and uninterrupted coding assistance, adapting to your evolving needs.

Installation

To install Code Buddy Assist, run the following command:

pip install code-buddy-assist

Usage

Currently, Code Buddy Assist supports the following command:

Create a Project Snapshot

To create a snapshot of your project (excluding image files), use the snapshot command:

code-buddy-assist snapshot

This will create a JSON file named project_snapshot_no_images.json in your current directory, containing a structured representation of your project files.

You can specify a custom output file name using the --output option:

code-buddy-assist snapshot --output my_project_snapshot.json

Note: The snapshot command requires that you run it from within a Git repository.

Using the Code Buddy Prompt with an LLM

Code Buddy Assist includes a prompt file (coding_buddy_prompt.txt) that can be used with Large Language Models (LLMs) to create an AI coding assistant. Here's how you can use it:

  1. Locate the coding_buddy_prompt.txt file in the root directory of the Code Buddy Assist Assist project.

  2. Choose an LLM platform or API (e.g., OpenAI's GPT, Anthropic's Claude, or any other compatible service).

  3. When starting a new conversation or session with the LLM, begin by pasting the entire contents of coding_buddy_prompt.txt as the initial prompt.

  4. The LLM will now assume the role of Code Buddy Assist, an AI coding assistant with the characteristics and capabilities described in the prompt.

  5. You can then proceed to ask coding-related questions, request help with debugging, or seek advice on best practices.

Note: This prompt can be used to create a Claude Project in Anthropic's Claude platform or a custom GPT in OpenAI's GPT platform. This allows you to have a persistent AI coding assistant tailored to your needs.

Example interaction:

Human: Hello, I need help with a Python function.
AI: Hello! I'm Code Buddy Assist, your AI coding assistant. I'd be happy to help you with your Python function. Could you please provide more details about what you're trying to accomplish or share the code you're working on? This will help me give you more accurate and tailored assistance.

Uploading the Project Snapshot to an LLM

After creating a project snapshot, you can upload it to an LLM to provide context about your project structure. Here's how:

  1. Create the project snapshot as described above.

  2. Open the generated JSON file (e.g., project_snapshot_no_images.json).

  3. In your conversation with the LLM, you can paste the contents of the JSON file to provide context about your project structure. For example:

Human: Here's the project snapshot:

[PASTE JSON CONTENT HERE]

AI: Thank you for providing the project snapshot. I've received it and will use it to better understand your project structure. How can I assist you further today?

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

code_buddy_assist-0.5.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

code_buddy_assist-0.5.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file code_buddy_assist-0.5.0.tar.gz.

File metadata

  • Download URL: code_buddy_assist-0.5.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for code_buddy_assist-0.5.0.tar.gz
Algorithm Hash digest
SHA256 1d974f0ef4c6dd84856e93af3a45a6f45d8cdf11ba7b0e33370bcc159ae8ac79
MD5 5e2d052a1687595262dba723c7500fc0
BLAKE2b-256 7eb7a501e4931ecb9a2869e99139624cad0da0f13de84da190c6ca9d4534ad67

See more details on using hashes here.

File details

Details for the file code_buddy_assist-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for code_buddy_assist-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a58b34481fd027038996ea9d2ce0c8aa52bcb9071b1ec14ddb797ad0c57e4a08
MD5 210439525e9fbbe3322f4de885f0bcb8
BLAKE2b-256 0111836eb0b1b6c931b88f90ae5dafde556fa378dd0b7c6edb1adb17da21bc6e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page