Files
doomemacs/modules/tools/upload/README.org
2025-09-25 15:55:29 -04:00

3.1 KiB

:tools upload

Description   unfold

Uses ssh-deploy to map a local folder to a remote one.

󰝗 The ssh-deploy plug-in for Emacs makes it possible to effortlessly deploy local files and directories to remote hosts via Tramp (including but not limited to SSH, SFTP, FTP). It tries to provide functions that can be easily used by custom scripts.

The idea for this plug-in was to mimic the behavior of PhpStorm deployment functionality. —ssh-deploy README

Module flags

This module has no flags.

Hacks

No hacks documented for this module.

TODO Changelog

This module does not have a changelog yet.

Installation

Enable this module in your doom! block.

This module has no external requirements.

Usage

There are three ways to map a local directory to a remote one:

  1. With a .dir-locals.el file at the root of your project/directory. E.g.

    ((nil . ((ssh-deploy-root-local . "/local/path/to/project/")
             (ssh-deploy-root-remote . "/ssh:user@server:/remote/project/")
             (ssh-deploy-on-explicit-save . 1))))
  2. In file-local variables in the commented header at the top of a file:

    ;; -*- ssh-deploy-root-remote: "/ssh:user@server:/remote/project/"; ssh-deploy-on-explicit-save: 1 -*-

    Or in a commented block at the bottom of the file:

    ;; -*-
    ;; Local Variables:
    ;; ssh-deploy-root-local: "/local/path/to/project/"
    ;; ssh-deploy-root-remote: "/ssh:user@server:/remote/project/"
    ;; ssh-deploy-on-explicit-save: 1
    ;; End:
  3. Manually, on a per-buffer basis, with the M-x +upload/register-remote command. Use M-x +upload/unregister-all-remotes to undo all manual remotes.

󰐃 ssh-deploy-root-local is optional, and will resort to doom-project-root if unspecified.

TODO Configuration

󱌣 This module's configuration documentation is incomplete. Complete it?

Check out Deployment configuration examples for some ideas of what's possible.

Troubleshooting

root-local and root-remote must match

The final directory names much match:

((nil . ((ssh-deploy-root-local . "/local/path/to/example-project/")
         (ssh-deploy-root-remote . "/ssh:user@server:/remote/example-project/")

Frequently asked questions

This module has no FAQs yet. Ask one?

TODO Appendix

󱌣 This module has no appendix yet. Write one?