CursorFocus is a tool that automatically analyzes software codebases to generate dynamic context files (Focus.md, .cursorrules) specifically designed to enhance the code comprehension and code generation capabilities of the Cursor AI IDE.
- Automatic Analysis: Identify and analyze software projects
- Context Optimization: Generate
.cursorrulesandFocus.mdfiles to optimize context for AI - Real-time Monitoring: Track project changes and update context files
- Google Gemini AI Integration: Use AI to generate high-quality project context
- Modern Interface: Intuitive and user-friendly command-line interface
- Python 3.8 or higher
- Google Gemini API Key (obtained from Google AI Studio)
- Clone repository:
git clone https://github.com/yourusername/cursorfocus.git
cd cursorfocus
- Install the dependencies:
pip install -r requirements.txt
- Run the application:
python cli.py
-
From the main menu, select the "Setup new project" option
-
Enter the path to the project folder
-
Enter the project name (or leave it blank to use the folder name)
-
Add the Gemini Google API key when prompted
-
Optionally configure advanced options (update interval, scan depth)
-
Select the "Scan for projects" option from the main menu
-
Enter the folder path to scan for projects
-
Select the projects you want to add to the configuration
-
Select the "Start monitoring" option from main menu
-
Select the projects you want to monitor
-
Optionally enable automatic updates when changes are made
-
Press Ctrl+C to stop monitoring
-
Select the "Batch update" option from the main menu
-
Select the projects you want to update
-
Wait for the update to complete
CursorFocus also supports command line parameters for automated tasks:
usage: cli.py [-h] [--setup SETUP] [--monitor] [--scan SCAN] [--update] [--list]
[--batch-update] [--headless]
CursorFocus - Automatically analyze and create context for Cursor AI IDE
optional arguments:
-h, --help show this help message and exit
--setup SETUP, -s SETUP
Setup a project with the given path
--monitor, -m Start monitoring configured projects
--scan SCAN Scan directory for projects
--update, -u Check for updates
--list, -l List configured projects
--batch-update, -b Batch update all projects
--headless Run in headless mode without interactive prompts
cli.py- Main command line interfaceui.py- User interface componentscore.py- Core application functionalityconfig.py- Configuration managementfocus.py- Creating and monitoring context filesanalyzers.py- Analyzing file contentrules_generator.py- Creating .cursorrules filescontent_generator.py- Creating Focus.md filesproject_detector.py- Detecting project types
Contributing to the project is always welcome! Please create an issue or pull request on the GitHub repository.
This project is distributed under the GPL-3.0 License.