Importing a library from a GitHub repository

I have a library on github, it doesn’t have a readme file, how do I get my cursor to use it? When I add a link to github in the docs section, it only gets the repository folders but not the files themselves. How can i make it get the files?

I read that you can use codebase, how do I connect the codebase from one project to another and use as docs?

Hey, codebase search refers to opening your code in Cursor locally, and using the @codebase helper in the chat to find codebase-wider context.

Short of downloading the desired library form GitHub and using the Composer to learn it’s structure, there is no way of indexing a GitHub repository as context for Cursor right now.

I recommend providing the context yourself. Clone the repo, have cursor summarize the package. Run the command “tree” to get the folder structure, then pass the summary + tree to your main package and say “use it” and it will now understand the lay out. Though in terms of getting that library, you may need to use Maven or JitPack to actually bring it down as a dependency. Otherwise your best bet is just to build it locally

1 Like