             :keymap helm-ag-map
             :history 'helm-ag--helm-history))))
 
-;;;###autoload
-(defun +helm/project-search (arg)
-  "Performs a project search using the first available search backend from a
-list of: ripgrep, ag, pt, git-grep and grep. If ARG (universal argument),
-preform search from current directory."
+(defun +helm--get-command (format)
+  (cl-loop for tool in (cl-remove-duplicates +helm-project-search-engines :from-end t)
+           if (executable-find (symbol-name tool))
+           return (intern (format format tool))))
+
+;;;###autoload
+(defun +helm/project-search (&optional all-files-p)
+  "Performs a project search from the project root.
+
+Uses the first available search backend from `+helm-project-search-engines'. If
+ALL-FILES-P (universal argument), include all files, even hidden or compressed
+ones, in the search."
   (interactive "P")
   (call-interactively
-   (or (cl-loop for tool in (cl-remove-duplicates +helm-project-search-engines :from-end t)
-                if (executable-find (symbol-name tool))
-                return (intern (format "+helm/%s%s" tool (if arg "-from-cwd" ""))))
-       (if arg
-           #'+helm/grep-from-cwd
-         #'+helm/grep))))
+   (or (+helm--get-command "+helm/%s")
+       #'+helm/grep)))
+
+;;;###autoload
+(defun +helm/project-search-from-cwd (&optional all-files-p)
+  "Performs a project search recursively from the current directory.
+
+Uses the first available search backend from `+helm-project-search-engines'. If
+ALL-FILES-P (universal argument), include all files, even hidden or compressed
+ones."
+  (interactive "P")
+  (call-interactively
+   (or (+helm--get-command "+helm/%s-from-cwd")
+       #'+helm/grep-from-cwd)))
+
 
 ;; Relative to project root
-;;;###autoload
-(defun +helm/rg (all-files-p &optional query directory)
-  "TODO"
-  (interactive "P")
-  (+helm-file-search 'rg :query query :in directory :all-files all-files-p))
-
-;;;###autoload
-(defun +helm/ag (all-files-p &optional query directory)
-  "TODO"
-  (interactive "P")
-  (+helm-file-search 'ag :query query :in directory :all-files all-files-p))
-
-;;;###autoload
-(defun +helm/pt (all-files-p &optional query directory)
-  "TODO"
-  (interactive "P")
-  (+helm-file-search 'pt :query query :in directory :all-files all-files-p))
-
-;;;###autoload
-(defun +helm/grep (all-files-p &optional query directory)
-  "TODO"
-  (interactive "P")
-  (+helm-file-search 'grep :query query :in directory :all-files all-files-p))
-
-;; Relative to current directory
-;;;###autoload
-(defun +helm/rg-from-cwd (recurse-p &optional query)
-  "TODO"
-  (interactive "P")
-  (+helm-file-search 'rg :query query :in default-directory :recursive recurse-p))
-
-;;;###autoload
-(defun +helm/ag-from-cwd (recurse-p &optional query)
-  "TODO"
-  (interactive "P")
-  (+helm-file-search 'ag :query query :in default-directory :recursive recurse-p))
-
-;;;###autoload
-(defun +helm/pt-from-cwd (recurse-p &optional query)
-  "TODO"
-  (interactive "P")
-  (+helm-file-search 'pt :query query :in default-directory :recursive recurse-p))
-
-;;;###autoload
-(defun +helm/grep-from-cwd (recurse-p &optional query)
-  "TODO"
-  (interactive "P")
-  (+helm-file-search 'grep :query query :in default-directory :recursive recurse-p))
-
+;;;###autoload (autoload '+helm/rg "completion/helm/autoload/helm")
+;;;###autoload (autoload '+helm/rg-from-cwd "completion/helm/autoload/helm")
+;;;###autoload (autoload '+helm/ag "completion/helm/autoload/helm")
+;;;###autoload (autoload '+helm/ag-from-cwd "completion/helm/autoload/helm")
+;;;###autoload (autoload '+helm/pt "completion/helm/autoload/helm")
+;;;###autoload (autoload '+helm/pt-from-cwd "completion/helm/autoload/helm")
+;;;###autoload (autoload '+helm/grep "completion/helm/autoload/helm")
+;;;###autoload (autoload '+helm/grep-from-cwd "completion/helm/autoload/helm")
+
+(dolist (engine (cl-remove-duplicates +helm-project-search-engines :from-end t))
+  (defalias (intern (format "+helm/%s" engine))
+    (lambda (all-files-p &optional query directory)
+      (interactive "P")
+      (+helm-file-search engine :query query :in directory :all-files all-files-p))
+    "TODO")
+  (defalias (intern (format "+helm/%s-from-cwd" engine))
+    (lambda (all-files-p &optional query directory)
+      (interactive "P")
+      (+helm-file-search engine :query query :in default-directory :all-files all-files-p))
+    "TODO"))

         (helm-ag--default-directory directory)
         (helm-ag--default-target (list directory))
         (engine (or engine
                     (cl-loop for tool in +helm-project-search-engines
                              if (executable-find (symbol-name tool))
                              return tool)
                     (and (or (executable-find "grep")
                              (executable-find "git"))
                          'grep)
                     (error "No search engine specified (is ag, rg, pt or git installed?)")))
         (query (or query
                    (when (use-region-p)
                      (let ((beg (or (bound-and-true-p evil-visual-beginning) (region-beginning)))

                    ""))
         (prompt (format "%s%%s %s"
                         (symbol-name engine)
                         (cond ((file-equal-p directory default-directory)
                                "./")
                               ((file-equal-p directory project-root)
                                (projectile-project-name))
                               ((file-relative-name directory project-root)))))
         (command
          (pcase engine
            (`ag   (+helm-ag-search-args all-files recursive))
            (`rg   (+helm-rg-search-args all-files recursive))
            (`pt   (+helm-pt-search-args all-files recursive))
            ('grep (+helm--grep-search directory query prompt all-files recursive)
                   (cl-return t))))
         (helm-ag-base-command (string-join command " ")))
    (if (and (eq engine 'ag)
             (equal query ""))
