github.com/replit/upm@v0.0.0-20240423230255-9ce4fc3ea24c/resources/elisp/cask-list-installed.el (about)

     1  ;; This is code that Cask can evaluate which prints a list of all the
     2  ;; currently installed packages to stdout, in "name=version" format.
     3  
     4  (dolist (dir load-path)
     5    (when (string-match "elpa/\\(.+\\)-\\([^-]+\\)" dir)
     6      (princ (format "%s=%s\n"
     7                     (match-string 1 dir)
     8                     (match-string 2 dir)))))