cockup 0.2.3

Yet another backup tool for various configurations
cockup-0.2.3 is not a library.

cockup

CI

English | 中文

Yet another backup tool for various configurations.

Installation

Install with Homebrew:

brew install huaium/tap/cockup

Or install from crates.io with Cargo:

cargo install cockup --locked

Prebuilt binaries are also available on GitHub Releases. For source builds, see the development guide.

Typical example

Save this as config.yaml to back up your shell and Git configuration into a backup directory beside the YAML file:

destination: ./backup
symlinks: reference
rules:
  - from: "~"
    targets: [".zshrc", ".gitconfig"]
    to: dotfiles

Preview the changes, create the backup, and restore it when needed:

cockup backup config.yaml --dry-run
cockup backup config.yaml
cockup restore config.yaml

Restore shows differences and asks before replacing conflicting local files.

Commands

Preview changes with --dry-run, compare local files with diff, and check backup integrity with verify. Cockup also supports hooks and Homebrew configuration discovery. See the command reference for details.

Configuration

YAML rules select files and their backup paths. Configure symlink handling, metadata preservation, hooks, and reusable includes as needed. See the configuration reference for all fields.

Ingredients

Include predefined application rules to avoid writing them from scratch. Use ingredient search to find them and ingredient show to inspect their YAML. Browse the ingredient library for available applications and examples.

Development

Build and test with Cargo, or use the Just recipes for sample backup and restore workflows. See the development guide to get started.

License

MIT.