Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.
Swift cache-cleanercleanerclideveloper-toolsdisk-cleanupdisk-spaceduplicate-finderhomebrewliquid-glassmac-cleanermacosmacos-appmacos-golden-gatemacos-tahoemacos-tweaksswiftswiftuiterminal-themesuninstalluninstaller
peel's help and manual page list what --kind and --format take
Țugui Dragoșf481da01fc3e
diff --git a/Packages/PeelCore/Sources/PeelCommandLine/Commands/AppCommands.swift b/Packages/PeelCore/Sources/PeelCommandLine/Commands/AppCommands.swiftindex 9d7e9cf0..a1fb4012 100644--- a/Packages/PeelCore/Sources/PeelCommandLine/Commands/AppCommands.swift+++ b/Packages/PeelCore/Sources/PeelCommandLine/Commands/AppCommands.swift@@ -26,7 +26,7 @@ struct InventoryCommand: AsyncParsableCommand {)/// An enum, so `--help` lists the formats and the shell can complete them.- @Option(help: "What to write: \(FormatArgument.allValueStrings.joined(separator: ", ")).")+ @Option(help: "What to write.")var format: FormatArgument = .textfunc run() async throws {diff --git a/Packages/PeelCore/Sources/PeelCommandLine/Support/Arguments.swift b/Packages/PeelCore/Sources/PeelCommandLine/Support/Arguments.swiftindex b0ceeda5..ff1386c9 100644--- a/Packages/PeelCore/Sources/PeelCommandLine/Support/Arguments.swift+++ b/Packages/PeelCore/Sources/PeelCommandLine/Support/Arguments.swift@@ -38,6 +38,18 @@ enum KindArgument: String, CaseIterable, ExpressibleByArgument {case archivescase diskImages = "disk-images"+ /// What `--help` and the manual page say beside each value.+ var defaultValueDescription: String {+ switch self {+ case .documents: "Text files, PDFs, and other documents, not source code"+ case .images: "Pictures and photos"+ case .movies: "Videos"+ case .audio: "Music and other sound"+ case .archives: "Zip files and other archives"+ case .diskImages: "Disk images, such as .dmg files"+ }+ }+var fileKind: FileKind {switch self {case .documents: .documents@@ -56,6 +68,16 @@ enum FormatArgument: String, CaseIterable, ExpressibleByArgument {case csvcase brewfile+ /// What `--help` and the manual page say beside each value.+ var defaultValueDescription: String {+ switch self {+ case .text: "A line per app, with its version and where it came from"+ case .json: "Every detail, for scripts"+ case .csv: "A table for a spreadsheet"+ case .brewfile: "What Homebrew can install again, for brew bundle"+ }+ }+var format: Inventory.Format {switch self {case .text: .textdiff --git a/Packages/PeelCore/Tests/PeelCoreTests/CommandLineTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/CommandLineTests.swiftindex 35f57c86..3560f660 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/CommandLineTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/CommandLineTests.swift@@ -711,7 +711,7 @@ struct CommandLineTests {// The format is an enum, so ArgumentParser writes this message itself and lists the four values it takes.#expect(message.contains("'bogus' is invalid for '--format <format>'"))- #expect(message.contains("text, json, csv, brewfile"))+ #expect(message.contains("'text', 'json', 'csv' or 'brewfile'"))#expect(message.contains("Usage: peel inventory"))#expect(message.contains("See 'peel inventory --help'"))}diff --git a/Support/peel.1 b/Support/peel.1index 28ea58b7..9871e32c 100644--- a/Support/peel.1+++ b/Support/peel.1@@ -1,5 +1,5 @@.\" "Generated by swift-argument-parser"-.Dd September 25, 2026+.Dd September 27, 2026.Dt PEEL 1.Os.Sh NAME@@ -33,8 +33,18 @@ Write out what is installed and where each app came from.A Brewfile only lists what Homebrew can install again; everything else would be a line that doesn't work..Bl -tag -width 6n.It Fl -format Ar format-What to write: text, json, csv, brewfile.+What to write..Pp+.Bl -tag -width 6n+.It Ar text+A line per app, with its version and where it came from+.It Ar json+Every detail, for scripts+.It Ar csv+A table for a spreadsheet+.It Ar brewfile+What Homebrew can install again, for brew bundle+.El.It Fl -versionShow the version..It Fl h , -help@@ -230,6 +240,20 @@ Folders to scan..It Fl -kind Ar kindOnly files of this kind..Pp+.Bl -tag -width 6n+.It Ar documents+Text files, PDFs, and other documents, not source code+.It Ar images+Pictures and photos+.It Ar movies+Videos+.It Ar audio+Music and other sound+.It Ar archives+Zip files and other archives+.It Ar disk-images+Disk images, such as .dmg files+.El.It Fl -min-size Ar min-sizeOnly files at least this large, and folders holding at least this much, like 500KB or 1.5GB..It Fl -remove@@ -253,6 +277,20 @@ Part of the file name..It Fl -kind Ar kindThe kind of file..Pp+.Bl -tag -width 6n+.It Ar documents+Text files, PDFs, and other documents, not source code+.It Ar images+Pictures and photos+.It Ar movies+Videos+.It Ar audio+Music and other sound+.It Ar archives+Zip files and other archives+.It Ar disk-images+Disk images, such as .dmg files+.El.It Fl -min-size Ar min-sizeOnly files at least this large, like 500KB or 1.5GB..It Fl -older-than Ar older-than