QodeAssist is an AI-powered coding assistant plugin for Qt Creator. It provides intelligent code completion and suggestions for C++ and QML, leveraging large language models through local providers like Ollama. Enhance your coding productivity with context-aware AI assistance directly in your Qt development environment.
When using paid providers like Claude, OpenRouter or OpenAI-compatible services:
- These services will consume API tokens which may result in charges to your account
- The QodeAssist developer bears no responsibility for any charges incurred
- Please carefully review the provider's pricing and your account settings before use
- Overview
- Install plugin to QtCreator
- Configure for Anthropic Claude
- Configure for OpenAI
- Configure for using Ollama
- System Prompt Configuration
- File Context Features
- Template-Model Compatibility
- QtCreator Version Compatibility
- Development Progress
- Hotkeys
- Troubleshooting
- Support the Development
- How to Build
- AI-powered code completion
- Chat functionality:
- Side and Bottom panels
- Chat history autosave and restore
- Token usage monitoring and management
- Attach files for one-time code analysis
- Link files for persistent context with auto update in conversations
- Automatic syncing with open editor files (optional)
- Support for multiple LLM providers:
- Ollama
- OpenAI
- Anthropic Claude
- LM Studio
- OpenAI-compatible providers(eg. https://openrouter.ai)
- Extensive library of model-specific templates
- Custom template support
- Easy configuration and model selection
- Install Latest Qt Creator
- Download the QodeAssist plugin for your Qt Creator
- Remove old version plugin if already was installed
- Launch Qt Creator and install the plugin:
- Go to:
- MacOS: Qt Creator -> About Plugins...
- Windows\Linux: Help -> About Plugins...
- Click on "Install Plugin..."
- Select the downloaded QodeAssist plugin archive file
- Go to:
- Open Qt Creator settings and navigate to the QodeAssist section
- Go to Provider Settings tab and configure Claude api key
- Return to General tab and configure:
- Set "Claude" as the provider for code completion or/and chat assistant
- Set the Claude URL (https://api.anthropic.com)
- Select your preferred model (e.g., claude-3-5-sonnet-20241022)
- Choose the Claude template for code completion or/and chat
- Open Qt Creator settings and navigate to the QodeAssist section
- Go to Provider Settings tab and configure OpenAI api key
- Return to General tab and configure:
- Set "OpenAI" as the provider for code completion or/and chat assistant
- Set the OpenAI URL (https://api.openai.com)
- Select your preferred model (e.g., gpt-4o)
- Choose the OpenAI template for code completion or/and chat
- Install Ollama. Make sure to review the system requirements before installation.
- Install a language models in Ollama via terminal. For example, you can run:
For standard computers (minimum 8GB RAM):
ollama run qwen2.5-coder:7b
For better performance (16GB+ RAM):
ollama run qwen2.5-coder:14b
For high-end systems (32GB+ RAM):
ollama run qwen2.5-coder:32b
- Open Qt Creator settings (Edit > Preferences on Linux/Windows, Qt Creator > Preferences on macOS)
- Navigate to the "Qode Assist" tab
- On the "General" page, verify:
- Ollama is selected as your LLM provider
- The URL is set to http://localhost:11434
- Your installed model appears in the model selection
- The prompt template is Ollama Auto FIM or Ollama Auto Chat for chat assistance. You can specify template if it is not work correct
- Click Apply if you made any changes
You're all set! QodeAssist is now ready to use in Qt Creator.
The plugin comes with default system prompts optimized for chat and instruct models, as these currently provide better results for code assistance. If you prefer using FIM (Fill-in-Middle) models, you can easily customize the system prompt in the settings.
QodeAssist provides two powerful ways to include source code files in your chat conversations: Attachments and Linked Files. Each serves a distinct purpose and helps provide better context for the AI assistant.
Attachments are designed for one-time code analysis and specific queries:
- Files are included only in the current message
- Content is discarded after the message is processed
- Ideal for:
- Getting specific feedback on code changes
- Code review requests
- Analyzing isolated code segments
- Quick implementation questions
- Files can be attached using the paperclip icon in the chat interface
- Multiple files can be attached to a single message
Linked files provide persistent context throughout the conversation:
- Files remain accessible for the entire chat session
- Content is included in every message exchange
- Files are automatically refreshed - always using latest content from disk
- Perfect for:
- Long-term refactoring discussions
- Complex architectural changes
- Multi-file implementations
- Maintaining context across related questions
- Can be managed using the link icon in the chat interface
- Supports automatic syncing with open editor files (can be enabled in settings)
- Files can be added/removed at any time during the conversation
Template | Compatible Models | Purpose |
---|---|---|
CodeLlama FIM | codellama:code |
Code completion |
DeepSeekCoder FIM | deepseek-coder-v2 , deepseek-v2.5 |
Code completion |
Ollama Auto FIM | Any Ollama base/fim models |
Code completion |
Qwen FIM | Qwen 2.5 models(exclude instruct) |
Code completion |
StarCoder2 FIM | starcoder2 base model |
Code completion |
Alpaca | starcoder2:instruct |
Chat assistance |
Basic Chat | Messages without tokens |
Chat assistance |
ChatML | Qwen 2.5 models(exclude base models) |
Chat assistance |
Llama2 | llama2 model family , codellama:instruct |
Chat assistance |
Llama3 | llama3 model family |
Chat assistance |
Ollama Auto Chat | Any Ollama chat/instruct models |
Chat assistance |
- QtCreator 15.0.1 - 0.4.8 - 0.4.x
- QtCreator 15.0.0 - 0.4.0 - 0.4.7
- QtCreator 14.0.2 - 0.2.3 - 0.3.x
- QtCreator 14.0.1 - 0.2.2 plugin version and below
- Basic plugin with code autocomplete functionality
- Improve and automate settings
- Add chat functionality
- Sharing diff with model
- Sharing project source with model
- Support for more providers and models
- To call manual request to suggestion, you can use or change it in settings
- on Mac: Option + Command + Q
- on Windows: Ctrl + Alt + Q
- To insert the full suggestion, you can use the TAB key
- To insert word of suggistion, you can use Alt + Right Arrow for Win/Lin, or Option + Right Arrow for Mac
If QodeAssist is having problems connecting to the LLM provider, please check the following:
-
Verify the IP address and port:
- For Ollama, the default is usually http://localhost:11434
- For LM Studio, the default is usually http://localhost:1234
-
Check the endpoint:
Make sure the endpoint in the settings matches the one required by your provider - For Ollama, it should be /api/generate - For LM Studio and OpenAI compatible providers, it's usually /v1/chat/completions
- Confirm that the selected model and template are compatible:
Ensure you've chosen the correct model in the "Select Models" option Verify that the selected prompt template matches the model you're using
If you're still experiencing issues with QodeAssist, you can try resetting the settings to their default values:
- Open Qt Creator settings
- Navigate to the "Qode Assist" tab
- Pick settings page for reset
- Click on the "Reset Page to Defaults" button
- The API key will not reset
- Select model after reset
If you find QodeAssist helpful, there are several ways you can support the project:
-
Report Issues: If you encounter any bugs or have suggestions for improvements, please open an issue on our GitHub repository.
-
Contribute: Feel free to submit pull requests with bug fixes or new features.
-
Spread the Word: Star our GitHub repository and share QodeAssist with your fellow developers.
-
Financial Support: If you'd like to support the development financially, you can make a donation using one of the following:
- Bitcoin (BTC):
bc1qndq7f0mpnlya48vk7kugvyqj5w89xrg4wzg68t
- Ethereum (ETH):
0xA5e8c37c94b24e25F9f1f292a01AF55F03099D8D
- Litecoin (LTC):
ltc1qlrxnk30s2pcjchzx4qrxvdjt5gzuervy5mv0vy
- USDT (TRC20):
THdZrE7d6epW6ry98GA3MLXRjha1DjKtUx
- Bitcoin (BTC):
Every contribution, no matter how small, is greatly appreciated and helps keep the project alive!
Create a build directory and run
cmake -DCMAKE_PREFIX_PATH=<path_to_qtcreator> -DCMAKE_BUILD_TYPE=RelWithDebInfo <path_to_plugin_source>
cmake --build .
where <path_to_qtcreator>
is the relative or absolute path to a Qt Creator build directory, or to a
combined binary and development package (Windows / Linux), or to the Qt Creator.app/Contents/Resources/
directory of a combined binary and development package (macOS), and <path_to_plugin_source>
is the
relative or absolute path to this plugin directory.
QML code style: Preferably follow the following guidelines https://github.com/Furkanzmc/QML-Coding-Guide, thank you @Furkanzmc for collect them C++ code style: check use .clang-fortmat in project