🚧 (Alpha stage software) Library and tooling that supports remote filesystem and process operations. 🚧
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Chip Senkbeil 65453d3f18
Minor documentation changes and update dockerfile to build from source
2 years ago
.github/workflows Add --ssh-backend support to cli and bump to 0.16.3 2 years ago
distant-core Fix watch tests for linux & bump dependency versions (#104) 2 years ago
distant-ssh2 Bump to 0.16.4 and fix #80 and fix #102 2 years ago
src Bump to 0.16.4 and fix #80 and fix #102 2 years ago
tests Fix watch tests for linux & bump dependency versions (#104) 2 years ago
.gitignore Add native ssh (#57) 3 years ago
BUILDING.md Minor documentation changes and update dockerfile to build from source 2 years ago
CHANGELOG.md Minor documentation changes and update dockerfile to build from source 2 years ago
Cargo.lock Fix watch tests for linux & bump dependency versions (#104) 2 years ago
Cargo.toml Fix watch tests for linux & bump dependency versions (#104) 2 years ago
Dockerfile Minor documentation changes and update dockerfile to build from source 2 years ago
README.md Add filesystem watching & remove distant-lua (#102) 2 years ago

README.md

distant - remotely edit files and run programs

Crates.io Docs.rs RustC 1.51+

Operating System Status
MacOS (x86, ARM) MacOS CI
Linux (x86) Linux CI
Windows (x86) Windows CI

🚧 (Alpha stage software) This program is in rapid development and may break or change frequently! 🚧

Details

The distant binary supplies both a server and client component as well as a command to start a server and configure the local client to be able to talk to the server.

Additionally, the core of the distant client and server codebase can be pulled in to be used with your own Rust crates via the distant-core crate.

Installation

Prebuilt Binaries

If you would like a pre-built binary, check out the releases section.

Building from Source

If you have cargo installed, you can directly download and build the source via:

cargo install distant

Alternatively, you can clone this repository and build from source following the build guide.

Examples

Launch a remote instance of distant. Calling launch will do the following:

  1. Ssh into the specified host (in the below example, my.example.com)
  2. Execute distant listen --host ssh on the remote machine
  3. Receive on the local machine the credentials needed to connect to the server
  4. Depending on the options specified, print/store/use the session settings so future calls to distant action can connect
# Connects to my.example.com on port 22 via SSH to start a new session
# and print out information to configure your system to talk to it
distant launch my.example.com

# NOTE: If you are using sh, bash, or zsh, you can automatically set the
        appropriate environment variables using the following
eval "$(distant launch my.example.com)"

# After the session is established, you can perform different operations
# on the remote machine via `distant action {command} [args]`
distant action copy path/to/file new/path/to/file
distant action spawn -- echo 'Hello, this is from the other side'

License

This project is licensed under either of

Apache License, Version 2.0, (LICENSE-APACHE or apache-license) MIT license (LICENSE-MIT or mit-license) at your option.