Skip to content

Add whitelist/protection features #13

@SH20RAJ

Description

@SH20RAJ

🎯 Goal

Allow users to protect specific paths from deletion permanently or temporarily.

🚀 Features

cleanmac --whitelist ~/Desktop/active-project
cleanmac --whitelist ~/Projects/client-work --expires 7d
cleanmac --list-whitelist
cleanmac --remove-whitelist ~/Desktop/active-project

🔧 Implementation Details

  • Store whitelist in config file
  • Support path patterns (wildcards)
  • Support expiry dates
  • Check whitelist before deletion
  • Show protected items in scans

📝 Config Format

whitelist:
  - path: "~/Desktop/active-project"
    added: "2025-10-06"
    expires: null  # permanent
    reason: "Active client work"
  
  - path: "~/Projects/important-*"
    added: "2025-10-06"
    expires: "2025-10-13"
    reason: "Temporary protection"

✅ Acceptance Criteria

  • Whitelisted paths are never deleted
  • Expiry dates are respected
  • Wildcard patterns work
  • Can list all protected paths
  • Can remove from whitelist

🔗 Related

Part of Phase 2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions