
Refactor
Performs regex-based search and replace operations across multiple files in your codebase. Helps automate large-scale code refactoring and migrations with pattern matching and context filtering.
6557 views4Local (stdio)
What it does
- Search for code patterns using regex across files
- Replace code patterns with capture group support
- Filter operations by file type using glob patterns
- Apply changes only within specific code contexts
- Find exact line numbers for pattern matches
Best for
Large-scale codebase migrations and refactoringRenaming functions or variables across multiple filesUpdating import statements and API callsCode cleanup and standardization tasks
Context-aware replacementsSupports capture groups in regex patternsGlob-based file filtering
Tools (2)
code_refactor
Refactor code by replacing search pattern with replace pattern using regex
code_search
Search for code patterns using regex and return file locations with line numbers