AI coding assistants
Edit on GitHubThis document describes the AI Assistants you can use when developing your Spryker projects. You will read about recommended AI Assistants, how to set up and use them.
Here are some examples of how you can use AI assistants in your work:
- Generate a code completion suggestion
- Describe a code fragment
- Generate a doc block for a code fragment
- Fix syntax bugs in a code fragment
- Simplify a code fragment
- Generate tests for a code fragment
- IO interactions
- Code generation
Before using a AI-related tools, consult with your legal department.
Install AI Assistants
We recommend trying the following assistants:
- GitHub Copilot
- Qodo (formerly Codium)
- Cursor
Install GitHub Copilot
GitHub Copilot is an AI pair programmer that helps you write code faster. It draws context from comments and code and suggests individual lines and whole functions instantly. To start using GitHub Copilot, do the following:
- Install the GitHub Copilot extension in your IDE.
- Authorize yourself as a GitHub user in Preferences > Languages and Frameworks > GitHub Copilot.
Now you can use the GitHub Copilot.
Install Qodo
Qodo is an AI-powered tool that helps developers to generate code, tests, and docs. To set up Qodo, install the Qodo Gen plugin. If the installation is successful, you can see Codiumate in the context menu.
Install Cursor
Cursor is an AI powered IDE forked from VS Code. To set up Cursor, follow the steps:
- Download Cursor from its official website.
- Install Cursor from the downloaded file.
- Optional: To save your work, enable autosave files in the settings.
Using GitHub Copilot
Most features of GitHub Copilot can be used as follows:
- Highlight a code fragment to process.
- Right-click to open the context menu.
- In the context menu, hover over GitHub Copilot and click the needed option.
Generate suggestions based on the existing code in your project:
Explain a code fragment:
Generate doc blocks and add comments:
Generate suggestions for fixing syntax bugs:
Refactor a code fragment:
Generate tests:
Interact with GitHub Copilot using prompts:
Generating tests using Qodo
When it comes to generating tests, Qodo offers a more flexible configuration and a wider range of test scenarios compared to GitHub Copilot. Here’s an example of tests generated with Qodo:
Code generation using Cursor
Cursor AI offers context-aware suggestions by considering the bigger picture within the codebase. This enables it to deliver more accurate and well-structured recommendations, in contrast to GitHub Copilot, which mainly focuses on real-time suggestions based on the specific line of code you’re working on. It’s great at generating basic code and significantly saves time, especially when you need to create something from scratch.
Here’s an example of code generated with Cursor:
Conclusion
This document provides a basic introduction to AI assistants. For a more detailed guide, check out the AI assistants training course.
Thank you!
For submitting the form