DEV Community

Agus Sudarmanto
Agus Sudarmanto

Posted on

Remote Coding with Herdr + Moshi

1. Set Up Your Mac Host

Open the Terminal on your Mac and install the required packages using Homebrew via the Moshi Guide: 

  1. Tap the Moshi Homebrew repository and trust it: 

bash

   brew tap rjyo/moshi
   brew trust --formula rjyo/moshi/moshi-hook
Enter fullscreen mode Exit fullscreen mode

Use code with caution.

  1. Install moshi-hook, mosh, and tmux: 

bash

   brew install moshi-hook mosh tmux herdr
Enter fullscreen mode Exit fullscreen mode

Use code with caution.

  1. Start the Moshi hook background service: 

.

   brew services start moshi-hook
Enter fullscreen mode Exit fullscreen mode

Use code with caution.

  1. Enable Remote Login (SSH) on macOS:
    • Go to System Settings > General > Sharing and turn on Remote Login so your Mac accepts SSH connections. 

2. Install Herdr and Start a Session on Mac

  1. Install Herdr (if not already installed via Homebrew):

bash

   brew install herdr
Enter fullscreen mode Exit fullscreen mode

Use code with caution.

  1. Navigate to your project directory and start Herdr:

bash

   cd ~/your-project-path
   herdr
Enter fullscreen mode Exit fullscreen mode

Use code with caution.

(Herdr will launch or attach to a background multiplexer session for your AI agents like Claude Code, Codex, or Cursor). 

3. Generate a QR Code for Pairing

Run the Easy Pair command in your Mac terminal to generate a configuration QR code: 

bash

sudo moshi-hook host enable-ssh
moshi-hook host setup
Enter fullscreen mode Exit fullscreen mode

Using Tailscale

tailscale set --ssh=true

# check `it shows as RunSSH: true`
tailscale debug prefs
Enter fullscreen mode Exit fullscreen mode

Use code with caution.

4. Set Up the Moshi App on Android

  1. Download and open the Moshi app from the Google Play Store on your Android device Moshi and Herdr Guide.
  2. Ensure your Android device is on the same local network or connected via a mesh VPN (such as Tailscale) to your Mac Moshi Docs.
  3. Use the Easy Pair option inside the Moshi app to scan the QR code displayed in your Mac terminal Moshi and Herdr Guide.
  4. Once paired, Moshi will connect to your Mac, surface your active Herdr/tmux sessions, and forward agent states (blocked, working, done) directly to your phone Herdr on Mobile.

UnInstall

brew services stop moshi-hook
moshi-hook uninstall
moshi-hook unpair
moshi-hook service uninstall
brew uninstall moshi-hook
brew untap rjyo/moshi
rm ~/.local/bin/moshi-hook ~/.local/bin/moshi
Enter fullscreen mode Exit fullscreen mode

Top comments (0)