Full picture with @codebase symbol
Hey. Welcome back! lets talk about the @codebase command. By the end of this lesson, you’ll know how to use @codebase to get a full picture of your project. This command isn’t just about analyzing a single file—it helps you look at everything at once. Whether you’re improving code, finding bugs, or cleaning things up, @codebase has got you covered. Let’s break it down. The @codebase command lets Cursor scan your whole project and get context from all the files, instead of just focusing on one. It’s super useful when you need to make changes that affect more than one part of your project. Start with the recipe app from the previous lesson. Open the composer with CMD+I, type @codebase and lets ask what this project is about. Cursor will scan everything and gives you a project overview. It’s like having someone look over your shoulder, but instead of only seeing one file, it can see the whole project and give advice based on that. Here is another example: Let’s say your app is running slower than you’d like. Instead of going through each file one by one, you type: @codebase find performance bottlenecks. Before you hit enter you can try some other model like the o1-mini or o1-preview which is known for a more detailed answer based on our question. Cursor will scan the whole codebase, point out inefficient functions or database queries, and give suggestions on how to fix them. When to Use @codebase: Project-wide changes: Anytime you need to make changes that affect multiple files, this command is your go-to. Understanding dependencies: If you need to see how different parts of your project are connected, @codebase will give you that insight. Security scans: You can ask @codebase to scan your entire project for potential security vulnerabilities. For smaller projects you can also just reference @codebase instead of file or folder tagging which is easier to use. Alright, thanks for the session! If you need anything else, feel free to reach out. Happy coding!