11KU7 AI Coder is a simple shell based ai coding assistant powered with ai agents in form of modes, these modes have-
- Coding Functionality - includes code generation (code mode) and code analysis (ask code mode)
- Web Search Functionality - includes web search powered by brave api (web search mode)
- Image Functionality - includes image generation , image editing (image mode) and image analysis (ask image mode)
- Document Functionality - Document analysis (ask docu mode)
- URL Functionality - URL analysis (ask URL mode)
- Shell Functionality - Shell Comands generation and execution for task mentioned in natural language (shell agent mode)
- App Functionality - App development including web apps (web app mode) and mobile apps based upon vite & expo frameworks (vitex app mode)
- Multi file Functionality - Generates full-stack coding projects including software and apps requiring multi file generation, Git Repository creation, Existing repository analysis and editing (gitrepo mode)
11ku7-ai-coder (version 1.1)
- Added new image provider Gemini
- Added "image Editor" sub-mode inside "image mode" works with Gemini image provider only
- Dependencies update - (added) google-genai
- Python 3.7+: Make sure you have Python 3.7 or higher installed on your system.
- API Keys: You'll need API keys for the AI model providers you intend to use (e.g., OpenAI, Groq, OpenRouter, Mistral, etc.). Brave Search API key is optional but recommended for Web Search Mode. Hugging Face API Key is needed for Image Generation.
- Optional Dependencies:
- Poppler (Windows): For advanced image querying in PDF documents in "ask docu" mode (installation instructions provided in the tool via
install popplerorinstall help). - Node.js and npm (for Vitex App Mode): Required for creating and running React/Expo applications.
- Git (for Git Repository Mode): Required for working with Git repositories.
- Poppler (Windows): For advanced image querying in PDF documents in "ask docu" mode (installation instructions provided in the tool via
git clone https://github.com/dheeraj21/11ku7-ai-coder.gitcd 11ku7-ai-coderpip install -r requirements.txtpython 11ku7-ai-coder-v-1-1.pyFollow the on-screen prompts to select your model provider, configure API keys, and start using the AI Coder!
Directly run 11ku7-ai-coder by running executable in windows.
- Multi-Model Support: Choose from a wide range of AI model providers including Groq, OpenRouter, Ollama, OpenAI, Gemini, Mistral, Anthropic, and more!
- Versatile Modes: Explore 11 distinct modes for different development tasks:
- Code Generation Mode (
code): Generate code snippets in various programming languages. - Web App Generation Mode (
web app): Create basic web applications with HTML, JavaScript, and Tailwind CSS. - Ask Code Mode (
ask code): Analyze and answer questions about your code files. - Ask Image Mode (
ask image): Understand and query image content (local files or URLs). - Ask URL Mode (
ask url): Summarize and get insights from webpage content. - Ask Document Mode (
ask docu): Extract information and answer questions from PDF, Markdown, and text documents. - Image Generation Mode (
image): Generate images from text prompts using Hugging Face models. - Shell Agent Mode (
shell agent): Get intelligent assistance with shell commands for your OS. - Vitex App Mode (
vitex app): Interactive mode to create and modify React apps with Vite or Expo, including running and previewing. - Git Repository Mode (
gitrepo): Manage and modify general Git repositories, with code understanding and command suggestions. - Web Search Mode (
web search): Perform web searches and get summarized answers based on search results using Brave Search API.
- Code Generation Mode (
- Interactive Menu: Easy-to-navigate command-line menu to access all features and modes.
- Conversation History: Save your AI interactions to markdown files for future reference.
- File Management: Basic file and folder creation, directory navigation, and file execution directly from the tool.
- Cross-Platform Compatibility: Designed to work on Windows, Linux, macOS, and Termux (Android).
- Optional Dependencies & Installation Help: Provides guidance for installing optional tools like Poppler for advanced PDF features.
Once you run the script, you'll be presented with a menu outlining the available commands and modes.
- Type commands directly at the prompt to activate modes or perform actions (e.g.,
code,web app,ask code,shell,help,quit). - Use
helpcommand to display the full list of available commands and modes within the tool. - Follow prompts within each mode to provide queries, file paths, and other necessary information.
- Use
opcommand to change the model provider and model in the current session. - Use
savecommand within most modes to save your conversation history to a markdown file.
Break down of each of the 11 modes in detail:
1. code (Code Generation Mode):
- Purpose: To generate code snippets in various programming languages based on user prompts.
- Activation: Type
codeat the main prompt. - Functionality:
- Takes natural language queries describing code requirements (e.g., "generate a python function to calculate factorial").
- Utilizes the selected AI model (via
code_generatoragent) to generate code. - Displays the generated code in a markdown code block with syntax highlighting.
- Offers to save the generated code to a file.
- Allows saving the entire conversation history.
- Input: Natural language code requests.
- Output: Code snippets, typically in markdown format.
- Underlying Function:
code()
2. web app (Web App Generation Mode):
- Purpose: To generate basic web applications (HTML and JavaScript) based on user descriptions.
- Activation: Type
web appat the main prompt. - Functionality:
- Takes natural language descriptions of web apps (e.g., "create a simple to-do list web app").
- Uses the selected AI model (via
web_app_generatoragent) to generate HTML and JavaScript code. - Employs Tailwind CSS for styling (inline in HTML).
- Displays HTML and JavaScript code in separate markdown code blocks.
- Offers to save the code to an HTML file.
- Optionally runs a local Python HTTP server to preview the web app.
- Allows saving the conversation history.
- Input: Web app descriptions in natural language.
- Output: HTML and JavaScript code snippets in markdown format.
- Underlying Function:
web_app()
3. ask code (Ask Code Mode):
- Purpose: To analyze and answer questions about existing code files.
- Activation: Type
ask codeat the main prompt. - Functionality:
- Prompts for the path to a code file.
- Reads the content of the specified code file.
- Takes natural language questions about the code (e.g., "explain this function", "what does this code do?").
- Uses the selected AI model to answer questions based on the code content.
- Displays the AI's response in markdown.
- Offers to save the conversation history.
- Includes a shell sub-mode for command based operations.
- Input: File path to a code file, questions about the code in natural language.
- Output: AI's answers and explanations about the code, in markdown format.
- Underlying Function:
ask_code_mode()
4. ask image (Ask Image Mode):
- Purpose: To analyze and answer questions about images, either from local files or URLs.
- Activation: Type
ask imageat the main prompt. - Functionality:
- Prompts for the path to an image file (local or URL).
- Encodes the image into base64 or uses the URL.
- Takes natural language questions about the image (e.g., "what objects are in this image?", "describe the scene").
- Uses a vision-capable AI model to answer questions based on the image content.
- Displays the AI's response in markdown.
- Offers to save the conversation history.
- Includes a shell sub-mode for command based operations.
- Input: File path or URL of an image, questions about the image in natural language.
- Output: AI's descriptions and answers about the image, in markdown format.
- Underlying Function:
ask_the_image_mode()
5. ask url (Ask URL Mode):
- Purpose: To analyze and answer questions about the content of a webpage specified by a URL.
- Activation: Type
ask urlat the main prompt. - Functionality:
- Prompts for a URL.
- Fetches the content of the webpage at the given URL using web scraping.
- Takes natural language questions about the webpage content (e.g., "summarize this page", "what is the main topic?").
- Uses the selected AI model to answer questions based on the scraped webpage content.
- Displays the AI's response in markdown.
- Offers to save the conversation history.
- Input: URL of a webpage, questions about the page content in natural language.
- Output: AI's summaries and answers about the webpage, in markdown format.
- Underlying Function:
ask_url_mode()
6. ask docu (Ask Document Mode):
- Purpose: To analyze and answer questions about the content of document files (PDF, Markdown, or text files).
- Activation: Type
ask docuat the main prompt. - Functionality:
- Prompts for the path to a document file.
- Reads the text content from the document (and optionally extracts images from PDFs using Poppler if installed).
- Takes natural language questions about the document content (e.g., "what is the document about?", "summarize page 3").
- Uses the selected AI model to answer questions based on the document content (and optionally images).
- Displays the AI's response in markdown.
- Offers to save the conversation history.
- Includes a shell sub-mode for command based operations.
- Input: File path to a document file (PDF, MD, TXT), questions about the document in natural language.
- Output: AI's summaries and answers about the document, in markdown format.
- Underlying Function:
ask_document_mode()
7. image (Image Generation Mode):
- Purpose: To generate images based on text prompts using a selected image generation model (Hugging Face).
- Activation: Type
imageat the main prompt. - Functionality:
- Prompts for a text description of the desired image.
- Uses the selected image generation model (Gemini & Huggingface
IMAGE_MODE) to generate an image. - Saves the generated image to a file (PNG, JPG, or JPEG).
- Displays the save path and generation time.
- Allows generating multiple images in a session.
- Input: Text prompts describing the desired image.
- Output: Saved image files (PNG, JPG, or JPEG).
- Image Editor mode: edit images inside this submode runs with gemini image provider only.
- Underlying Function:
image()
8. shell agent (Shell Agent Mode):
- Purpose: To assist in generating and executing shell commands for the operating system.
- Activation: Type
shell agentat the main prompt. - Functionality:
- Takes natural language descriptions of shell tasks (e.g., "list all files in the current directory", "create a backup of my documents").
- Uses the
shell_agentto generate shell commands appropriate for the detected operating system (Windows, Linux, macOS, Termux). - Displays the generated commands.
- Allows executing the commands step-by-step or all at once.
- Shows the output of executed commands.
- Maintains a history of executed commands.
- Offers to save the conversation history (including commands and outputs).
- Input: Shell tasks described in natural language.
- Output: Shell commands, output of executed commands.
- Underlying Function:
shell_agent_mode()
9. vitex app (Vitex App Mode):
- Purpose: To assist in creating and modifying React applications using Vite or Expo frameworks. This mode is interactive and helps in project setup, code modification, running, and previewing web/mobile applications.
- Activation: Type
vitex appat the main prompt. - Functionality:
- Allows creating new Vite/React or Expo projects from scratch.
- Allows working with existing projects (Vite/React or Expo).
- Ingests project file structure and code.
- Takes natural language requests to modify the app (e.g., "add a button to change background color", "create a new component").
- Uses an AI agent to generate modification plans and code changes.
- Offers to preview code changes and approve before applying.
- Applies code changes to files, backs up files before modification, and can revert changes.
- Suggests and executes necessary commands (like
npm install). - Allows running and previewing the app (web or mobile).
- Includes a chat sub-mode for asking questions about the project.
- Includes a shell sub-mode for command based operations.
- Offers to save conversation history.
- Input: Natural language requests to create or modify React/Expo applications.
- Output: Modified code files, executed commands, previews of running applications.
- Underlying Function:
vitex_app_mode()
10. gitrepo (Git Repository Mode):
- Purpose: To assist in managing and modifying general Git repositories (not limited to web apps, can be any code repository). This mode focuses on repository-level tasks and code modifications within a Git repository context.
- Activation: Type
gitrepoat the main prompt. - Functionality:
- Allows creating new Git repositories.
- Allows cloning existing repositories from URLs.
- Allows working with local existing repositories.
- Ingests repository file structure and code.
- Detects the main/entry file of the repository.
- Takes natural language requests to modify the repository or code (e.g., "add a new feature", "fix a bug", "update documentation").
- Uses an AI agent to generate modification plans and code changes.
- Offers to preview code changes and approve before applying.
- Applies code changes to files, backs up files before modification, and can revert changes.
- Suggests and executes necessary commands (like dependency installations).
- Includes a chat sub-mode for asking questions about the repository.
- Includes a shell sub-mode for command based operations.
- Offers to save conversation history.
- Input: Natural language requests to manage or modify Git repositories.
- Output: Modified code files, executed commands, repository structure previews.
- Underlying Function:
gitrepo_mode()
11. web search (Web Search Mode):
- Purpose: To perform web searches using the Brave Search API and provide answers based on the search results.
- Activation: Type
web searchat the main prompt. - Functionality:
- Takes natural language search queries.
- Uses the Brave Search API to perform web searches.
- Scrapes content from the top search result webpages (limited to the first few results).
- Uses an AI agent to summarize the search results and answer the user's query based on the web content.
- Cites sources (URLs) inline in the response.
- Displays the AI's response in markdown.
- Requires a Brave Search API key to function properly.
- Offers to save the conversation history.
- Input: Search queries in natural language.
- Output: Summarized answers based on web search results, with source citations, in markdown format.
- Underlying Function:
web_search_mode()
These are the 11 modes available in the script, each designed for a specific type of task related to coding, development, and information retrieval using AI. They collectively make the 11KU7 AI CODER a versatile tool for AI-assisted programming and related activities.
Whole purpose of opensourcing this code are contributions. If you have ideas for new features, improvements, or bug fixes, please feel free to:
- Fork the repository.
- Create a branch for your feature or fix.
- Commit your changes.
- Push to your branch.
- Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
For questions, issues, or feedback, please feel free to connect
I'm always open to collaborations! Feel free to reach out:
-
The concept of Agents, as implemented in this AI coder, is inspired by and builds upon the principles of modular AI design and agent-based systems. Specifically, the approach to creating agents from scratch, without relying on LLM frameworks, is acknowledged to be influenced by the ideas presented in the following Research paper:
REACT: SYNERGIZING REASONING AND ACTING IN LANGUAGE MODELS here
This research paper provided valuable insights into building agents, which has informed the design and implementation of the
Agentclass and specialized agents within this project. I appreciate all authors for sharing their knowledge and contributing to the understanding of agent-based AI systems. -
The concept of use of ingestion of file structure of whole repository was taken from the source code of this project
cyclotruc/gitingest here
This repository's source code provided an important base for file ingestion to create project states in vitex and gitrepo mode of 11ku7-ai-coder.
