NAME
Developer::Dashboard::CLI::Files - lightweight file and files helper dispatch
SYNOPSIS
use Developer::Dashboard::CLI::Files qw(run_files_command);
run_files_command(command => 'file', args => \@ARGV);
DESCRIPTION
Implements the lightweight d2 file and d2 files commands so the public entrypoint can hand off file-related work to an extracted helper without loading the heavier dashboard runtime.
PURPOSE
This module is the command runtime behind d2 file ... and d2 files. It prints the active runtime file inventory, resolves named file aliases, persists alias add/delete operations, and locates files beneath a search root without forcing the main d2 entrypoint to load unrelated subsystems.
WHY IT EXISTS
It exists because file alias and file lookup commands are built-ins, but the real lookup and persistence rules need to live in Perl so shell users and Perl callers get one consistent behavior.
WHEN TO USE
Use this file when changing the behavior of d2 file resolve/add/del/list/locate, the human-readable summary tables or JSON payloads returned by d2 files, or the file alias persistence contract stored in config.
HOW TO USE
Users run d2 file <verb> ... or d2 files. Named aliases are loaded from config, the direct resolve verb keeps its line-oriented contract for shell use, and the operator-facing inventory and mutation commands default to human-readable tables while -o json returns the full raw payload.
WHAT USES IT
It is used by the public file command family, by tests that verify alias persistence and resolution, and by contributors who need a thin built-in path to file alias behavior without loading the full web/runtime stack.
EXAMPLES
d2 files
d2 file resolve global_config
d2 file add notes ~/notes.txt
d2 file add scratch /tmp/scratch/notes.txt --create
d2 file locate notes txt
d2 file list
d2 file del notes