Documentation
¶
Overview ¶
Package rules provides functionality for managing Cursor rule files.
The package supports: - Adding rule files to the user's ~/.kool/rules/files directory - Listing available rule files - Using rule files by copying them to the current project's .cursor/rules directory - Removing rule files from the ~/.kool/rules/files directory - Renaming rule files in the ~/.kool/rules/files directory - Printing the content of rule files - Entering an interactive shell for working with rules
When running 'kool rule' without arguments, an interactive bash sub-shell is launched with a custom prompt showing the rules directory. In this shell, users can execute all standard bash commands plus special rule management commands like 'use <file>' to apply a rule.
Index ¶
- func Add(rulePath string) (string, error)
- func EnterSubshell() error
- func Get(ruleName string) error
- func GetCursorRulesDir() (string, error)
- func GetRulesDir() (string, error)
- func Handle(args []string) error
- func List() ([]string, error)
- func Move(srcName, destName string) error
- func Remove(ruleName string) error
- func Use(ruleName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add copies a rule file to the ~/.kool/rules/files directory If a file with the same name already exists, a timestamp will be appended to make it unique
func EnterSubshell ¶ added in v0.0.15
func EnterSubshell() error
EnterSubshell creates and enters a bash sub-shell with a custom prompt and special 'use' command for rule management
func Get ¶ added in v0.0.15
Get prints the content of a rule file from the ~/.kool/rules/files directory
func GetCursorRulesDir ¶
GetCursorRulesDir returns the path to the .cursor/rules directory in the current working directory
func GetRulesDir ¶
GetRulesDir returns the path to the .kool/rules directory in the user's home directory
Types ¶
This section is empty.