remote-cli / remote Goto Github PK
View Code? Open in Web Editor NEWWork with remote hosts seamlessly. Code local, build / execute commands remotely
License: BSD 2-Clause "Simplified" License
Work with remote hosts seamlessly. Code local, build / execute commands remotely
License: BSD 2-Clause "Simplified" License
Currently you can populate the ignore filter from .gitignore
, but this would more often than not also ignore any build/
folder which you rarely want to see on github, but do actually want to pull from the remote.
A current solution for pre-populating the ignore filter per project is to create a .remote.toml
in the project with the [push]
, [pull]
and [both]
already set, omitting [[hosts]]
. This however creates the issue of .remote.toml
now being tracked by git, a footgun which too often would lead to people committing their own hosts.
I therefore suggest adding support for one more file: .remote-default.toml
. The intention is that .remote-default.toml
is tracked by git while .remote.toml
is not. A tool to automatically generate a .remote-default.toml
from the current .remote.toml
, omitting the hosts, would also be nice
This is a great tool, and has been helpful in making remote work more streamlined.
From what i can see, remote -tunnel a:b --tunnel c:d
only forwards c:d
. When working with a remote jupyter notebook on my compute machine, I need both port 8888 for the notebook itself along with port 6006 for tensorboard.
A power user might also want some kind of range syntax, to forward anything between a range of ports. My bet is that -tunnel a-b:c-d
could be a decent syntax for that.
While at it, perhaps the option to pass in raw ssh -o
options could be added? This would allow companies with their infrastructure behind a firewall to use the ProxyJump
option.
Most will never know, and no tool will upgrade properly
Notice this odd asymmetry:
Usage: remote-pull [OPTIONS] [PATH]...
Usage: remote-push [OPTIONS]
We're able to pull files that normally are ignore by specifically naming them with remote-pull
, but are not able to push such files with remote-push
.
An applicable use case would be to push dataset to a remote host, but not index them on each remote
call, checking for differences.
See
Line 242 in 5d0fc94
It seems to only add '
around arguments containing whitespace, but this does not account for shell escaping.
Python includes shlex.quote
for this purpose.
It also seems to filter out empty arguments, which is odd, since ""
is a valid parameter for shell commands.
The environment arguments could also be affected
Currently remote shell behavior is only configurable through host specific specifications in the .remote file.
It would be nice to support global defaults for remote.
When working on various remote hosts, it would be nice to prefix the remote COMMAND
with something. This could either because the remote is shared, warranting prefixing all command with nice -n 5
, or because the command needs to run inside some docker container with docker run
, or because it has to queued in some job system such as SLURM.
Specifically, the command here would be nice to if it could be prefixed.
One way this could be configured in .remotes.toml
would be:
[general]
cmd_prefix = ["nice", "-n", "5"]
[[hosts]]
host = "..."
cmd_prefix = ["docker", "run", "-it", "MYIMAGE", "-v", "/some/folder:/some/path"]
[[hosts]]
host = "..."
cmd_prefix = ["srun", "--account=foobar", "--mem=4g", "--cpus-per-task=4"]
[[hosts]]
host = "..."
cmd_prefix = [] # no prefix, ignores the default in [general]
This way enables you to have both a default prefix, with the option to override it per remote host
It'd be handy if there was an option on remote-init
to copy the contents of .gitignore
to .remoteignore
. An alternative would be to exclude gitignored files from the regular rsync (or add a setting in .remote
to do it) and have an option to include those files in remote-push
/remote-pull
, as the one place I can think ignore them might be annoying is if you have editor configurations that you don't check in, but do want to keep in sync on both machines.
Steps to reproduce:
remote-init remote-host:~/remote-test
remote pwd
./.remote_cmd_972.sh: line 8: cd: /home/user/~/remote-test: No such file or directory
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.