Description
It would be helpful to see file diffs for file.copy actions, both during --dry-run and normal apply operations.
Currently, when running comtrya apply --dry-run, the output shows whether a file will be copied, but there's no way to see what will change in the file:
INFO execute:{manifest="agents"}:{action=file.copy}: Copy file from .agents/pull-request.md to /Users/xxx/.agents/pull-request.md
I'd like an option (e.g., --diff or --verbose) that shows the actual diff between the source and destination files.
Additional information
When managing dotfiles or configuration files, it's important to know what changes are being applied:
- During dry-run: Review changes before applying them
- During normal apply: Confirm what was actually changed, especially when skipping dry-run for quick iterations
Sometimes users skip the dry-run step for convenience. In such cases, seeing the diff after the apply helps verify that the intended changes were made correctly.
Similar tools like Ansible provide this functionality with the --diff flag, and Itamae (a Ruby-based configuration management tool) shows diffs by default when files are changed.
Manifest Example
N/A - This feature would be a CLI option rather than a manifest change.
Example usage:
comtrya apply --diff
comtrya apply --dry-run --diff
Example output:
INFO execute:{manifest="agents"}:{action=file.copy}: Copy file from .agents/pull-request.md to /Users/xxx/.agents/pull-request.md
--- /Users/xxx/.agents/pull-request.md (current)
+++ .agents/pull-request.md (source)
@@ -40,1 +40,1 @@
-Old line content
+New line content
Description
It would be helpful to see file diffs for
file.copyactions, both during--dry-runand normalapplyoperations.Currently, when running
comtrya apply --dry-run, the output shows whether a file will be copied, but there's no way to see what will change in the file:I'd like an option (e.g.,
--diffor--verbose) that shows the actual diff between the source and destination files.Additional information
When managing dotfiles or configuration files, it's important to know what changes are being applied:
Sometimes users skip the dry-run step for convenience. In such cases, seeing the diff after the apply helps verify that the intended changes were made correctly.
Similar tools like Ansible provide this functionality with the
--diffflag, and Itamae (a Ruby-based configuration management tool) shows diffs by default when files are changed.Manifest Example
N/A - This feature would be a CLI option rather than a manifest change.
Example usage:
Example output: