Skip to content

[Feature] File management tool (organize, rename, search local files) #49

@Wan-ZL

Description

@Wan-ZL

Description

Give Genesis the ability to manage files on the user's computer: organize files into folders, rename batches of files, search for files by content or name, and report on disk usage. This is a practical local-first capability that cloud AI assistants cannot offer.

Why This Matters

  • File management is a frequent pain point for all computer users
  • Cloud AI assistants cannot touch your local filesystem
  • Local-first is Genesis's core differentiator -- file management proves its value
  • "Organize my Downloads folder" is a request every user has

Acceptance Criteria

  • FileManagerService: assistant/server/services/file_manager.py
  • Tools registered: find_files, organize_files, rename_files, get_disk_usage
  • find_files: Search by name pattern (glob), file type, date range, size
  • organize_files: Move files into categorized folders (by type, date, project)
  • rename_files: Batch rename with pattern (e.g., "photo_{n}.jpg")
  • get_disk_usage: Report disk space by directory
  • All tools require LOCAL or SYSTEM permission level
  • Path validation: Only operate within allowed directories (from settings)
  • Dry-run mode: Preview changes before executing (default for destructive operations)
  • Undo support: Log all file operations for potential reversal
  • At least 12 tests (using temp directories)
  • Documentation: assistant/docs/FILE_MANAGEMENT.md

Security Considerations

  • LOCAL permission for read operations, SYSTEM for write operations
  • Path validation prevents operating outside allowed directories
  • Path traversal protection (blocks ../)
  • Dry-run default prevents accidental data loss
  • Operation log enables undo
  • Sensitive file detection (skip .env, credentials, keys)

Priority Rationale

MEDIUM: Practical and demonstrative of local-first value, but less impactful than PWA, memory, or Telegram integration.

Phase

Phase 8: Always-On Partner

Dependencies

  • None (uses existing permission system and repository path validation)

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions