Skip to main content

a simple code chat tool inspired by auto coder

Project description

auto-coder-chat-lite

PyPI

A lightweight AI code generation tool.

English | 中文

Overview

auto-coder-chat-lite is a lightweight tool designed to facilitate code chat and project scaffolding. It provides a command-line interface for interacting with the project, allowing users to add, remove, and list files, as well as request AI-based code modifications.

Installation

To install auto-coder-chat-lite, you need to have Python 3.6 or higher installed. Then, you can install the package using pip:

pip install auto-coder-chat-lite

Usage

After installation, you can run the tool using the following commands:

chat.code

chat.code

This command starts the interactive command-line interface for code chat and project scaffolding. You can use the following commands within this interface:

  • /add_files <file1> <file2> ... - Add files to the current session.
  • /remove_files <file1> <file2> ... - Remove files from the current session.
  • /list_files - List all active files in the current session.
  • /coding <query> - Request the AI to modify code based on requirements.
  • /exclude_dirs <dir1> <dir2> ... - Exclude directories from file searches.
  • /conf [<key> [<value>]] - View or set configuration options.
  • /commit_message - Generate a commit message based on Git diff.
  • /help - Show this help message.
  • /exit - Exit the program.

chat.agent

chat.agent

This command is used to interact with the OpenAI API for chat completions. It requires the OpenAI API key and model configuration. You can set up the configuration using the following command:

chat.agent setup --api_key YOUR_API_KEY --base_url https://api.openai.com/v1 --model gpt-3.5-turbo

To test the configuration, you can use:

chat.agent test

chat.prompt

chat.prompt

This command is used to render a template using Jinja2. It requires two arguments:

  • template_path: Path to the template file.
  • text_path: Path to the text file to be used as content.

Optionally, you can specify an output file path using the -o or --output_path flag (default is output.txt).

Example usage:

chat.prompt path/to/template.txt path/to/content.txt -o path/to/output.txt

This command will render the template with the provided content, save the result to the specified output file, and copy the rendered content to the clipboard.

Dependencies

The project relies on the following Python packages:

  • colorama==0.4.6
  • pathspec==0.12.1
  • prompt_toolkit==3.0.47
  • pydantic==2.8.2
  • Pygments==2.18.0
  • pyperclip==1.9.0
  • rich==13.7.1
  • GitPython==3.1.43
  • Jinja2==3.1.4
  • pylint==3.2.7
  • openai==1.44.1

These dependencies are automatically installed when you install auto-coder-chat-lite using pip.

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue on the GitHub repository.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contact

For any questions or feedback, please contact the author at 251027705@qq.com.

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

auto_coder_chat_lite-0.1.12.tar.gz (36.0 kB view details)

Uploaded Source

Built Distribution

auto_coder_chat_lite-0.1.12-py3-none-any.whl (47.1 kB view details)

Uploaded Python 3

File details

Details for the file auto_coder_chat_lite-0.1.12.tar.gz.

File metadata

  • Download URL: auto_coder_chat_lite-0.1.12.tar.gz
  • Upload date:
  • Size: 36.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure

File hashes

Hashes for auto_coder_chat_lite-0.1.12.tar.gz
Algorithm Hash digest
SHA256 3ba2c82f0bae6203c2b6a0632359a001d67f6e43cbd248f4143bf6a7dc8ef804
MD5 0b66be36e07a6692a8dfd7a92e40f50b
BLAKE2b-256 161c300f1744901e9a7a4e9295454cee16d5b51872ab13eea08a07428d2c5366

See more details on using hashes here.

File details

Details for the file auto_coder_chat_lite-0.1.12-py3-none-any.whl.

File metadata

File hashes

Hashes for auto_coder_chat_lite-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 80d2d4f9de70daca14e511c396f04ad5045500907dd28240df990f397beb8464
MD5 0980e9f8c5a6d37c89bd01e1c0d131dd
BLAKE2b-256 86db70e5acbb1ce9b253565c64ecc7cb7012a6fec93166aa280e0d4ef57de3c1

See more details on using hashes here.

Supported by

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