Fireball (fb)
Overview
The Fireball spell safely deletes files or directories by moving them to a '.graveyard' realm. This provides a temporary location for deleted files, allowing for potential recovery if needed.
Features
- Safe file/directory deletion
- Graveyard storage system
- Recovery possibility
- User confirmation
- Size management
Requirements
- Python package:
click
- Active Necromancy session (graveyard realm)
Installation
Built into Magi.CLI core spells.
Usage
cast fb <file_or_directory>
or
cast fireball <file_or_directory>
Process
- Confirms graveyard exists (requires Necromancy)
- Requests user confirmation
- Moves target to graveyard
- Manages graveyard size (max 13 items)
Examples
Delete a File
cast fb obsolete_script.py
Delete a Directory
Safety Features
- Confirmation prompts
- Graveyard storage
- Recovery possible via raise_dead
- Size management
- Path verification
Storage Location
Files are moved to ~/.sanctum/.graveyard/
Common Use Cases
- Removing unused files
- Cleaning directories
- Project cleanup
- Test file removal
- Temporary file management
Best Practices
- Verify target path before casting
- Use necromancy to ensure graveyard exists
- Remember important filenames for recovery
- Monitor graveyard size
- Regularly clean old files
Notes
- Requires active graveyard
- Limited to 13 most recent items
- Oldest items automatically removed
- Recovery possible with raise_dead spell
- Confirmation required for safety