Skip to content

chnthkksn/homebrew-devup

Repository files navigation

devup

devup banner

Local-first remote development CLI for VPS workflows.

devup creates an ephemeral Mutagen sync, opens SSH port forwards, optionally runs a remote command, and cleans everything up on exit/CTRL+C.

Features

  • Ephemeral Mutagen sync session with configurable sync mode (default: one-way-safe)
  • Waits for initial sync to complete before opening the SSH shell
  • Repeatable -p/--port mappings (3000 or 3000:3001)
  • Optional SSH identity file via -i/--identity
  • Optional local path override via -l/--local
  • Optional remote command via --cmd
  • Auto-reconnect on disconnect via --reconnect
  • Remote target directory auto-create (mkdir -p)
  • Interactive shell starts in the target remote directory
  • Automatic cleanup of Mutagen session on exit or interruption
  • Reads .gitignore and .mutagenignore for sync exclusions
  • Startup dependency checks for ssh and mutagen

Requirements

  • Go 1.25+
  • Mutagen
  • OpenSSH client

Install Mutagen:

brew install mutagen-io/mutagen/mutagen

or:

sudo apt install mutagen openssh-client

Build

make build

Install (system-wide)

sudo make install

By default this installs to /usr/local/bin/devup.

To use a different prefix:

sudo make install PREFIX=/opt/devup

Uninstall

sudo make uninstall

Homebrew Tap

Use the tap release guide in docs/homebrew-tap.md. Formula template is in Formula/devup.rb.

Install via Homebrew tap:

brew tap mutagen-io/mutagen
brew tap chnthkksn/devup
brew install devup

Uninstall:

brew uninstall devup
brew untap chnthkksn/devup

Usage

devup [user@]host:/remote/path [flags]

Flags:

  • -p, --port <mapping> Port forward (repeatable)
  • -l, --local <path> Local folder to sync (default: current directory)
  • -i, --identity <file> SSH identity file (private key)
  • --cmd <command> Command to run on remote after connect
  • --sync-mode <mode> Mutagen sync mode (default: one-way-safe)
  • --reconnect Auto-reconnect SSH on disconnect
  • --version Print version and exit

Sync modes: two-way-safe, two-way-resolved, one-way-safe, one-way-replica

Examples:

# Same local/remote port
devup ubuntu@host:/apps/api -p 3000

# Different local:remote port
devup ubuntu@host:/apps/api -p 3000:3001

# Multiple ports
devup ubuntu@host:/apps/api -p 3000 -p 5173:5173 -p 27017

# Local path override
devup ubuntu@host:/apps/api -l ~/projects/api -p 3000

# Custom SSH identity file
devup ubuntu@host:/apps/api -i ~/.ssh/my_key

# Run remote command and auto-reconnect on crash
devup ubuntu@host:/apps/api -p 3000 --cmd "npm run dev" --reconnect

# Two-way sync (changes on remote sync back to local)
devup ubuntu@host:/apps/api --sync-mode two-way-safe

Development

Run tests:

make test

Release

Automate tagging and GitHub release creation:

scripts/release.sh v0.2.0

The script validates dependencies, checks for a clean git tree, runs tests, pushes the tag, and creates a GitHub release with autogenerated notes.

License

MIT. See LICENSE.

About

Local-first remote development CLI for VPS workflows using Mutagen sync and SSH port forwarding, with ephemeral sessions and automatic cleanup.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors