Before I format a laptop, switch machines or try a new Linux distro, I run one command.
Then I stop worrying.
It wasn't always like this.
The ritual I used to dread
Every new machine meant the same ritual:
- Reinstall Homebrew and the dozens of packages I forgot I even had
- Hunt down the right versions of Node and Python
- Dig up my dotfiles from an old repo, a USB drive or a message I sent to myself
- Tweak my terminal until it finally felt like mine again
By the end of the day, I was almost back to where I started.
And a week later, I'd still find something missing.
So I built the command I wish I'd had all along. It's called dudu.
Meet dudu
dudu is an open source CLI that turns your entire dev environment into something you can back up and restore.
One command captures your setup.
One command brings it back on a new machine.
No config repo to maintain. No install scripts to write. No "I'll document this later" that never happens.
fontnelle
/
dudu
🐣 New machine, same setup. Back up your packages, runtimes, dotfiles and terminal in one command, restore them in another. macOS and Linux.
dudu
Back up your whole dev setup in one command and put it back on a new machine in another. Packages, runtimes, dotfiles and terminal, on macOS and Linux.
Features
- Everything you installed from the terminal: Homebrew, apt/dnf/pacman, Node versions, global npm/pnpm/yarn/bun packages, pyenv/pipx/uv, gems, cargo, go tools, VS Code and Cursor extensions
- Your terminal, as it was: zsh, Oh My Zsh and plugins, Powerlevel10k/Starship, Terminal.app and iTerm2 profiles, Ghostty, Kitty, WezTerm, Nerd Fonts, git and SSH config
- Saved where you already are: a local folder, iCloud Drive, Google Drive and Apple Notes, several at once
-
Secrets stay home: tokens in your dotfiles are masked, key files are never copied, and
dudu secretsmoves keys out of your.zshrc - Encrypted if you want: AES-256 with a password kept in your Keychain
- Safe to restore: a backup is treated as…
Try it in 30 seconds
brew install fontnelle/tap/dudu
dudu backup # save everything to your destinations
dudu restore --dry-run # on the new machine: see what will happen
dudu restore # reinstall everything
No Homebrew yet? There's an install script too, and it verifies the release checksums before installing.
What it captures
| What | Examples |
|---|---|
| Packages | Homebrew (formulae, casks, Mac App Store), apt, dnf, pacman, flatpak, snap |
| Runtimes and global tools | Node versions via nvm, fnm or volta, global npm/pnpm/yarn/bun packages, pyenv, pipx, uv, gems, cargo, go |
| Dotfiles and configs | zsh, bash, fish, Oh My Zsh plugins, Powerlevel10k, Starship, tmux, vim, nvim, git and SSH config |
| Terminal and editors | Terminal.app, iTerm2, Ghostty, Kitty, WezTerm, Alacritty, Nerd Fonts, VS Code and Cursor extensions |
Your secrets never leave your machine
This was the part I cared about most. Dotfiles are full of things that should never end up in a backup.
-
Tokens get masked. API keys,
ghp_…,sk-…,npm_…, AWS keys and JWTs become<redacted-by-dudu>in the backup. -
Key files are never copied.
~/.ssh/id_*,~/.aws/credentials,~/.kube/configand friends stay home. - Optional encryption. AES-256 with a password stored in your Keychain.
-
Restores are paranoid. A backup is treated as untrusted: checksums are verified, package names are validated, and no file is overwritten without keeping a
.dudu-bakcopy.
Saved where you already are
Pick one or more destinations, and each backup goes to all of them:
- A local folder
- iCloud Drive
- Google Drive (or any rclone remote on Linux)
- Apple Notes, with a readable summary of your setup
Want it on autopilot? dudu schedule on runs a backup every day.
"But I already use chezmoi or mackup"
They're great tools, and dudu doesn't try to replace everything they do. The difference is scope:
- chezmoi is excellent for dotfiles, with per-machine templates and password manager integration. But it doesn't install packages or runtimes on its own. You write and maintain those scripts yourself.
- mackup syncs app settings through a cloud folder. It doesn't reinstall packages or language versions.
-
Brewfile (
brew bundle) reinstalls Homebrew packages, and dudu actually builds on it. But on its own it doesn't cover dotfiles, runtimes or your terminal.
| dudu | chezmoi | mackup | |
|---|---|---|---|
| Dotfiles | ✅ | ✅ | ✅ |
| Packages | ✅ | Via scripts | ❌ |
| Runtimes (Node, Python...) | ✅ | Via scripts | ❌ |
| Terminal settings | ✅ | ✅ | ✅ |
| Secret masking | ✅ | Via password manager | ❌ |
| One-command backup and restore | ✅ | ❌ | ✅ |
| Interface in Portuguese and Spanish | ✅ | ❌ | ❌ |
dudu's bet is simple: one flow for the whole setup.
Built for developers who don't think in English
Here's something most CLI tools ignore: millions of developers don't use English as their first language.
dudu speaks English, Portuguese and Spanish, and picks the right one automatically from your system. No flags, no config. You just run it, and it talks to you in your language.
This wasn't an afterthought. It was a design decision from day one, because a tool that feels foreign is a tool people stop using.
Pure bash, zero dependencies
dudu is written in pure bash and runs on the bash 3.2 that ships with macOS. Nothing to install first, no runtime to manage. The test suite runs on macOS, Ubuntu, Fedora and Arch.
When dudu saves your day
- New laptop: go from unboxing to coding without the ritual
- Fresh install: formatted your machine? Bring everything back
- Second machine: keep your work and personal setups in sync
- Distro hopping: try a new Linux distro without losing your environment
Honest limitations
dudu currently runs on macOS and Linux. Windows isn't supported yet.
It's a young project, and I'd rather tell you that upfront than have you find out the hard way.
Help me shape what comes next
I'd love your input on two questions:
- What do you always have to reinstall or reconfigure on a new machine that dudu should capture?
- Which tool is missing from the list above? Each one is a single file, so new collectors are easy to add, and contributions are welcome.
Drop your answer in the comments. I read every one.
And if dudu looks useful to you, a ⭐ on GitHub goes a long way. My next goal is getting dudu into the official Homebrew repository, which requires a minimum number of stars, forks and watchers.
Your next setup should be a command, not a chore.
Top comments (0)