Skip to content

Feature/diff status#52

Merged
pankajackson merged 11 commits into
developfrom
feature/diff_status
May 26, 2026
Merged

Feature/diff status#52
pankajackson merged 11 commits into
developfrom
feature/diff_status

Conversation

@pankajackson

Copy link
Copy Markdown
Owner

This PR adds two core commands to dotctl:

  • dotctl status → shows system health, profile state, config status, and drift summary
  • dotctl diff → shows differences between local system files and stored profile

These improve visibility into configuration drift and system state.


Features

dotctl status

Provides a structured overview of:

  • Profile health (git repo, active branch, remote)
  • Config validation status
  • Drift summary (modified, missing, synced files)
  • --json and --short output modes

Example:

✔ profile: ok
✔ config: ok
ℹ active profile: desktop_main

✔ system: in sync
✔ synced files: 2
✔ modified files: none
✔ missing files: none

dotctl diff

Shows file-level differences between local system and profile.

Supports:

  • Full diff
  • Single file target
  • --color output
  • --side-by-side view

Example:

🔍 diff: configs/test.txt
--- repo
+++ local
@@ -1,3 +1,4 @@
 line 1
+new line
 line 2

Design Notes

  • Separated logic into:

    • profile collection
    • config validation
    • drift detection
    • rendering layer
  • Introduced structured StatusReport for better maintainability

  • Error handling ensures CLI never crashes unexpectedly

  • Consistent icon usage for status output


Checklist

  • status command implemented
  • diff command implemented
  • JSON + short output support
  • side-by-side diff
  • structured status model
  • error-safe execution

@pankajackson pankajackson merged commit 18be81d into develop May 26, 2026
5 checks passed
@pankajackson pankajackson deleted the feature/diff_status branch May 26, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant