Skip to main content

Chapter 2 : Cursor AI

AI Based Development With Cursor AI Code Editor

!# See Caution

tip
  • Cursor offers a basic FREE tier and premium plan trial in beginning!
  • Make use of it for learning.

Improve AI Based Development Outcomes in Cursor

Use EasyManage Code For Grounding AI

info

Prerequisite:

  • Complete relevant (Full-Stack, DevOps and/or Cloud) EasyManage tutorials and generate code, download to your desktop.

Use Cursor and Open your project

  • Open Cursor and select backend project folder from EasyManage generated code:
    • e.g. backend\spring-java\emapi

cursor-open-project

Use Cursor AI to describe your project

Give input prompt

describe current project

cursor-desc-proj-inp

Expected Output:

project description
...
...
The project appears to be a modern, well-structured enterprise application with a focus on API development (both REST and GraphQL) and proper testing infrastructure. It follows microservices architecture patterns with separate modules for different concerns and includes comprehensive CI/CD setup.

Would you like me to explore any specific aspect of the project in more detail?

cursor-desc-proj-out

Use Project Code For Grounding AI

In Cursor, Provide context

  • Click '@' For Add Context via Files and Folders

cursor-add-context

  • Give relative path for
    • app\dbrest\pom.xml
  • Then Click to Select this file as Context.

cursor-context-sel

tip

Effective AI Grounding will offer benefits such as reducing Hallucinations and improving Accuracy & Relevance.

Extend and Customize EasyManage Code with AI Agents

Extend project to work with Snowflake

Goal: Extend emapi dbrest to work with snowflake

Cursor with AI Agents will allow more effective extension and customization of generated code to complete this use case.

Steps:

Give input to prompt

enhance dbrest module to work with database snowflake

cursor-ext-proj-inp

After Generating... completes

View Summary of what changes are made by AI

cursor-ext-proj-gen

View the files individually then

Accept at File Level

cursor-gen-file-lev

Or project level, on right side dialog, Accept All or Reject All

cursor-gen-proj-lev

To discard all the new code generated, Optionally, go back to your input prompt and

Click Restore checkpoint

cursor-gen-restore

tip

Using Cursor AI Agents and LLMs, you can generate all code required to work with snowflake to accomplish your goal.