Skip to content

Latest commit

 

History

177 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slingshot

CI crates.io macOS and Linux

Use the CPU, RAM, and GPU of another computer from your own. Run terminal processes securely, with local models coming next.

Starting Slingshot on the powerful machine, linking the laptop, and opening a session

What It Does

  • Remote power. Builds, servers, containers, and coding agents run on the powerful machine, started from your laptop.
  • Feels local. Typing, colors, Ctrl C, and exit codes work as they do on your own machine.
  • Your tools. You keep your own editor, terminal, and browser. Nothing new to learn.
  • Light sync. Only source files are copied. Build output such as target and node_modules stays on the powerful machine.
  • Lasting sessions. slingshot attach opens a terminal that keeps running when you close the laptop.
  • Works anywhere. At home, over a VPN such as Tailscale, or from any network, with no account and no router setup.
  • Secure. The pairing code never crosses the network, each laptop gets its own ssh key, and nothing runs as another user.

Setup

  • The Client is the machine you work on. The Agent is the powerful machine.
  1. Install Slingshot on both machines. It needs Rust and rsync, and the Agent also needs tmux and an ssh server. See A Linux Agent below, or the install guide for other systems.

    cargo install slingshot-cli
  2. On the Agent, start Slingshot. It prints a pairing code.

    slingshot start
  3. On the Client, run the line it printed. Both machines must be on the same network or VPN for this step only.

    slingshot link 192.168.1.9:7433:K7QW9ZR2
  4. From a project folder on the Client, run anything on the Agent:

    slingshot run cargo build

A Linux Agent

  1. Install what Slingshot needs. On Arch Linux:

    sudo pacman -S --needed base-devel rsync tmux openssh rustup
    rustup default stable

    On Ubuntu or Debian:

    sudo apt install build-essential rsync tmux openssh-server curl
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  2. Turn on the ssh server, which the Client uses to log in. It is sshd on Arch and Fedora, and ssh on Ubuntu and Debian.

    sudo systemctl enable --now sshd
  3. Add Rust's folder to your PATH, so the slingshot command is found. Use ~/.zshrc instead if your shell is zsh. Then open a new terminal.

    echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
  4. ssh keys need no setup. slingshot link makes a key for the Client and installs it in the Agent's ~/.ssh/authorized_keys, named so slingshot unlink can remove it. Password login is never used.

Commands

Command Does
slingshot run <command> Copies your changes, then runs the command on the Agent.
slingshot attach Opens a terminal on the Agent that keeps running when you disconnect.
slingshot sync --pull Brings edits made on the Agent back to the Client.
slingshot health Shows the Agent's hardware and use. Add --watch to keep it live.
slingshot ps Lists running jobs. slingshot stop <id> stops one.
  • Every command and option is in USAGE.md.

Menu Bar

  • On a Mac, link offers a menu bar app that shows the Agent's live use and notifies you when a run finishes.

The Slingshot menu bar panel

Status

  • Early. Tested between a Mac and an Arch Linux machine.
  • What works is in the roadmap. Planned work is in the issues.
  • Licensed under MIT or Apache 2.0, at your choice.

Usage · Troubleshooting · Architecture · Contributing

About

run terminal processes securely on another computer

Topics

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages