Description
grasp is a tool for searching Clojure code by pattern, using clojure.spec regular expressions. You write a spec that describes the code shape you want, and grasp returns every matching form in your source files, classpath or jar files. It is inspired by grape and is used by the author as a research tool for work on sci, clj-kondo and Clojure tickets. The API provides a grasp function that accepts a file, a directory, a jar, a classpath string or a collection of paths. Directories are scanned recursively for .clj, .cljs and .cljc files. A grasp-string function searches a string, and resolve-symbol and rsym work with aliases and refers, so you can match fully qualified symbols. The README shows examples: finding reify forms with more than one interface, finding every use of clojure.set/difference, and finding calls to clojure.core/map with one argument. Keywords need special wrapping because they cannot carry metadata. The README labels the project very alpha, and says the API will almost certainly change.…
Highlights
- Search Clojure code with clojure.spec regex patterns
- Scans files, directories, jars and classpaths
- Resolves aliases and refers to match symbols
- Matches forms such as reify and function calls
- Marked very alpha by its author
Ratings & Reviews
No ratings yet
Be the first to rate Grasp.
People also visit
Grasp FAQ
What is grasp?
A tool that finds patterns in Clojure code, written using clojure.spec regexes, and inspired by grape.
Who uses it?
The author uses it as a research tool for sci, clj-kondo and Clojure tickets.
Does it search whole projects?
Yes. You can pass a directory, which is searched recursively, a jar, a classpath string, or a collection of paths.
Is it stable?
No. The README calls the project very alpha and says the API will almost certainly change.
How do I add it to a project?
Add the dependency to your deps.edn file, as the README's dependency section shows.
What are the best Grasp alternatives?
Popular alternatives to Grasp include Cljdoc, Clojure Land and grep. See all Grasp alternatives












