Skip to content
Edith

Docs

Command reference

ed machines files

ed machines files is a file manager for a machine you have already told Edith about. It lists directories, moves files in both directions, and runs the same copy, move, rename, trash, search and duplicate operations the app's Files pane runs. Reach for it when you want to look at or rearrange something on another box without opening a shell there, and when you want the result in JSON.

Listing and creating folders behave exactly as they do in the Files pane: home directories, hidden files, missing parents and connection failures are handled the same way in both.

Everything here except undo is a native remote command sent over the SSH connection Edith already holds. macOS and Linux use POSIX tools, while Windows uses encoded PowerShell commands and Windows paths such as C:\Users\alex\Documents. Nothing is installed on the machine and Edith does not have to be running. Undo is the exception because the history it reverses lives in the running app.

At a glance

Command What it does
ed machines files ls List a remote directory. The default subcommand. Aliased list.
ed machines files get Download one file from the machine.
ed machines files get-many Safely download several files into a local directory.
ed machines files transfer Copy several files between two machines.
ed machines files preview Print the first 400 KiB of a remote text file.
ed machines files launch Download a remote file and open it in its default Mac app.
ed machines files reveal Download a remote file and reveal it in Finder.
ed machines files put Upload one file to the machine.
ed machines files cp Copy paths into a directory there.
ed machines files mv Move paths into a directory there.
ed machines files rename Rename one path in place.
ed machines files mkdir Make a directory, parents included.
ed machines files rm Move paths to the machine's trash, or delete them outright.
ed machines files search Find files by name under a directory.
ed machines files info Measure a file or directory recursively.
ed machines files duplicate Copy a file beside itself, the way the window does.
ed machines files undo Undo the last move or rename an open Files pane made.

How these reach the machine

Every verb but undo resolves the machine, opens or reuses the shared ControlMaster socket, and sends one command line. A machine resolves by display name, SSH alias, id, or any unambiguous prefix, case-insensitively; an unknown or ambiguous name exits 3 before anything is sent. A machine that cannot be reached exits 4 with what ssh said:

Output
$ ed machines files ls devboxerror: could not reach Devbox: Connection refusedhint: check the machine is awake and reachable, then retry

Two spellings put the machine in different places, and both work:

Output
ed machines files ls devbox /var/loged machines devbox files ls /var/log

ed devbox files ls is not one of them. A machine name in the first position is shorthand for ed machines exec, so that line runs files ls as a command on the machine and the machine says it does not exist.

Paths are quoted individually before they are sent, so spaces and shell metacharacters survive intact. Windows uses PowerShell literal path operations, which also avoid wildcard expansion. The machine never expands a glob for you: ed machines files cp devbox '/var/log/*.log' /tmp looks for a file literally named *.log. Quote the whole line through ed devbox 'cp /var/log/*.log /tmp' when you want a POSIX remote shell to expand it. The search operation performs its own case-insensitive name matching on every supported platform.

A relative path is resolved by the machine against the SSH login directory, normally the home directory. The working directory ed devbox cd remembers belongs to ed machines exec.

Commands

Exit codes

Code What produced it
0 The command did what it says. Also the --delete dry run of rm, a search with no matches, info on a path that does not exist, mkdir on a directory that is already there, and ls of an empty directory.
1 The machine ran the command and it failed: a cp, mv, mkdir or rm the account is not allowed to make, a rename onto a name already taken, a duplicate that could not be written, a get or put that failed its checks, an ls that could read nothing. Also the local refusals: fewer than two paths for cp or mv, no path for rm, a slash in a rename name.
2 --limit of zero or less on search. Also any parse failure: an unknown flag, a missing positional, a --limit that is not a number.
3 No machine matches the name, more than one does, or no machines are configured at all. Also put when there is no local file at the path given.
4 The machine could not be reached, or the SSH transport failed part way through a command. Also undo when no open Files window for the machine has anything to undo.

Notes and gotchas

undo needs an open Files window for the machine, because the history it reverses lives there. The rest use the SSH connection the app and ed share, and reuse an open connection when it is there.

Nothing here tells a running Edith what changed. A Files pane showing the directory you just rearranged from the command line keeps showing the old listing until it is refreshed with Command-R. The traffic only goes the other way, through undo.

The timeouts are fixed and worth knowing when a machine is slow: 15 seconds for the $HOME probe, 20 for the file-kind probe put makes, 30 for the stat check after an upload, 45 for a directory listing or final staged publication, 120 for search and info, 300 for cp, mv, rename, mkdir, rm and duplicate, and 20 for the undo reply. The byte transfer itself has no total duration cap, because a slow file is not necessarily a broken one.

A failed command and a connection that cannot be opened are different exit codes. A command the machine ran and rejected exits 1 with the machine's own message appended, while a connection that cannot be established exits 4. Once a multi-file transfer begins, individual failures are collected into its one outcome and any failed item makes the final status 1.

--json never changes what happens on the machine, only what is printed. Every verb here prints exactly one document per invocation, with object keys sorted, diagnostics on stderr only, and no streaming mode. search is the one whose document is an array rather than an object, and rm's dry run is the one whose document has a different shape from its success. Transfer progress on get-many and transfer is suppressed by --json, because it is stderr furniture rather than stdout data.

--yes confirms --replace for get, get-many, put, transfer, cp and mv. It also confirms rm --delete. Passing it without the matching mode changes nothing.

The Files window and the CLI share the same transfer, search, info, duplicate, undo, rename and rm operation contracts. Their paths, timeouts and safety rules therefore stay aligned. Permanent removal previews without connecting and does not run until --yes is present. The window presents the equivalent confirmation before it asks the same operation executor to delete immediately.

The remote trash is the freedesktop directory under the login home, whatever the machine's desktop environment would normally use. On a machine with no desktop at all the files still land in ~/.local/share/Trash/files, which is a fine place to find them but not somewhere anything will empty for you.

Shell completion knows this group only as far as the names it already holds: after ed machines files it offers the verbs, and in the machine slot it offers the configured machines. Remote paths are not completed at all, so Tab where a path goes offers nothing of its own and never dials the machine. The completion that does ask a machine, for command names and paths, belongs to the ed <machine> ... shorthand, and even there only when a ControlMaster socket for that machine is already open.

Where to go next