diff --git a/docs/API/knut/project.md b/docs/API/knut/project.md
index b8acfb2e..c8819b3a 100644
--- a/docs/API/knut/project.md
+++ b/docs/API/knut/project.md
@@ -22,7 +22,9 @@ import Knut
|array<string> |**[allFilesWithExtension](#allFilesWithExtension)**(string extension, PathType type = RelativeToRoot)|
|array<string> |**[allFilesWithExtensions](#allFilesWithExtensions)**(array<string> extensions, PathType type = RelativeToRoot)|
||**[closeAll](#closeAll)**()|
+|array<object> |**[findInFiles](#findInFiles)**(const QString &pattern)|
|[Document](../knut/document.md) |**[get](#get)**(string fileName)|
+|bool |**[isFindInFilesAvailable](#isFindInFilesAvailable)**()|
|[Document](../knut/document.md) |**[open](#open)**(string fileName)|
||**[openPrevious](#openPrevious)**(int index = 1)|
||**[saveAllDocuments](#saveAllDocuments)**()|
@@ -75,6 +77,25 @@ Returns all files with an extension from `extensions` in the current project.
Close all documents. If the document has some changes, save the changes.
+#### array<object> **findInFiles**(const QString &pattern)
+
+Search for a regex pattern in all files of the current project using ripgrep.
+Returns a list of results (QVariantMaps) with the document name and position ("file", "line", "column").
+
+Example usage in QML:
+
+```js
+let findResults = Project.findInFiles("foo");
+for (let result of findResults) {
+ Message.log("Filename: " + result.file);
+ Message.log("Line: " + result.line);
+ Message.log("Column" + result.column);
+}
+```
+
+Note: The method uses ripgrep (rg) for searching, which must be installed and accessible in PATH.
+The `pattern` parameter should be a valid regular expression.
+
#### [Document](../knut/document.md) **get**(string fileName)
Gets the document for the given `fileName`. If the document is not opened yet, open it. If the document
@@ -86,6 +107,10 @@ If the document does not exist, creates a new document (but don't save it yet).
!!! note
This command does not change the current document.
+#### bool **isFindInFilesAvailable**()
+
+Checks if the ripgrep (rg) command-line tool is available on the system.
+
#### [Document](../knut/document.md) **open**(string fileName)
Opens or creates a document for the given `fileName` and make it current. If the document is already opened, returns
diff --git a/src/core/project.cpp b/src/core/project.cpp
index f6fecd56..aa537fe9 100644
--- a/src/core/project.cpp
+++ b/src/core/project.cpp
@@ -28,6 +28,8 @@
#include
#include
#include
+#include
+#include
#include
#include
#include