CLI command design

profiles

Inspect and clean Altium ProgramData profile extension state for development and installer diagnostics.

Usage

altium-cruncher profiles
altium-cruncher profiles list --json
altium-cruncher profiles clean --profile-guid 11111111-2222-3333-4444-555555555555 --dry-run
altium-cruncher profiles clean --all --module ad-panel-monkey

Arguments

profiles defaults to list. --module selects an extension module name and defaults to ad-panel-monkey. --programdata-root overrides the Altium ProgramData root for tests and custom installs. clean requires --all or --profile-guid, and --dry-run audits the deletion set without modifying files.

Behavior

Profile discovery scans Altium Designer*{GUID} folders, excluding security folders. It reports profile paths, extension roots, ExtensionsRegistry.xml state, selected module directory state, registered version, and DLL presence. Cleanup removes only the selected module directory under the profile Extensions root and that module's registry item.

Output

profiles list writes one profile per line or JSON schema altium_cruncher.profiles.a0. profiles clean writes cleanup actions or JSON schema altium_cruncher.profiles.clean.a0 with profile GUID, module path, registry action, and dry-run state.

Tests

Unit tests build a temporary ProgramData profile tree with an extension registry item, verify list output state, verify dry-run cleanup leaves files intact, and verify real cleanup removes the module directory and registry item.