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.6.2.tar.gz (5.8 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.6.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: code_buddy_assist-0.6.2.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for code_buddy_assist-0.6.2.tar.gz
Algorithm Hash digest
SHA256 ffef28b4857aa641ed070ee29b7a16d80b5d0a4c381712e3478ce94610268165
MD5 ac8f4eea54d1d67134573526a128720c
BLAKE2b-256 7f0b13f27d268005fa3e4edfa389390b6acb97837af1dccb165b81b86e508f77

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for code_buddy_assist-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 396eea30704a444535aa51d4502dac1d435bf39382962b07d048034b75b048aa
MD5 5ac884161337152e703b65e21d835b98
BLAKE2b-256 2db3a666ed3bb125e2cad9a6becd2557139115f5df309f3d8cb0ee67a82efd84

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