Skip to content

Streamline Coding & Speed Up Dev Process. Your Own Personal Senior Engineer For Free!

License

Notifications You must be signed in to change notification settings

ikramhasan/AI-Dev-Scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI DEV SCRIPTS

Streamline Code Review, Commit & Speed Up Dev Process. Your Own Personal Senior Engineer For Free!


Table of Contents

📍 Overview

AI DEV SCRIPTS, leverages Local LLMs to streamline code improvement workflows and enhance your coding. It includes scripts like ai_review for suggestion generation, ai_pr for pull request analysis, and ai_commit for suggested commit messages, ai_chat for full RAG compatible chat feature. Additionally, it features an ai_readme script that generates customized readmes based on directory locations. Overall, it utilizes Ollama's DeepSeek Coder, and Mistral model to automate code improvements, security checks, and documentation within the repository ecosystem.


🧩 Features

  • AI Review: Scours through specified file formats and requests AI-generated suggestions for improvement.
  • AI PR: Analyzes GitHub Pull Requests by calling an external Ollama DeepSeek Coder service.
  • AI Commit: Generates commit messages using an AI model, adhering to conventional commit style and active voice guidelines.
  • AI Readme: Generates customized readmes based on the repository's location, utilizing OpenAI's Ollama API and the Mistral model.
  • AI Chat: Chat with websites, pdf, and markdown files, a RAG in your own terminal.
  • AI Describe: Describe an image.

📦 Scripts

File Summary
ai_review This ai_review file initiates the script that scours through specified file formats and requests AI-generated suggestions for improvement. It generates a markdown file containing improvements, best practices, readability enhancements, maintainability tips, and potential code examples, creating an impactful code improvement workflow within this repository's ecosystem.
ai_pr The ai_pr script analyzes GitHub Pull Requests by calling an external Ollama DeepSeek Coder service. It generates brief summaries and flags potential security or coding best practices issues from the presented git changes. This tool supports automated PR review processes in the given repository infrastructure.
ai_commit The ai_commit script in this repository's scripts folder is designed to generate commit messages using an AI model. This tool runs the deepseek-coder model from Ollama to suggest a commit message based on the git diff provided as input, adhering to conventional commit style and active voice guidelines.
ai_readme Generate readme files for directories using the AI, named ai_readme script. The script triggers an AI to produce customized readmes based on the repository's location, utilizing OpenAI's Ollama API and the Mistral model. Emojis and flat-square badge styles are incorporated in the readme generation process.
ai_chat Chat with web pages, PDFs, or markdown files of any size. Complete rag functionality.
ai_describe Describe an image (uses the llava model).
openai General purpose openai script. It's a dependency for several other scripts here.

🚀 Getting Started

Requirements:

  • Bash
  • readmeai
  • ollama
  • deepseek-coder
  • mistral

⚙️ Installation

1. Clone the repository:

git clone https://github.com/ikramhasan/AI-Dev-Scripts.git

2. Install the required dependencies:

pip install readmeai

3. Install ollama: Download the latest release from here

4. Install deepseek-coder:

ollama run deepseek-coder:6.7b-instruct

5. Install mistral:

ollama run mistral:7b-instruct

6. Make the scripts executable:

chmod +x ./ai_review

7. (Optional) Add the scripts to your PATH:

export PATH=$PATH:/path/to/AI-Dev-Scripts

🤖 Usage

ai_review

Navigate to the directory where you want to run the script and execute the command below:

$ ./ai_review file.py file.js # for specific files

Or,

$ ./ai_review *.py *.js # for all files with .py and .js extensions

ai_readme

Navigate to the directory where you want to generate the readme and run the command below:

$ ./ai_readme

ai_commit

Navigate to your repo and run ai_commit using the command below:

$ ./ai_commit

ai_pr

Copy the pr link and run the command below:

$ ./ai_pr <pr_link>

ai_chat

Navigate to the directory where you want to run the script and run the command below:

$ ./ai_chat -t md -f blog.md -q "What is this blog about?"

Or,

$ ./ai_chat -t pdf -f blog.pdf -q "What is this blog about?"

Or,

$ ./ai_chat -t web -f https://www.example.com -q "What is this blog about?"

ai_describe

Navigate to the directory of your image and run the command below:

$ ./ai_describe

Then follow the on-screen instructions.

openai

The script requires jq to be installed. Run the following command to install it.

brew install jq

After jq is installed, add the OPENAI_API_KEY variable to your path by running this command:

export OPENAI_API_KEY=your_openai_api_key

Then run the script using the command below:

$ ./openai <prompt>

Then follow the on-screen instructions.


🤝 Contributing

Contributions are welcome! Here are several ways you can contribute:


🎗 License

This project is protected under the MIT License.


🔗 Acknowledgments

⭐ Star History

Star History Chart

Return


About

Streamline Coding & Speed Up Dev Process. Your Own Personal Senior Engineer For Free!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published