HACKER Q&A
📣 jeffreportmill1

Remote Unix CLI on local files?


Tell me, if this idea is (1) useful, (2) possible or (3) already exists: A local command line tool that runs standard Unix CLI on a fully configured remote server but on local files.

So say the local machine only has a process called 'remo' that talks to a 'remo-server' process on a remote machine fully configured with git, gradle, python, java, etc. Then I could do something like this locally:

    > remo git -clone https://github.com/user/MyProject

    > cd MyProject

    > remo gradle build
So with 'remo' I would be able to run all manner of CLI apps that read/write to the local file system without installing anything local. The two processes would be reasonably simple:

The local 'remo' CLI app does this:

    - Open socket to 'remo-server' process on remote machine

    - Execute remote CLI apps

    - Vend file system info to 'remo-server' (LIST, HEAD, GET, PUT, DELETE)
The remote 'remo-server' process does this:

    - Mount a virtual file system

    - Execute processes locally in vfs root dir

    - Feed vfs via communication with 'remo' process
I don't think this is a great business opportunity, and it's probably a little dangerous, but it seems like it could be pretty useful. What do you think?

jeff


  👤 johndoe0815 Accepted Answer ✓
The cpu command from Plan 9 does what you want: http://man.cat-v.org/plan_9/1/cpu

This talk from FOSDEM describes a Linux version of "cpu" written in Go: https://fosdem.org/2022/schedule/event/plan_9_cpu_cmd/


👤 yjftsjthsd-h
That feels like SSH, SSHFS/NFS, or a combination of the two combined with port forwards or something to mount your local directory onto the server. Personally, I've always found the programs that I'm running to be the easiest thing to run wherever I want, and data movement is the problem, so I'm not sure if the latter use case exists in my world, but it could work.