#Usage
maleta sync --file ./maleta.json --tool allmaleta sync --file ./maleta.json --tool all --dry-runThe sync pipeline is the same as install: it reads the manifest, validates the selection, resolves sources, and materializes files. When omitted, --file uses maleta.json relative to the current directory; --tool overrides targetTool only for that run.
#How it differs from install
| Aspect | sync |
|---|---|
| Plugin pre-check | Runs claude plugin list before processing plugins, except in --dry-run. |
| Plugin already installed | Skips it with [ok] plugin '<id>' already installed. |
| Changed-file line | [ok] sync <label> -> <dest> |
| Footer | sync: no relevant changes or sync: applied local selection |
In install, installed plugins are reinstalled and the changed-file line uses [ok] install. In sync, the pre-check allows these plugins to be skipped. The --dry-run line remains [dry-run] would install <label> -> <dest>.
#No pruning, environment preserved
- Synchronization is additive and does not remove files outside the selection.
- Existing unmanaged files are preserved because the destination tree is copied to the staging directory before files are overwritten.
- An existing file with different bytes is overwritten without prompting; identical bytes are not rewritten.
- Repeating an already aligned selection is idempotent and prints
[ok] <label> already aligned -> <dest>.
#Dry run and safety
With --dry-run, there are no network requests or writes. The possible lines are:
[dry-run] would install <label> -> <dest>
[dry-run] claude plugin marketplace add <repo>
[dry-run] claude plugin install <id>An empty selection prints [warn] no skills or plugins selected; edit the selected Maleta file or export one from https://app.maleta.dev before the usual sync: no relevant changes footer, including with --dry-run. Otherwise, with --dry-run and at least one materialization action planned, no footer is printed. With no relevant changes—no files changed and no plugin commands run—the footer is sync: no relevant changes; when the local selection is applied, the footer is sync: applied local selection. Replacement is transactional: it uses staging and backup and rolls back on failure.
#Exit codes
| Code | Condition |
|---|---|
0 | No failures (`failures === 0`); skipped or unsupported items also result in 0. |
1 | Document, plan, GitHub resolution, limit, collision, staging/transfer, or plugin error. |
2 | Invalid command, option, or flag value. |
4 | targetOs differs from the host: [error] targetOs '<x>' does not match the local host '<y>'; refusing sync. |