NAME

housekeeper - private built-in command wrapper for Developer Dashboard

SYNOPSIS

d2 housekeeper [--dry-run]

DESCRIPTION

This private helper is staged under ~/.developer-dashboard/cli/dd/ so the public d2 entrypoint can stay a thin switchboard.

PURPOSE

This staged helper exposes the built-in temp-state cleanup command. It gives the public runtime one stable way to run the shared temp housekeeper logic. --dry-run reports exactly what a real run would scan, remove, and rotate without touching anything on disk, so an operator can preview the effect before trusting it on an unfamiliar host.

WHY IT EXISTS

It exists because temp cleanup is built-in dashboard behavior, but the public entrypoint still has to remain a thin dispatcher that hands real work off to private helpers and modules.

WHEN TO USE

Use this file when changing the public d2 housekeeper command route or when fixing how the cleanup helper is staged into the home runtime.

HOW TO USE

Users run d2 housekeeper. The staged helper forwards the request to the private runtime, which loads the cleanup module and prints the JSON summary.

WHAT USES IT

It is used by developers inspecting temp cleanup, by the built-in housekeeper collector job, and by CLI regression tests.

EXAMPLES

Example 1:

d2 housekeeper

Run the public built-in command path that stages or re-enters this helper.

Example 2:

~/.developer-dashboard/cli/dd/housekeeper

Inspect the staged helper directly after d2 init or helper extraction has populated the home runtime.

Example 3:

d2 collector run housekeeper

Run the built-in collector that executes this helper through the collector runtime.

Example 4:

prove -lv t/05-cli-smoke.t t/30-dashboard-loader.t

Rerun the focused staged-helper and thin-loader tests after changing helper dispatch behavior.

Example 5:

d2 housekeeper --dry-run

Preview exactly what a real run would scan, remove, and rotate - state roots, temp files, collector logs, and expired sessions - without touching any of it, before trusting the cleanup on an unfamiliar host.