{"id":21713524,"url":"https://github.com/mehdihadeli/aiassist","last_synced_at":"2026-02-28T18:35:39.902Z","repository":{"id":264533012,"uuid":"863995548","full_name":"mehdihadeli/AIAssist","owner":"mehdihadeli","description":"💻 Context aware AI coding assistant inside terminal to help in code development, code explanation, code refactor and review, bug fix and chat with supporting local and online language models.","archived":false,"fork":false,"pushed_at":"2024-12-05T14:54:08.000Z","size":558,"stargazers_count":15,"open_issues_count":6,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T12:51:16.635Z","etag":null,"topics":["ai","ai-assistant","ai-developer-tools","ai-tools","anthropic","azure-ai","azure-openai","claude","cli","command-line","csharp","dotnet","gpt-4","gpt-4o","llm","ollama","openai","terminal","terminal-ui","tree-sitter"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mehdihadeli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-27T09:49:00.000Z","updated_at":"2025-03-04T23:46:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"428a1c68-e6a9-4479-a504-74e5788ec890","html_url":"https://github.com/mehdihadeli/AIAssist","commit_stats":null,"previous_names":["mehdihadeli/aiassist"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehdihadeli%2FAIAssist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehdihadeli%2FAIAssist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehdihadeli%2FAIAssist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehdihadeli%2FAIAssist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mehdihadeli","download_url":"https://codeload.github.com/mehdihadeli/AIAssist/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248617069,"owners_count":21134184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-assistant","ai-developer-tools","ai-tools","anthropic","azure-ai","azure-openai","claude","cli","command-line","csharp","dotnet","gpt-4","gpt-4o","llm","ollama","openai","terminal","terminal-ui","tree-sitter"],"created_at":"2024-11-26T00:11:19.595Z","updated_at":"2026-02-28T18:35:39.868Z","avatar_url":"https://github.com/mehdihadeli.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Assist\n\n\u003e `Context Aware` AI coding assistant inside terminal to help in code development, code explanation, code refactor and review, bug fix and chat with supporting local and online language models\n\n`AIAssist` is compatible with bellow AI Services: \n- [x] [OpenAI](https://platform.openai.com/docs/api-reference/introduction) through apis\n- [x] [Azure AI Services](https://azure.microsoft.com/en-us/products/ai-services) through apis\n- [x] [Ollama](https://ollama.com/) with using [ollama models](https://ollama.com/search) locally\n- [ ] [Anthropic](https://docs.anthropic.com/en/api/getting-started) through apis\n- [ ] [OpenRouter](https://openrouter.ai/docs/quick-start) through apis\n\n\u003e [!TIP]\n\u003e You can use ollama and its models that are more compatible with code like [deepseek-v2.5](https://ollama.com/library/deepseek-v2.5) or [qwen2.5-coder](https://ollama.com/library/qwen2.5-coder) locally. To use local models, you will need to run [Ollama](https://github.com/ollama/ollama) process first. For running ollama you can use [ollama docker](https://ollama.com/blog/ollama-is-now-available-as-an-official-docker-image) container.\n\n\u003e [!NOTE]\n\u003e Development of `vscode` and `jetbrains` plugins are in the plan and I will add them soon.\n\n## Features\n\n-   ✅ `Context Aware` ai code assistant through [ai embeddings](src/AIAssistant/Services/CodeAssistStrategies/EmbeddingCodeAssist.cs) which is based on Retrieval Augmented Generation (RAG) or [tree-sitter application summarization](src/AIAssistant/Services/CodeAssistStrategies/TreeSitterCodeAssistSummary.cs) to summarize application context and understanding by AI.\n-   ✅ Support different result formats, like [Unified Diff Format](src/AIAssistant/Diff/UnifiedCodeDiffParser.cs), [Code Block Format](src/AIAssistant/Diff/CodeBlockDiffParser.cs) and [Search-Replace Format](src/AIAssistant/Diff/SearchReplaceParser.cs).\n-   ✅ Code assistant for developing new features, finding bugs, refactor and review existing code base.\n-   ✅ Chat mode for chatting with different local and online AI models through terminal.\n-   ✅ Support local [ollama models](https://ollama.com/library) and [OpenAI](https://platform.openai.com/docs/models) and [Azure AI Service](https://ai.azure.com/explore/models) models.\n-   ✅ Support multiple code languages like C#, Java, go,...\n-   ✅ Syntax highlighting for showing code blocks and using `md format` for ai results with capability of `changing theme` like dracula theme or vscode light theme.\n-   ✅ Defining a dedicated ignore file for AIAssist through a `.aiassistignore` for excluding files and folders that you want to exclude from code assist process and decreasing final token size.\n-   ✅ Customize `configuration` through creating `aiassist-config.json` running directory for `aiassist` and a format like [predefined aiassist-config.json](./src/AIAssistant/aiassist-config.json).\n-   ✅ Showing token usage count and calculated priced based on each model `input token` and `output token` price.\n-   ✅ Customize models information with creating a customized models information through `ModelsInformationOptions` section in the `aiassist-config.json` and a format like [predefined models information](./src/Clients/LLMs/models_information_list.json).\n-   ✅ Customize models options through `ModelsOptions` section in the `aiassist-config.json` and a format like [predefined models options](./src/Clients/LLMs/models_options.json).\n-   ✅ Terminal main commands like `aiassist code`, `aiassist chat`, `aiassist explain` and support some internal commands like `:clear`, `:add-file`, `:clear-history`, `:token`, ...\n\n## Get Started\n\nAIAssist uses [Azure AI Services](https://azure.microsoft.com/en-us/products/ai-services) or [OpenAI](https://platform.openai.com/docs/api-reference/introduction) apis by default. For using `OpenAI` or `Azure AI` apis we need to have a `ApiKey`.\n\n- To access `dotnet tool`, we need to install [latest .net sdk](https://dotnet.microsoft.com/en-us/download) first.\n- Install `aiassist` with `dotnet tool install` and bellow command:\n\n```bash\ndotnet tool install --global AIAssist \n```\n\n- For OpenAI If you don't have a API key you can [sign up](https://platform.openai.com/signup) in OpenAI and get a ApiKey.\n- For Azure AI service you can [signup](https://azure.microsoft.com/en-us/products/ai-services) a azure account and get a AI model API key.\n- After getting Api key we should set API key for chat and embedding models through environment variable or command options.\n- Now got to `project directory` with `cd` command in terminal, For running `aiassist` and setting api key.\n\n```bash\n# Go to project directory\ncd /to/project/directory\n```\n\n-   Set `Api Key` through `environment variable`:\n\nLinux terminal:\n```bash\nexport CHAT_MODEL_API_KEY=your-chat-api-key-here\nexport EMBEDDINGS_MODEL_API_KEY=your-embedding-api-key-here\n```\n\nWindows Powershell Terminal:\n```powershell\n$env:CHAT_MODEL_API_KEY=your-chat-api-key-here\n$env:EMBEDDINGS_MODEL_API_KEY=your-embedding-api-key-here\n```\n\n-   Or set `Api Key` through `command option`:\n\n```bash\naiassist code --chat-api-key your-chat-api-key-here  --embeddings-api-key your-embedding-api-key-here\n```\n\n-   If you are using AI models that need `ApiVersion`, `DeploymentId` and `BaseAddress` like Azure AI Service models, you can set them by environment variable or command options.\n-   Set `ApiVersion`, `DeploymentId` and `BaseAddress` through`environment variable`:\n\nLinux terminal:\n```bash\nexport CHAT_BASE_ADDRESS=your-chat-base-address-here\nexport CHAT_API_VERSION=your-chat-api-version-here\nexport CHAT_DEPLOYMENT_ID=your-chat-deployment-id-here\nexport EMBEDDINGS_BASE_ADDRESS=your-embedding-base-address-here\nexport EMBEDDINGS_API_VERSION=your-embedding-api-version-here\nexport EMBEDDINGS_DEPLOYMENT_ID=your-embedding-deployment-id-here\n```\n\nWindows Powershell Terminal:\n```powershell\n$env:CHAT_BASE_ADDRESS=your-chat-base-address-here\n$env:CHAT_API_VERSION=your-chat-api-version-here\n$env:CHAT_DEPLOYMENT_ID=your-chat-deployment-id-here\n$env:EMBEDDINGS_BASE_ADDRESS=your-embedding-base-address-here\n$env:EMBEDDINGS_API_VERSION=your-embedding-api-version-here\n$env:EMBEDDINGS_DEPLOYMENT_ID=your-embedding-deployment-id-here\n```\n\n-   Or set `ApiVersion`, `DeploymentId` and `BaseAddress` through `command option`:\n\n```bash\naiassist code --chat-base-address your-chat-base-address-here --chat-api-version your-chat-api-version-here  --chat-deployment-id your-chat-deployment-id-here  --embeddings-base-address your-embeddings-base-address-here  --embeddings-api-version your-embeddings-api-version-here  --embeddings-deployment-id your-embeddings-deployment-id-here\n```\n\n-   Now run the ai assistant with `aiassist` command.\n\n```bash\n# run aiassist in code assistant mode.\naiassist code\n```\n\n## ⭐ Support\n\nIf you like feel free to ⭐ this repository, It helps out :)\n\nThanks a bunch for supporting me!\n\n## Contribution\n\nThe application is in development status. You are feel free to submit a pull request or create an issue for any bugs or suggestions.\n\n## License\n\nThe project is under [Apache-2.0 license](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehdihadeli%2Faiassist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmehdihadeli%2Faiassist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehdihadeli%2Faiassist/lists"}