A local-first remote development platform. Work with remote files and commands as if they were local.

Note: This project is still in alpha development. Breaking changes may be made. Issues and contributions are welcome!
Supported Platforms
| Local (client) | Remote (target) |
|---|
| macOS | yes | |
| Linux | yes | yes |
Install
curl --proto '=https' --tlsv1.2 -sSf https://graft.run/install.sh | sh
Options: --install-dir <dir>, --version <tag>
Quick Start
1. Activate shell integration (add to your shell rc file):
# bash: ~/.bashrc, zsh: ~/.zshrc
eval "$(graft activate zsh)"
This lets graft track your working directory so commands like run, shell, sync, and forward can automatically detect which connection to use.
2. Start the daemon:
graft daemon service install # auto-start on login
The daemon runs in the background and manages your remote connections.
3. Connect to a remote machine:
graft connect . user@host:~/project --sync
This connects your current directory (.) to ~/project on the remote host, with --sync to enable bidirectional file synchronization. You can also use graft init to save connection settings to a graft.yaml file for repeated use.
4. Use it from within the connected directory:
graft run make build # run a command remotely
graft shell # open a remote shell
graft sync # sync files to the remote
graft forward go make # forward commands to the remote
All of these commands detect the connection from your current directory. You can also specify a connection explicitly with --to <connection>, or pin a connection to your shell session with graft use <connection>.
Interactive commands and shells persist on the remote if your terminal or connection dies, and they can be picked back up:
graft run -d npm run dev # start a command detached; prints its id
graft ps # list commands the remote daemons manage
graft attach <id> # re-attach, replaying recent output
graft detach <id> # disconnect its client; the command keeps running
graft kill <id> # terminate a command's process group
If the network drops mid-command (laptop sleep, SSH blip), attached commands resume automatically once the connection reconnects, and disconnected commands are held for up to an hour awaiting re-attach. Interactive (pty) sessions replay the most recent 1MiB per stream on resume, dropping older history tmux-style; piped commands get TCP-like semantics instead, no output is ever dropped, and the command blocks in write once the buffer fills until its consumer returns.
Signals sent to graft during a run or attach (Ctrl-C, SIGTERM, SIGQUIT, SIGUSR1/2) are forwarded to the remote command, like a local foreground process. Closing the terminal (SIGHUP) detaches instead of forwarding, so kept commands survive it; use graft detach <id> from another terminal to detach deliberately.
Use with Claude Code
If you use Claude Code, install the graft plugin so Claude knows how to use graft for remote development. It covers running commands, syncing files, forwarding ports, and diagnosing connection issues:
/plugin marketplace add edaniels/graft
/plugin install graft@graft
The plugin auto-triggers when you're working in a graft-managed directory, so you can keep using Claude Code normally; it will reach for graft run, graft sync, and graft status instead of raw ssh/scp where appropriate. It also installs a SessionStart hook that automatically tells Claude which connection, shimmed commands, and port forwards apply to the directory it started in, so it doesn't have to guess or ask.
Commands