Skip to content
This repository was archived by the owner on May 18, 2026. It is now read-only.
This repository was archived by the owner on May 18, 2026. It is now read-only.

Feature: Show file diffs for file.copy actions #593

@inouetakuya

Description

@inouetakuya

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions