 
 (require 'core-cli)
 
-(defun doom--run (command &optional yes)
+;;;###autoload
+(defun doom-cli-run (command &rest _args)
   (let* ((default-directory doom-emacs-dir)
-         (doom-auto-accept yes)
          (buf (get-buffer-create " *bin/doom*"))
-         (wconf (current-window-configuration))
+         (doom-message-backend 'ansi)
          (ignore-window-parameters t)
          (noninteractive t)
          (standard-output

(defun doom//autoloads (&optional yes)
  "TODO"
  (interactive "P")
  (doom--run "autoloads" yes))

;;;###autoload
(defun doom//update (&optional yes)
  "TODO"
  (interactive "P")
  (doom--run "update" yes))

;;;###autoload
(defun doom//upgrade (&optional yes)
  "TODO"
  (interactive "P")
  (doom--run "upgrade" yes)
  (when (y-or-n-p "You must restart Emacs for the upgrade to take effect. Restart?")
    (doom/restart-and-restore)))


(defun doom//install (&optional yes)
  "TODO"
  (interactive "P")
  (let ((doom-auto-accept yes))
    (doom-cli-run "install")))

;;;###autoload
(defun doom//autoremove (&optional yes)
  "TODO"
  (interactive "P")
  (let ((doom-auto-accept yes))
    (doom-cli-run "autoremove")))

;;;###autoload
(defun doom//refresh (&optional yes)
  "TODO"
  (interactive "P")
  (let ((doom-auto-accept yes))
    (doom-cli-run "refresh")))
