morph-search
Fast codebase search via WarpGrep (20x faster than grep)
Security Assessment
About morph-search
The morph-search skill provides a high-speed, AI-powered codebase search using WarpGrep, a tool that performs text and regular expression searches 20 times faster than traditional tools like grep. This skill addresses the challenge of searching through large codebases, where traditional search methods can become slow and inefficient. By leveraging WarpGrep, users can perform faster and more efficient searches across their projects, improving productivity and workflow speed.
Main features of morph-search include the ability to search for code patterns, function names, and variables, as well as the capability to edit files programmatically. Users can also apply regex queries for more advanced searches. This skill supports operations such as searching within specific directories, finding code patterns across large codebases, and editing files directly from the command line. The ability to quickly identify and modify code makes morph-search a powerful tool for developers, particularly when working with large and complex projects.
Morph-search is ideal for developers, code maintainers, and anyone who needs to interact with large codebases or automate code modifications. It is particularly useful for projects where speed and accuracy are essential, such as software development, DevOps, and code refactoring tasks. The integration of WarpGrep ensures that even the largest codebases can be searched and edited with minimal delay, providing an effective solution for codebase management and optimization.
FAQ
How do I use morph-search to search for code patterns?
You can search for code patterns by running the command `uv run python -m runtime.harness scripts/mcp/morph_search.py --search 'pattern' --path 'directory'`, replacing 'pattern' with your search query and 'directory' with the directory you want to search.
Can I use regular expressions with morph-search?
Yes, you can use regular expressions by providing a regex pattern in the `--search` parameter. For example, `--search 'def.*login'` will search for all function definitions containing 'login'.
Is there a way to edit files directly with morph-search?
Yes, you can edit a file using the `--edit` parameter followed by the file path and the `--content` parameter with the new content. For example: `--edit '/path/to/file.py' --content 'new content'`.
What are the system requirements for using morph-search?
Morph-search requires the 'morph' server to be running and configured in the `mcp_config.json` file with a valid `MORPH_API_KEY`.
What is the difference between morph-search and ast-grep?
Morph-search is optimized for fast text and regex searches, while ast-grep focuses on structural code searches and understands syntax. Morph-search is generally faster for text-based queries.
Install morph-search
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
parcadei/Continuous-Claude-v2