placeholder

Building better code with Cursor AI

JavaScript engineer Thomas Marcelo shares his experience using Cursor AI.

FEB. 6, 2025
3 Min Read
by
Thomas Marcelo
We recently had to upgrade the Node.js version used by the applications on our repository. This usually means upgrading other libraries, replacing code, and considerable debugging, so it’s a heavy lift. Leveraging Cursor helped a lot with this because it allows you to provide an entire codebase as context for it. When you query, in this case, the impact of such an upgrade, it can very effectively filter for all of the files that such a change might impact.
When I did this for the Node.js migration, it not only immediately listed important files to consider, but also provided valuable tips for handling changes, proving that it can also support the planning phase for such tasks. Cursor knew about libraries known to break after such an upgrade, so it proposed the best replacements. When it was time to take action, it also helped us fix errors, perform tedious/repetitive replacements in the code, and saved us some debugging time up until the final deployment.

What is Cursor AI?

Cursor AI is the natural evolution of code editors in the face of recent AI advancements, such as powerful LLMs (large language models). AI-supported coding started as extensions to our code editors, but Cursor was the first to succeed in integrating AI with a code editor on a fundamental level. This has helped blur the line between human creativity and artificial intelligence.

Getting started with Cursor AI

Cursor is a VS Code-based code editor enhanced with AI capabilities. Users can launch it via terminal command, with no separate authentication needed. Its paid subscription offers access to multiple AI models such as Open AI o1, Gpt 40, Claude, enabling advanced coding assistance directly within the development environment.

Do you have Cursor running in your VS code?

Cursor is a fork of VS Code, so when you install Cursor, you’re installing VS Code with their modifications. It’s not dependent on a separate code editor; it is the code editor. This means you don’t need to authenticate or log in. You simply type “cursor.” on your terminal, and it opens on its own, ready to be used.

Visual Studio Code window

Cursor Window. Basically the same, but with Cursor’s AI features embedded in it.

Did you pay for access?

I do, but since I can select the AI from a dropdown for every interaction, it’s more like getting the benefits of Open AI o1, Gpt 40, Claude, etc., all in one shot.
Cursor Pricing ($20)

ChatGPT Pricing ($20)
Anthropic (Claude) Pricing ($18)
Just to highlight that with Cursor, we get access to these two by paying for Cursor.

Core features and workflows

Automated code completion

Cursor offers automated code completion with real-time, context-aware suggestions that appear as you type. Users can easily accept completions using the Tab key, streamlining the coding process with intelligent recommendations.
How do you typically interface with Cursor AI?
If I start typing code, the code completion will kick in automatically.
Just by providing a comment with my intent, a suggestion appears in gray.
I see the suggestions and just hit “Tab” to accept them. But I can also type “Ctrl/Command + L” anywhere in the editor to see the chat window, and this is where the fun begins.
Chat window
I can provide the context of the code, folder, documentation, image, or link I’m querying. The chat doesn’t apply and save changes directly but shows suggestions. I can then accept and test one or more of the suggestions.
Example chat with an image, a file and Ant Design documentation add as contexts
If something doesn’t work or generates an error, I can continue the conversation by providing error messages or a brief explanation, and the loop continues. But when the action to be taken is straightforward, I can use Composer instead, and in this case, the AI will accept these actions giving me the option to keep or discard them.
Example response, with code snippet with changes that can be accepted. 
Once accepted, they will get added automatically to the opened file.

AI chat integration

Cursor provides AI-powered coding assistance accessible via Ctrl/Command + L, offering context-aware support for complex migrations, library compatibility checks, file impact analysis, and interactive error debugging.
Did you have to code the solution yourself?
Cursor already takes action for itself, but we’re still limited by the LLMs that power it. For now, aside from the code completions, when providing context through the chat, we get back suggestions that we must accept. When accepted, the AI implements the changes, but you still need to find the file you want to change, provide the necessary context, ask for the change, review it, and accept it. There is a workflow that minimizes the coding part, but humans are still required to do multiple parts of the process.

Composer mode

Cursor’s Composer mode enables automated file manipulation, direct code implementation, and provides a workflow to review, approve, or discard proposed changes.
How do you use it?
I mostly use it for code completion, generation, debugging, and optimizing. The company updates things and introduces new features regularly, but for now,  my usage is limited to these functions.
Users mainly use Chat and Composer. I stick mainly with Chat, which requires a more standard interaction between the user and the AI (i.e., we ask, get a response, and decide whether to accept the suggestions). By contrast, Composer has more agency in taking actions such as creating/deleting files on its own.

Current limitations

AI suggestions require careful human review. The system needs manual context provision and human oversight, with performance constrained by underlying large language model capabilities.

About the author

I started about 10 years ago as I was graduating from college as a civil engineer. I began working on personal and then professional programming projects. After honing my front-end development skills, and with a strong emphasis on React and TypeScript, I decided to make the career change and applied at Lumenalta as a programmer.
Last year, I entered and won the first-ever Brazilian Microsoft Excel Championship. This secured a spot at the finals in Las Vegas this past December, with the plane tickets and hotels all paid for. I took my wife, and we spent a great week visiting popular sports like casinos, the Hoover Dam, and the Grand Canyon. Not bad for my first visit to the U.S.