KDevCXX with AI is an innovative extension for the KDevelop IDE and Kate Editor, focusing on integrating AI-powered features specifically designed to enhance C++ development. This project leverages the latest advancements in machine learning and natural language processing to provide KDevelop users with intelligent coding assistance, including code completion, documentation lookup, and advanced code analysis.
gpt-4-1106-preview
to suggest code completions, significantly speeding up the development process.system
and thread
required.Install these packages using your system's package manager.
This project uses CPM for automatic management of external libraries:
arturbac/simple_enum
arturbac/small_vectors
arturbac/stralgo
stephenberry/glaze
fmtlib/fmt
C++20 μ(micro)/Unit Testing Framework
KDE frameworks are utilized, requiring:
5.68.0
or newer.Ensure KDE development libraries and the ECM package are installed.
Follow these steps to install and configure KDevCXX with AI:
Start by cloning the repository to your local machine using the following command:
git clone https://github.com/arturbac/kdevcxx_with_ai.git
Use CMake to build the plugin with the following command:
cmake --workflow --preset="clang-release"
kate plugin will be build and if kdevplatform development headers and libraries are present then kdevelop plugin will be build also.
Use provided install_kdeveplugin.sh and or install_kateplugin.sh scripts it will determine location of kdevplatform plugins and qt/plugins for texteditor and install plugins into that directories
Upon launching KDevelop, a modal dialog will appear, prompting you to review and update your settings in KDevelop settings dialog. For kate You need to go Kate settings and enable plugin and edit them. Note that ai settings are shared between kate and kdevelop, so You only need to do it once.
After installing the plugin, restart KDevelop/Kate. The AI features should now be seamlessly integrated into your IDE.
To use the AI functionality within the editor, follow these steps:
Write your AI request in the editor, preceded by [AI Do something for me with that code]
, followed by the code/text you wish AI to analyze or modify.
Highlight the request and the target code.
Select from Drop down menu Process with AI
to activate the AI processing of selected request and code in format [AI perform command ].
Implementing unit tests example. note that it takes into effect my system rules specifying explicitly to use bost-ext/ut and You can change this in settings
{
"api_key": "******************",
"cxx_rules": "You are great c++23 coder,... if implementing unit tests You use boost-ext/ut ...",
"version": 1
}
Or asking for help with explanations
or example refactoring of very old code
And perhaps the most weird use of AI i did with code, optimise ai query with ai for ai
Or some crazy s...
This project is licensed under the MIT License - see the LICENSE.md file for details.