DEV Community

Harshvardhan Joshi
Harshvardhan Joshi

Posted on

1 1

"Docs" in cursor - A life saver

We all have seen more than a million articles(hypothetically😅) and posts about how we can use specific rules to guide cursor's AI modules to behave in specific ways with specific frameworks, projects or files.

But how much the AI knows the standards and tools of the framework?

As we already know, AI running behind the scenes is very intelligent but has knowledge cut-off dates, making its knowledge about specific technologies very limited.

  • How do we solve the issue that allows hosting independent knowledge base for specific tech?
  • How do we make sure that it can be referred during the AI response generation without depending on the AI?
  • How do we make sure that any new updates on the framework can be handled easily without manually updating a related .cursorrules file?

What's the Solution???

Docs option in cursor's AI Chat window.

Here's the location of this feature:
Screenshot of the Option menu in sight

Once you click on the option it shows what documentations are already available.

A lot of docs already available to use directly.

Screenshot of the Docs menu

Search the name of the tech and it will be there. But if you can't find it you can add your own. Just click on Add new Doc button.

This small text box will come up.
Screenshot of the input box for doc URL

Enter the official documentation or API doc URL, the same box will turn into a modal asking for the name of the doc.
Screenshot of the docs details confirmation

Once you confirm, cursor will start indexing the new documents from the URL.
Screenshot of the Indexing the doc

Once the indexation is done, you can see the new doc entry in the Docs option menu.
Screenshot of the Option menu with new doc option visible

Now you can select the new doc next time you are seeking the AI's help. When cursor is collecting data for context, it will include the relevant documentation section related to your query when it is generating a response.
Screenshot of the New Docs being used in response

Imagine building a new tool/framework or something else using a technology not popular enough to be included in the AI model's knowledge.

Having a standard API doc can save a lot of time for you. It can provide standard approaches, and information about the framework or tools it may have, to form a better response.

My take on this

While this is a definite improvement on top of existing utility provided by cursor, it should be used with a grain of salt.

Quality of the final response does depend on the quality of the API docs and the quality of the output from the AI models referencing it.

As I believe true to my heart,
Giving AI access to modify your work is a recipe for disaster, that's just waiting to happen.

But more on that later.

Enjoyed this article? Follow me on X/Twitter or LinkedIn for more of my projects, works, thoughts and general updates!

Have a good day!!!

Top comments (0)

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay