Change .cursor directory to project-local by default

- Modify installer.py and utils.py to use current working directory for .cursor
- Update comments to reflect project-local .cursor directory behavior
- Adjust backup creation to store backups in .cursor/backups directory
- Ensure consistent project-local configuration and rule management
This commit is contained in:
sanjeed5
2025-03-01 00:01:55 +05:30
parent e4e38ffca6
commit 1edd6192ab
2 changed files with 17 additions and 16 deletions
+6 -6
View File
@@ -66,19 +66,19 @@ def calculate_content_hash(content: str) -> str:
def get_cursor_dir() -> Path:
"""
Get the path to the .cursor directory.
Get the path to the project's .cursor directory.
Returns:
Path to the .cursor directory
Path to the project's .cursor directory
"""
return Path.home() / ".cursor"
return Path.cwd() / ".cursor"
def get_rules_dir() -> Path:
"""
Get the path to the .cursor/rules directory.
Get the path to the project's .cursor/rules directory.
Returns:
Path to the .cursor/rules directory
Path to the project's .cursor/rules directory
"""
return get_cursor_dir() / "rules"
@@ -87,7 +87,7 @@ def get_config_file() -> Path:
Get the path to the configuration file.
Returns:
Path to the configuration file
Path to the configuration file in the project's .cursor directory
"""
return get_cursor_dir() / "rules-cli-config.json"