Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Every developer cache folder names where its tool documents it

Țugui Dragoș841dbdc4347d
diff --git a/Packages/PeelCore/Sources/PeelCommandLine/Commands/FileCommands.swift b/Packages/PeelCore/Sources/PeelCommandLine/Commands/FileCommands.swift
index 58ce51ed..d3c724d3 100644
--- a/Packages/PeelCore/Sources/PeelCommandLine/Commands/FileCommands.swift
+++ b/Packages/PeelCore/Sources/PeelCommandLine/Commands/FileCommands.swift
@@ -141,7 +141,7 @@ struct CachesCommand: AsyncParsableCommand {
@OptionGroup var output: OutputOptions
- private struct Record: Encodable {
+ struct Record: Encodable {
let tool: String
let size: MeasuredSize
let locations: [Location]
@@ -150,6 +150,7 @@ struct CachesCommand: AsyncParsableCommand {
let path: String
let size: MeasuredSize
let kind: String
+ let source: String
}
}
@@ -165,11 +166,7 @@ struct CachesCommand: AsyncParsableCommand {
}
if output.json {
- try Output.json(environments.map { environment in
- Record(tool: environment.name, size: MeasuredSize(environment.total), locations: environment.locations.map {
- Record.Location(path: Output.path($0.url), size: MeasuredSize($0.size), kind: $0.kind.rawValue)
- })
- })
+ try Output.json(Self.records(for: environments))
} else if environments.isEmpty {
Output.line("No developer caches found.")
} else {
@@ -184,6 +181,14 @@ struct CachesCommand: AsyncParsableCommand {
environment.locations.map { [Output.size($0.size), Output.path($0.url), $0.kind.summary] }
}
+ static func records(for environments: [DeveloperEnvironment]) -> [Record] {
+ environments.map { environment in
+ Record(tool: environment.name, size: MeasuredSize(environment.total), locations: environment.locations.map {
+ Record.Location(path: Output.path($0.url), size: MeasuredSize($0.size), kind: $0.kind.rawValue, source: $0.source)
+ })
+ }
+ }
+
/// Returns the environments named in `tools`, by the name the listing shows or by its identifier, ignoring
/// case. All of them when `tools` is empty.
static func chosen(from environments: [DeveloperEnvironment], named tools: [String]) throws -> [DeveloperEnvironment] {
diff --git a/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift b/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
index 28641dcf..71e3eef6 100644
--- a/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
@@ -21,6 +21,8 @@ public struct DeveloperEnvironment: Sendable, Hashable, Identifiable {
public let kind: ContentKind
/// Nil when measuring ran out of time or was refused. Unknown is not the same as empty.
public let size: Int64?
+ /// Where the tool documents the folder.
+ public let source: String
/// True when macOS would not let Peel open the folder, rather than it not answering in time.
public var couldNotBeRead = false
@@ -67,13 +69,16 @@ public enum DeveloperCaches {
struct Folder {
let path: String
let kind: DeveloperEnvironment.ContentKind
+ /// Where the tool documents the folder: a page, or the file inside Xcode that names it.
+ let source: String
/// A store the tool can turn on inside the folder, which projects then link into. While an entry by that
/// name is there, a link included, the folder is listed without a checkmark: moving it breaks them.
let storeInside: String?
- init(_ path: String, _ kind: DeveloperEnvironment.ContentKind, storeInside: String? = nil) {
+ init(_ path: String, _ kind: DeveloperEnvironment.ContentKind, source: String, storeInside: String? = nil) {
self.path = path
self.kind = kind
+ self.source = source
self.storeInside = storeInside
}
@@ -106,190 +111,190 @@ public enum DeveloperCaches {
static let definitions: [Definition] = [
// Apple
Definition(id: "xcode", name: "Xcode", systemImage: "hammer", appBundleIdentifiers: ["com.apple.dt.Xcode", "com.apple.iphonesimulator"], folders: [
- Folder("Library/Developer/Xcode/DerivedData", .buildData),
- Folder("Library/Developer/Xcode/UserData/Previews/Simulator Devices", .buildData),
- Folder("Library/Developer/Xcode/iOS DeviceSupport", .deviceSupport),
- Folder("Library/Developer/Xcode/watchOS DeviceSupport", .deviceSupport),
- Folder("Library/Developer/Xcode/tvOS DeviceSupport", .deviceSupport),
- Folder("Library/Developer/Xcode/visionOS DeviceSupport", .deviceSupport),
- Folder("Library/Developer/Xcode/macOS DeviceSupport", .deviceSupport),
- Folder("Library/Developer/CoreSimulator/Caches", .cache),
- Folder("Library/Caches/com.apple.dt.Xcode", .cache),
- Folder("Library/Developer/Xcode/Archives", .archives),
+ Folder("Library/Developer/Xcode/DerivedData", .buildData, source: "https://developer.apple.com/documentation/xcode-release-notes/xcode-26-release-notes"),
+ Folder("Library/Developer/Xcode/UserData/Previews/Simulator Devices", .buildData, source: "Xcode 27: DVTSystemPrerequisites.framework, beside DVTSimulatorDeviceRemover"),
+ Folder("Library/Developer/Xcode/iOS DeviceSupport", .deviceSupport, source: "https://developer.apple.com/documentation/xcode-release-notes/xcode-12_2-release-notes"),
+ Folder("Library/Developer/Xcode/watchOS DeviceSupport", .deviceSupport, source: "Xcode 27: CoreSymbolicationDT.framework/Resources/JSONCrashLog/DeviceSupportDirectories.py"),
+ Folder("Library/Developer/Xcode/tvOS DeviceSupport", .deviceSupport, source: "Xcode 27: CoreSymbolicationDT.framework/Resources/JSONCrashLog/DeviceSupportDirectories.py"),
+ Folder("Library/Developer/Xcode/visionOS DeviceSupport", .deviceSupport, source: "Xcode 27: DVTFoundation.framework (\"%@ DeviceSupport\") and XROS.platform/Info.plist (Description visionOS)"),
+ Folder("Library/Developer/Xcode/macOS DeviceSupport", .deviceSupport, source: "Xcode 27: CoreSymbolicationDT.framework/Resources/JSONCrashLog/DeviceSupportDirectories.py"),
+ Folder("Library/Developer/CoreSimulator/Caches", .cache, source: "https://developer.apple.com/documentation/xcode-release-notes/xcode-12_3-release-notes"),
+ Folder("Library/Caches/com.apple.dt.Xcode", .cache, source: "https://developer.apple.com/documentation/foundation/filemanager/searchpathdirectory/cachesdirectory"),
+ Folder("Library/Developer/Xcode/Archives", .archives, source: "Xcode 27: IDEFoundation.framework, -[IDEDeveloperPaths defaultDistributionArchivesLocation]"),
]),
Definition(id: "swiftpm", name: "Swift Package Manager", systemImage: "swift", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/org.swift.swiftpm", .downloads),
+ Folder("Library/Caches/org.swift.swiftpm", .downloads, source: "https://github.com/swiftlang/swift-package-manager/blob/main/Sources/Basics/FileSystem/FileSystem+Extensions.swift#L246-L253"),
]),
Definition(id: "cocoapods", name: "CocoaPods", systemImage: "shippingbox", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/CocoaPods", .downloads),
+ Folder("Library/Caches/CocoaPods", .downloads, source: "https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/config.rb#L23"),
]),
Definition(id: "carthage", name: "Carthage", systemImage: "shippingbox", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/org.carthage.CarthageKit", .downloads),
+ Folder("Library/Caches/org.carthage.CarthageKit", .downloads, source: "https://github.com/Carthage/Carthage/blob/master/Source/CarthageKit/Constants.swift#L31"),
]),
Definition(id: "homebrew", name: "Homebrew", systemImage: "mug", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/Homebrew/downloads", .downloads),
- Folder("Library/Caches/Homebrew/Cask", .downloads),
- Folder("Library/Caches/Homebrew/bootsnap", .cache),
+ Folder("Library/Caches/Homebrew/downloads", .downloads, source: "https://github.com/Homebrew/brew/blob/main/Library/Homebrew/download_strategy/abstract_file_download_strategy.rb#L42"),
+ Folder("Library/Caches/Homebrew/Cask", .downloads, source: "https://github.com/Homebrew/brew/blob/main/Library/Homebrew/cask/cache.rb#L9"),
+ Folder("Library/Caches/Homebrew/bootsnap", .cache, source: "https://github.com/Homebrew/brew/blob/main/Library/Homebrew/startup/bootsnap.rb#L45"),
]),
// JavaScript
Definition(id: "npm", name: "npm", systemImage: "cube", appBundleIdentifiers: [], folders: [
- Folder(".npm/_cacache", .downloads),
- Folder(".npm/_npx", .downloads),
+ Folder(".npm/_cacache", .downloads, source: "https://github.com/npm/cli/blob/latest/workspaces/config/lib/definitions/definitions.js#L443"),
+ Folder(".npm/_npx", .downloads, source: "https://github.com/npm/cli/blob/latest/workspaces/config/lib/definitions/definitions.js#L444"),
]),
Definition(id: "yarn", name: "Yarn", systemImage: "cube", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/Yarn", .downloads),
+ Folder("Library/Caches/Yarn", .downloads, source: "https://github.com/yarnpkg/yarn/blob/master/src/util/user-dirs.js#L32-L33"),
// Yarn's Plug'n'Play projects load every package from this cache, so it is listed and never selected:
// moving it breaks each such project until `yarn install` runs in it again.
- Folder(".yarn/berry/cache", .environments),
+ Folder(".yarn/berry/cache", .environments, source: "https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-core/sources/Configuration.ts"),
]),
Definition(id: "pnpm", name: "pnpm", systemImage: "cube", appBundleIdentifiers: [], folders: [
- Folder("Library/pnpm/store", .environments),
- Folder("Library/Caches/pnpm", .cache),
+ Folder("Library/pnpm/store", .environments, source: "https://github.com/pnpm/pnpm.io/blob/main/docs/settings/store.md#L15"),
+ Folder("Library/Caches/pnpm", .cache, source: "https://github.com/pnpm/pnpm.io/blob/main/docs/settings/other.md#L175"),
]),
Definition(id: "bun", name: "Bun", systemImage: "cube", appBundleIdentifiers: [], folders: [
// Bun's global virtual store, once turned on, is `links`, and every project's `node_modules` then points
// into it (Bun's documentation, "Global virtual store").
- Folder(".bun/install/cache", .downloads, storeInside: "links"),
+ Folder(".bun/install/cache", .downloads, source: "https://github.com/oven-sh/bun/blob/main/docs/pm/global-store.mdx", storeInside: "links"),
]),
Definition(id: "deno", name: "Deno", systemImage: "chevron.left.forwardslash.chevron.right", appBundleIdentifiers: [], folders: [
// `DENO_DIR` keeps the REPL history (`deno_history.txt`) and what scripts store (`location_data`)
// beside its caches, so the caches are named one by one, as Deno's `deno_dir.rs` names them. `deps` and
// the `_v1` databases are Deno 1's names.
- Folder("Library/Caches/deno/remote", .downloads),
- Folder("Library/Caches/deno/deps", .downloads),
- Folder("Library/Caches/deno/npm", .downloads),
- Folder("Library/Caches/deno/dl", .downloads),
- Folder("Library/Caches/deno/gen", .buildData),
- Folder("Library/Caches/deno/registries", .cache),
- Folder("Library/Caches/deno/*_cache_v1", .cache),
- Folder("Library/Caches/deno/*_cache_v2", .cache),
+ Folder("Library/Caches/deno/remote", .downloads, source: "https://github.com/denoland/deno/blob/main/libs/resolver/cache/deno_dir.rs"),
+ Folder("Library/Caches/deno/deps", .downloads, source: "https://github.com/denoland/deno/blob/v1.46.3/cli/cache/deno_dir.rs"),
+ Folder("Library/Caches/deno/npm", .downloads, source: "https://github.com/denoland/deno/blob/main/libs/resolver/cache/deno_dir.rs"),
+ Folder("Library/Caches/deno/dl", .downloads, source: "https://github.com/denoland/deno/blob/main/libs/resolver/cache/deno_dir.rs"),
+ Folder("Library/Caches/deno/gen", .buildData, source: "https://github.com/denoland/deno/blob/main/libs/resolver/cache/deno_dir.rs"),
+ Folder("Library/Caches/deno/registries", .cache, source: "https://github.com/denoland/deno/blob/main/libs/resolver/cache/deno_dir.rs"),
+ Folder("Library/Caches/deno/*_cache_v1", .cache, source: "https://github.com/denoland/deno/blob/v1.40.0/cli/cache/deno_dir.rs"),
+ Folder("Library/Caches/deno/*_cache_v2", .cache, source: "https://github.com/denoland/deno/blob/main/libs/resolver/cache/deno_dir.rs"),
]),
Definition(id: "reactnative", name: "React Native CLI", systemImage: "cube", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/react-native-cli", .cache),
+ Folder("Library/Caches/react-native-cli", .cache, source: "https://github.com/react-native-community/cli/blob/main/packages/cli-tools/src/cacheManager.ts#L49-L50"),
]),
Definition(id: "expo", name: "Expo", systemImage: "cube", appBundleIdentifiers: [], folders: [
- Folder(".expo/expo-go", .downloads),
- Folder(".expo/versions-cache", .cache),
- Folder(".expo/ios-simulator-app-cache", .downloads),
- Folder(".expo/android-apk-cache", .downloads),
+ Folder(".expo/expo-go", .downloads, source: "https://github.com/expo/expo/blob/main/packages/@expo/cli/src/utils/downloadExpoGoAsync.ts#L128-L129"),
+ Folder(".expo/versions-cache", .cache, source: "https://github.com/expo/expo/blob/main/packages/@expo/cli/src/api/getVersions.ts#L47"),
+ Folder(".expo/ios-simulator-app-cache", .downloads, source: "https://github.com/expo/expo/blob/main/packages/@expo/cli/src/utils/downloadExpoGoAsync.ts#L21"),
+ Folder(".expo/android-apk-cache", .downloads, source: "https://github.com/expo/expo/blob/main/packages/@expo/cli/src/utils/downloadExpoGoAsync.ts#L27"),
]),
Definition(id: "nx", name: "Nx", systemImage: "cube", appBundleIdentifiers: [], folders: [
// One workspace's `cache` and `databases`, named by 16 hex digits of a hash. They go together: Nx
// answers a cache hit from the database alone, and a database without its cache restores nothing.
- Folder(".nx/" + String(repeating: "[0-9a-f]", count: 16), .buildData),
+ Folder(".nx/" + String(repeating: "[0-9a-f]", count: 16), .buildData, source: "https://github.com/nrwl/nx/blob/master/packages/nx/src/utils/cache-directory.ts"),
]),
Definition(id: "playwright", name: "Playwright", systemImage: "globe", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/ms-playwright", .downloads),
+ Folder("Library/Caches/ms-playwright", .downloads, source: "https://github.com/microsoft/playwright/blob/main/docs/src/browsers.md#L958"),
]),
Definition(id: "cypress", name: "Cypress", systemImage: "globe", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/Cypress", .downloads),
+ Folder("Library/Caches/Cypress", .downloads, source: "https://github.com/cypress-io/cypress-documentation/blob/main/docs/app/get-started/advanced-installation.mdx#L615"),
]),
Definition(id: "puppeteer", name: "Puppeteer", systemImage: "globe", appBundleIdentifiers: [], folders: [
- Folder(".cache/puppeteer", .downloads),
+ Folder(".cache/puppeteer", .downloads, source: "https://github.com/puppeteer/puppeteer/blob/main/packages/puppeteer/src/getConfiguration.ts#L162-L165"),
]),
Definition(id: "electron", name: "Electron", systemImage: "cube", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/electron", .downloads),
- Folder("Library/Caches/electron-builder", .downloads),
- Folder(".electron-gyp", .downloads),
+ Folder("Library/Caches/electron", .downloads, source: "https://github.com/electron/get/blob/main/README.md#L123"),
+ Folder("Library/Caches/electron-builder", .downloads, source: "https://github.com/electron-userland/electron-builder/blob/master/website/docs/environment-variables.md#L166"),
+ Folder(".electron-gyp", .downloads, source: "https://github.com/electron/rebuild/blob/main/src/constants.ts#L4"),
]),
Definition(id: "nodegyp", name: "node-gyp", systemImage: "cube", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/node-gyp", .downloads),
- Folder(".node-gyp", .downloads),
+ Folder("Library/Caches/node-gyp", .downloads, source: "https://github.com/nodejs/node-gyp/blob/main/bin/node-gyp.js#L25"),
+ Folder(".node-gyp", .downloads, source: "https://github.com/nodejs/node-gyp/blob/main/CHANGELOG.md#v500-2019-06-13"),
]),
Definition(id: "typescript", name: "TypeScript", systemImage: "cube", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/typescript", .downloads),
+ Folder("Library/Caches/typescript", .downloads, source: "https://github.com/microsoft/TypeScript/blob/main/tsc/internal/vfs/osvfs/os.go#L193-L206"),
]),
// Python
Definition(id: "pip", name: "pip", systemImage: "chevron.left.forwardslash.chevron.right", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/pip", .downloads),
+ Folder("Library/Caches/pip", .downloads, source: "https://github.com/pypa/pip/blob/main/docs/html/topics/caching.md#L84-L88"),
]),
Definition(id: "poetry", name: "Poetry", systemImage: "chevron.left.forwardslash.chevron.right", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/pypoetry/cache", .downloads),
- Folder("Library/Caches/pypoetry/artifacts", .downloads),
- Folder("Library/Caches/pypoetry/virtualenvs", .environments),
+ Folder("Library/Caches/pypoetry/cache", .downloads, source: "https://github.com/python-poetry/poetry/blob/main/src/poetry/config/config.py#L283-L284"),
+ Folder("Library/Caches/pypoetry/artifacts", .downloads, source: "https://github.com/python-poetry/poetry/blob/main/src/poetry/config/config.py#L287-L288"),
+ Folder("Library/Caches/pypoetry/virtualenvs", .environments, source: "https://github.com/python-poetry/poetry/blob/main/docs/configuration.md#L613-L617"),
]),
Definition(id: "uv", name: "uv", systemImage: "chevron.left.forwardslash.chevron.right", appBundleIdentifiers: [], folders: [
- Folder(".cache/uv", .environments),
+ Folder(".cache/uv", .environments, source: "https://github.com/astral-sh/uv/blob/main/docs/concepts/cache.md#L193-L194"),
]),
Definition(id: "precommit", name: "pre-commit", systemImage: "chevron.left.forwardslash.chevron.right", appBundleIdentifiers: [], folders: [
- Folder(".cache/pre-commit", .cache),
+ Folder(".cache/pre-commit", .cache, source: "https://github.com/pre-commit/pre-commit.com/blob/main/sections/advanced.md#L773"),
]),
Definition(id: "pipenv", name: "Pipenv", systemImage: "chevron.left.forwardslash.chevron.right", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/pipenv", .downloads),
- Folder(".local/share/virtualenvs", .environments),
+ Folder("Library/Caches/pipenv", .downloads, source: "https://github.com/pypa/pipenv/blob/main/pipenv/environments.py#L109-L110"),
+ Folder(".local/share/virtualenvs", .environments, source: "https://github.com/pypa/pipenv/blob/main/docs/virtualenv.md#L25"),
]),
Definition(id: "virtualenvwrapper", name: "virtualenvwrapper", systemImage: "chevron.left.forwardslash.chevron.right", appBundleIdentifiers: [], folders: [
// The environments, not the hook scripts virtualenvwrapper keeps beside them: a pattern that ends in `/`
// matches folders only.
- Folder(".virtualenvs/*/", .environments),
+ Folder(".virtualenvs/*/", .environments, source: "https://github.com/python-virtualenvwrapper/virtualenvwrapper/blob/main/docs/source/install.rst"),
]),
Definition(id: "conda", name: "Conda", systemImage: "chevron.left.forwardslash.chevron.right", appBundleIdentifiers: [], folders: [
- Folder("miniconda3/pkgs", .environments),
- Folder("anaconda3/pkgs", .environments),
- Folder(".conda/pkgs", .environments),
+ Folder("miniconda3/pkgs", .environments, source: "https://www.anaconda.com/docs/getting-started/miniconda/install/mac-cli-install"),
+ Folder("anaconda3/pkgs", .environments, source: "https://www.anaconda.com/docs/getting-started/anaconda/install/mac-cli-install"),
+ Folder(".conda/pkgs", .environments, source: "https://github.com/conda/conda/blob/main/conda/base/context.py#L834-L847"),
]),
// Rust and Go
Definition(id: "cargo", name: "Cargo", systemImage: "gearshape.2", appBundleIdentifiers: [], folders: [
- Folder(".cargo/registry/cache", .downloads),
- Folder(".cargo/registry/index", .downloads),
- Folder(".cargo/registry/src", .downloads),
- Folder(".cargo/git/checkouts", .downloads),
+ Folder(".cargo/registry/cache", .downloads, source: "https://github.com/rust-lang/cargo/blob/master/doc/book/src/guide/cargo-home.md#L47-L48"),
+ Folder(".cargo/registry/index", .downloads, source: "https://github.com/rust-lang/cargo/blob/master/doc/book/src/guide/cargo-home.md#L44-L45"),
+ Folder(".cargo/registry/src", .downloads, source: "https://github.com/rust-lang/cargo/blob/master/doc/book/src/guide/cargo-home.md#L50-L51"),
+ Folder(".cargo/git/checkouts", .downloads, source: "https://github.com/rust-lang/cargo/blob/master/doc/book/src/guide/cargo-home.md#L36-L37"),
]),
Definition(id: "go", name: "Go", systemImage: "chevron.left.forwardslash.chevron.right", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/go-build", .buildData),
- Folder("go/pkg/mod/cache/download", .downloads),
+ Folder("Library/Caches/go-build", .buildData, source: "https://github.com/golang/go/blob/master/src/cmd/go/alldocs.go#L2372-L2373"),
+ Folder("go/pkg/mod/cache/download", .downloads, source: "https://github.com/golang/website/blob/master/_content/ref/mod.md#L4020-L4028"),
]),
Definition(id: "sccache", name: "sccache", systemImage: "gearshape.2", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/Mozilla.sccache", .buildData),
+ Folder("Library/Caches/Mozilla.sccache", .buildData, source: "https://github.com/mozilla/sccache/blob/main/docs/Local.md#L3"),
]),
// JVM and Android
Definition(id: "gradle", name: "Gradle", systemImage: "cup.and.saucer", appBundleIdentifiers: [], folders: [
- Folder(".gradle/caches", .downloads),
- Folder(".gradle/wrapper/dists", .downloads),
- Folder(".gradle/daemon", .cache),
+ Folder(".gradle/caches", .downloads, source: "https://github.com/gradle/gradle/blob/master/platforms/documentation/docs/src/docs/userguide/reference/runtime-configuration/directory_layout.adoc#L40-L53"),
+ Folder(".gradle/wrapper/dists", .downloads, source: "https://github.com/gradle/gradle/blob/master/platforms/documentation/docs/src/docs/userguide/reference/runtime-configuration/directory_layout.adoc#L52"),
+ Folder(".gradle/daemon", .cache, source: "https://github.com/gradle/gradle/blob/master/platforms/documentation/docs/src/docs/userguide/reference/runtime-configuration/directory_layout.adoc#L49"),
]),
Definition(id: "maven", name: "Maven", systemImage: "cup.and.saucer", appBundleIdentifiers: [], folders: [
- Folder(".m2/repository", .environments),
+ Folder(".m2/repository", .environments, source: "https://github.com/apache/maven/blob/master/api/maven-api-settings/src/main/mdo/settings.mdo#L110"),
]),
Definition(id: "sbt", name: "sbt & Coursier", systemImage: "cup.and.saucer", appBundleIdentifiers: [], folders: [
- Folder(".sbt/boot", .downloads),
- Folder(".ivy2/cache", .downloads),
+ Folder(".sbt/boot", .downloads, source: "https://github.com/sbt/website/blob/develop/src/reference/01-Faq/00.md#L283-L284"),
+ Folder(".ivy2/cache", .downloads, source: "https://github.com/apache/ant-ivy/blob/master/asciidoc/settings/caches.adoc#L48"),
// Only the cache. `Coursier/jvm` beside it holds the JVMs `cs java` installed, which `JAVA_HOME`
// points at (https://get-coursier.io/docs/cache and https://get-coursier.io/docs/cli-java).
- Folder("Library/Caches/Coursier/v1", .downloads),
+ Folder("Library/Caches/Coursier/v1", .downloads, source: "https://github.com/coursier/coursier/blob/main/doc/docs/cache.md#L30"),
]),
Definition(id: "konan", name: "Kotlin/Native", systemImage: "cup.and.saucer", appBundleIdentifiers: [], folders: [
- Folder(".konan/dependencies", .downloads),
- Folder(".konan/cache", .buildData),
+ Folder(".konan/dependencies", .downloads, source: "https://github.com/JetBrains/kotlin/blob/master/native/utils/src/org/jetbrains/kotlin/konan/util/DependencyDirectories.kt#L12-L32"),
+ Folder(".konan/cache", .buildData, source: "https://github.com/JetBrains/kotlin/blob/master/native/utils/src/org/jetbrains/kotlin/konan/util/DependencyDirectories.kt#L13-L36"),
]),
// Other languages
Definition(id: "dart", name: "Dart & Flutter", systemImage: "chevron.left.forwardslash.chevron.right", appBundleIdentifiers: [], folders: [
- Folder(".pub-cache/hosted", .downloads),
+ Folder(".pub-cache/hosted", .downloads, source: "https://github.com/dart-lang/site-www/blob/main/src/content/tools/pub/cmd/pub-get.md#L99-L100"),
]),
Definition(id: "composer", name: "Composer", systemImage: "chevron.left.forwardslash.chevron.right", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/composer", .downloads),
- Folder(".composer/cache", .downloads),
+ Folder("Library/Caches/composer", .downloads, source: "https://github.com/composer/composer/blob/main/doc/06-config.md#L1105-L1108"),
+ Folder(".composer/cache", .downloads, source: "https://github.com/composer/composer/blob/main/src/Composer/Factory.php#L122-L128"),
]),
Definition(id: "rubygems", name: "RubyGems & Bundler", systemImage: "shippingbox", appBundleIdentifiers: [], folders: [
- Folder(".gem/ruby/*/cache", .downloads),
- Folder(".gem/specs", .cache),
- Folder(".cache/gem/gems", .downloads),
- Folder(".cache/gem/specs", .cache),
- Folder(".bundle/cache", .downloads),
+ Folder(".gem/ruby/*/cache", .downloads, source: "https://github.com/ruby/rubygems/blob/master/lib/rubygems/specification.rb#L1659-L1660"),
+ Folder(".gem/specs", .cache, source: "https://github.com/ruby/rubygems/blob/master/lib/rubygems/defaults.rb#L23-L30"),
+ Folder(".cache/gem/gems", .downloads, source: "https://github.com/ruby/rubygems/blob/master/lib/rubygems/defaults.rb#L151-L158"),
+ Folder(".cache/gem/specs", .cache, source: "https://github.com/ruby/rubygems/blob/master/lib/rubygems/defaults.rb#L26-L28"),
+ Folder(".bundle/cache", .downloads, source: "https://github.com/ruby/rubygems/blob/master/lib/bundler.rb#L284-L303"),
]),
Definition(id: "nuget", name: "NuGet", systemImage: "shippingbox", appBundleIdentifiers: [], folders: [
- Folder(".nuget/packages", .downloads),
- Folder(".local/share/NuGet/v3-cache", .cache),
- Folder(".local/share/NuGet/plugins-cache", .cache),
+ Folder(".nuget/packages", .downloads, source: "https://github.com/NuGet/docs.microsoft.com-nuget/blob/main/docs/consume-packages/managing-the-global-packages-and-cache-folders.md#L17"),
+ Folder(".local/share/NuGet/v3-cache", .cache, source: "https://github.com/NuGet/docs.microsoft.com-nuget/blob/main/docs/consume-packages/managing-the-global-packages-and-cache-folders.md#L18"),
+ Folder(".local/share/NuGet/plugins-cache", .cache, source: "https://github.com/NuGet/docs.microsoft.com-nuget/blob/main/docs/consume-packages/managing-the-global-packages-and-cache-folders.md#L20"),
]),
Definition(id: "julia", name: "Julia", systemImage: "chevron.left.forwardslash.chevron.right", appBundleIdentifiers: [], folders: [
- Folder(".julia/artifacts", .downloads),
- Folder(".julia/clones", .downloads),
- Folder(".julia/compiled", .buildData),
- Folder(".julia/scratchspaces", .cache),
+ Folder(".julia/artifacts", .downloads, source: "https://github.com/JuliaLang/julia/blob/master/base/initdefs.jl#L111"),
+ Folder(".julia/clones", .downloads, source: "https://github.com/JuliaLang/julia/blob/master/base/initdefs.jl#L112"),
+ Folder(".julia/compiled", .buildData, source: "https://github.com/JuliaLang/julia/blob/master/base/initdefs.jl#L114"),
+ Folder(".julia/scratchspaces", .cache, source: "https://github.com/JuliaLang/julia/blob/master/base/initdefs.jl#L120"),
]),
Definition(id: "nix", name: "Nix", systemImage: "shippingbox", appBundleIdentifiers: [], folders: [
- Folder(".cache/nix", .cache),
+ Folder(".cache/nix", .cache, source: "https://github.com/NixOS/nix/blob/master/src/libutil/include/nix/util/users.hh#L28-L30"),
]),
// Editors
// A JetBrains IDE keeps `LocalHistory` beside its caches: the edits it recorded while a project was
@@ -301,166 +306,166 @@ public enum DeveloperCaches {
"com.jetbrains.CLion", "com.jetbrains.rider", "com.jetbrains.datagrip", "com.jetbrains.AppCode",
"com.jetbrains.rustrover", "com.google.android.studio",
], folders: [
- Folder("Library/Caches/JetBrains/*/caches", .cache),
- Folder("Library/Caches/JetBrains/*/index", .cache),
- Folder("Library/Caches/JetBrains/*/tmp", .cache),
- Folder("Library/Logs/JetBrains", .logs),
+ Folder("Library/Caches/JetBrains/*/caches", .cache, source: "https://github.com/JetBrains/intellij-community/blob/master/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java#L80"),
+ Folder("Library/Caches/JetBrains/*/index", .cache, source: "https://github.com/JetBrains/intellij-community/blob/master/platform/util/src/com/intellij/openapi/application/PathManager.java#L648-L651"),
+ Folder("Library/Caches/JetBrains/*/tmp", .cache, source: "https://github.com/JetBrains/intellij-community/blob/master/platform/util/src/com/intellij/openapi/application/PathManager.java#L634-L636"),
+ Folder("Library/Logs/JetBrains", .logs, source: "https://www.jetbrains.com/help/idea/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html"),
]),
Definition(id: "vscode", name: "Visual Studio Code", systemImage: "curlybraces", appBundleIdentifiers: ["com.microsoft.VSCode"], folders: [
- Folder("Library/Application Support/Code/Cache", .cache),
- Folder("Library/Application Support/Code/CachedData", .cache),
- Folder("Library/Application Support/Code/CachedExtensionVSIXs", .downloads),
+ Folder("Library/Application Support/Code/Cache", .cache, source: "https://github.com/electron/electron/blob/main/shell/browser/net/network_context_service.cc#L94-L95"),
+ Folder("Library/Application Support/Code/CachedData", .cache, source: "https://github.com/microsoft/vscode/blob/main/src/main.ts#L648-L666"),
+ Folder("Library/Application Support/Code/CachedExtensionVSIXs", .downloads, source: "https://github.com/microsoft/vscode/blob/main/src/vs/platform/environment/common/environmentService.ts#L127"),
]),
Definition(id: "vscodium", name: "VSCodium", systemImage: "curlybraces", appBundleIdentifiers: ["com.vscodium"], folders: [
- Folder("Library/Application Support/VSCodium/Cache", .cache),
- Folder("Library/Application Support/VSCodium/CachedData", .cache),
- Folder("Library/Application Support/VSCodium/CachedExtensionVSIXs", .downloads),
- Folder("Library/Caches/com.vscodium", .cache),
+ Folder("Library/Application Support/VSCodium/Cache", .cache, source: "https://github.com/VSCodium/vscodium/blob/master/docs/migration.md#L23"),
+ Folder("Library/Application Support/VSCodium/CachedData", .cache, source: "https://github.com/VSCodium/vscodium/blob/master/docs/migration.md#L23"),
+ Folder("Library/Application Support/VSCodium/CachedExtensionVSIXs", .downloads, source: "https://github.com/VSCodium/vscodium/blob/master/docs/migration.md#L23"),
+ Folder("Library/Caches/com.vscodium", .cache, source: "https://developer.apple.com/documentation/foundation/filemanager/searchpathdirectory/cachesdirectory"),
]),
Definition(id: "cursor", name: "Cursor", systemImage: "curlybraces", appBundleIdentifiers: ["com.todesktop.230313mzl4w4u92"], folders: [
- Folder("Library/Application Support/Cursor/Cache", .cache),
- Folder("Library/Application Support/Cursor/CachedData", .cache),
+ Folder("Library/Application Support/Cursor/Cache", .cache, source: "https://github.com/microsoft/vscode/blob/main/src/vs/platform/environment/node/userDataPath.ts#L95-L105"),
+ Folder("Library/Application Support/Cursor/CachedData", .cache, source: "https://github.com/microsoft/vscode/blob/main/src/main.ts#L666"),
]),
Definition(id: "windsurf", name: "Windsurf & Devin", systemImage: "curlybraces", appBundleIdentifiers: ["com.exafunction.windsurf", "ai.cognition.devin"], folders: [
- Folder("Library/Application Support/Devin/Cache", .cache),
- Folder("Library/Application Support/Devin/CachedData", .cache),
- Folder("Library/Application Support/Windsurf/Cache", .cache),
- Folder("Library/Application Support/Windsurf/CachedData", .cache),
+ Folder("Library/Application Support/Devin/Cache", .cache, source: "https://docs.devin.ai/desktop/cascade/workflows"),
+ Folder("Library/Application Support/Devin/CachedData", .cache, source: "https://docs.devin.ai/desktop/cascade/workflows"),
+ Folder("Library/Application Support/Windsurf/Cache", .cache, source: "https://docs.devin.ai/desktop/cascade/workflows"),
+ Folder("Library/Application Support/Windsurf/CachedData", .cache, source: "https://docs.devin.ai/desktop/cascade/workflows"),
]),
Definition(id: "nova", name: "Nova", systemImage: "curlybraces", appBundleIdentifiers: ["com.panic.Nova"], folders: [
- Folder("Library/Caches/com.panic.Nova", .cache),
+ Folder("Library/Caches/com.panic.Nova", .cache, source: "https://developer.apple.com/documentation/foundation/filemanager/searchpathdirectory/cachesdirectory"),
]),
Definition(id: "zed", name: "Zed", systemImage: "curlybraces", appBundleIdentifiers: ["dev.zed.Zed"], folders: [
- Folder("Library/Caches/Zed", .cache),
+ Folder("Library/Caches/Zed", .cache, source: "https://github.com/zed-industries/zed/blob/main/crates/paths/src/paths.rs#L192-L199"),
]),
Definition(id: "sublime", name: "Sublime Text", systemImage: "curlybraces", appBundleIdentifiers: ["com.sublimetext.4", "com.sublimetext.3"], folders: [
- Folder("Library/Caches/Sublime Text", .cache),
- Folder("Library/Caches/com.sublimetext.4", .cache),
- Folder("Library/Caches/com.sublimetext.3", .cache),
+ Folder("Library/Caches/Sublime Text", .cache, source: "https://www.sublimetext.com/docs/revert.html"),
+ Folder("Library/Caches/com.sublimetext.4", .cache, source: "https://developer.apple.com/documentation/foundation/filemanager/searchpathdirectory/cachesdirectory"),
+ Folder("Library/Caches/com.sublimetext.3", .cache, source: "https://developer.apple.com/documentation/foundation/filemanager/searchpathdirectory/cachesdirectory"),
]),
Definition(id: "androidstudio", name: "Android Studio", systemImage: "curlybraces", appBundleIdentifiers: ["com.google.android.studio"], folders: [
- Folder("Library/Caches/Google/AndroidStudio*/caches", .cache),
- Folder("Library/Caches/Google/AndroidStudio*/index", .cache),
- Folder("Library/Caches/Google/AndroidStudio*/tmp", .cache),
- Folder("Library/Logs/Google/AndroidStudio*", .logs),
+ Folder("Library/Caches/Google/AndroidStudio*/caches", .cache, source: "https://developer.android.com/studio/troubleshoot"),
+ Folder("Library/Caches/Google/AndroidStudio*/index", .cache, source: "https://developer.android.com/studio/troubleshoot"),
+ Folder("Library/Caches/Google/AndroidStudio*/tmp", .cache, source: "https://developer.android.com/studio/troubleshoot"),
+ Folder("Library/Logs/Google/AndroidStudio*", .logs, source: "https://developer.android.com/studio/troubleshoot"),
]),
Definition(id: "neovim", name: "Neovim", systemImage: "curlybraces", appBundleIdentifiers: [], folders: [
- Folder(".cache/nvim", .cache),
- Folder(".local/share/nvim/lazy", .environments),
- Folder(".local/share/nvim/lazy-rocks", .environments),
- Folder(".local/share/nvim/mason", .environments),
- Folder(".local/state/nvim/lazy", .cache),
+ Folder(".cache/nvim", .cache, source: "https://github.com/neovim/neovim/blob/master/runtime/doc/starting.txt#L1404-L1405"),
+ Folder(".local/share/nvim/lazy", .environments, source: "https://github.com/folke/lazy.nvim/blob/main/lua/lazy/core/config.lua#L8"),
+ Folder(".local/share/nvim/lazy-rocks", .environments, source: "https://github.com/folke/lazy.nvim/blob/main/lua/lazy/core/config.lua#L61"),
+ Folder(".local/share/nvim/mason", .environments, source: "https://github.com/mason-org/mason.nvim/blob/main/lua/mason/settings.lua#L9"),
+ Folder(".local/state/nvim/lazy", .cache, source: "https://github.com/folke/lazy.nvim/blob/main/lua/lazy/core/config.lua#L220-L225"),
]),
// Cloud tools
Definition(id: "gcloud", name: "Google Cloud CLI", systemImage: "cloud", appBundleIdentifiers: [], folders: [
- Folder(".config/gcloud/logs", .logs),
+ Folder(".config/gcloud/logs", .logs, source: "https://docs.cloud.google.com/compute/docs/troubleshooting/general-tips"),
]),
Definition(id: "azure", name: "Azure CLI", systemImage: "cloud", appBundleIdentifiers: [], folders: [
- Folder(".azure/logs", .logs),
- Folder(".azure/telemetry", .cache),
+ Folder(".azure/logs", .logs, source: "https://github.com/microsoft/knack/blob/dev/knack/log.py#L182-L184"),
+ Folder(".azure/telemetry", .cache, source: "https://github.com/Azure/azure-cli/blob/dev/src/azure-cli-telemetry/azure/cli/telemetry/util.py#L30"),
]),
Definition(id: "kubectl", name: "kubectl", systemImage: "cloud", appBundleIdentifiers: [], folders: [
- Folder(".kube/cache/discovery", .cache),
- Folder(".kube/cache/http", .cache),
+ Folder(".kube/cache/discovery", .cache, source: "https://github.com/kubernetes/cli-runtime/blob/master/pkg/genericclioptions/config_flags.go#L317-L331"),
+ Folder(".kube/cache/http", .cache, source: "https://github.com/kubernetes/cli-runtime/blob/master/pkg/genericclioptions/config_flags.go#L317"),
]),
Definition(id: "helm", name: "Helm", systemImage: "cloud", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/helm", .cache),
+ Folder("Library/Caches/helm", .cache, source: "https://github.com/helm/helm/blob/main/pkg/helmpath/lazypath_darwin.go#L32-L34"),
]),
Definition(id: "githubcli", name: "GitHub CLI", systemImage: "cloud", appBundleIdentifiers: [], folders: [
- Folder(".cache/gh", .cache),
+ Folder(".cache/gh", .cache, source: "https://github.com/cli/go-gh/blob/trunk/pkg/config/config.go#L299-L306"),
]),
Definition(id: "terraform", name: "Terraform", systemImage: "cloud", appBundleIdentifiers: [], folders: [
- Folder(".terraform.d/plugin-cache", .environments),
+ Folder(".terraform.d/plugin-cache", .environments, source: "https://developer.hashicorp.com/terraform/cli/config/config-file"),
]),
Definition(id: "pulumi", name: "Pulumi", systemImage: "cloud", appBundleIdentifiers: [], folders: [
- Folder(".pulumi/plugins", .downloads),
+ Folder(".pulumi/plugins", .downloads, source: "https://github.com/pulumi/docs/blob/master/content/docs/iac/concepts/plugins.md#L83"),
]),
Definition(id: "vercel", name: "Vercel CLI", systemImage: "cloud", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/com.vercel.cli", .cache),
+ Folder("Library/Caches/com.vercel.cli", .cache, source: "https://github.com/vercel/vercel/blob/main/packages/cli-config/src/paths.ts#L33-L35"),
]),
// Netlify keeps its token in `config.json` in the same folder, so only these two subfolders are listed.
Definition(id: "netlify", name: "Netlify CLI", systemImage: "cloud", appBundleIdentifiers: [], folders: [
- Folder("Library/Preferences/netlify/deno-cli", .downloads),
- Folder("Library/Preferences/netlify/tunnel", .downloads),
+ Folder("Library/Preferences/netlify/deno-cli", .downloads, source: "https://github.com/netlify/build/blob/main/packages/edge-bundler/node/bridge.ts#L66"),
+ Folder("Library/Preferences/netlify/tunnel", .downloads, source: "https://github.com/netlify/cli/blob/main/src/utils/live-tunnel.ts#L86"),
]),
Definition(id: "firebase", name: "Firebase CLI", systemImage: "cloud", appBundleIdentifiers: [], folders: [
- Folder(".cache/firebase", .downloads),
+ Folder(".cache/firebase", .downloads, source: "https://github.com/firebase/firebase-tools/blob/main/src/emulator/downloadableEmulators.ts#L29-L30"),
]),
// Build systems and media
Definition(id: "ccache", name: "ccache", systemImage: "gearshape.2", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/ccache", .buildData),
+ Folder("Library/Caches/ccache", .buildData, source: "https://github.com/ccache/ccache/blob/master/doc/manual.adoc#L575-L577"),
// A legacy `~/.ccache` also holds `ccache.conf` (https://ccache.dev/manual/latest.html), so only
// the cache's own shards and its temporary folder are named.
- Folder(".ccache/[0-9a-f]", .buildData),
- Folder(".ccache/tmp", .buildData),
+ Folder(".ccache/[0-9a-f]", .buildData, source: "https://github.com/ccache/ccache/blob/master/doc/manual.adoc#L375-L376"),
+ Folder(".ccache/tmp", .buildData, source: "https://github.com/ccache/ccache/blob/master/doc/manual.adoc#L1246-L1252"),
]),
Definition(id: "bazel", name: "Bazel", systemImage: "gearshape.2", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/bazel", .buildData),
- Folder("Library/Caches/bazelisk", .downloads),
+ Folder("Library/Caches/bazel", .buildData, source: "https://github.com/bazelbuild/bazel/blob/master/docs/remote/output-directories.mdx#L32-L41"),
+ Folder("Library/Caches/bazelisk", .downloads, source: "https://github.com/bazelbuild/bazelisk/blob/master/README.md#L312"),
]),
Definition(id: "unity", name: "Unity", systemImage: "cube.transparent", appBundleIdentifiers: [], folders: [
// The Package Manager's cache of downloaded packages: `Library/Unity/cache` up to Unity 2022.3, and
// `Library/Caches/Unity/upm` from Unity 6 (docs.unity3d.com, Manual/upm-cache.html for each version).
- Folder("Library/Caches/Unity/upm", .downloads),
- Folder("Library/Unity/cache", .downloads),
+ Folder("Library/Caches/Unity/upm", .downloads, source: "https://docs.unity3d.com/Manual/upm-cache.html"),
+ Folder("Library/Unity/cache", .downloads, source: "https://docs.unity3d.com/2022.3/Documentation/Manual/upm-cache.html"),
]),
Definition(id: "blender", name: "Blender", systemImage: "cube.transparent", appBundleIdentifiers: ["org.blenderfoundation.blender"], folders: [
- Folder("Library/Caches/Blender", .cache),
+ Folder("Library/Caches/Blender", .cache, source: "https://projects.blender.org/blender/blender/src/branch/main/source/blender/blenkernel/intern/appdir.cc#L228"),
]),
Definition(id: "adobe", name: "Adobe Media Cache", systemImage: "play.rectangle", appBundleIdentifiers: [], folders: [
- Folder("Library/Application Support/Adobe/Common/Media Cache Files", .cache),
- Folder("Library/Application Support/Adobe/Common/Media Cache", .cache),
+ Folder("Library/Application Support/Adobe/Common/Media Cache Files", .cache, source: "https://helpx.adobe.com/premiere/desktop/troubleshooting/media-issues/manage-media-cache.html"),
+ Folder("Library/Application Support/Adobe/Common/Media Cache", .cache, source: "https://helpx.adobe.com/premiere/desktop/troubleshooting/media-issues/manage-media-cache.html"),
]),
// Quantum computing. Everything else these SDKs write in the home folder is settings or an account
// token, so only these three folders are listed.
Definition(id: "dwave", name: "D-Wave Ocean", systemImage: "atom", appBundleIdentifiers: [], folders: [
- Folder("Library/Caches/dwave-cloud-client", .cache),
+ Folder("Library/Caches/dwave-cloud-client", .cache, source: "https://github.com/dwavesystems/dwave-cloud-client/blob/master/dwave/cloud/config/loaders.py#L283-L289"),
]),
Definition(id: "qutip", name: "QuTiP", systemImage: "atom", appBundleIdentifiers: [], folders: [
- Folder(".qutip/qutip_coeffs_*", .buildData),
+ Folder(".qutip/qutip_coeffs_*", .buildData, source: "https://github.com/qutip/qutip/blob/master/qutip/settings.py#L278-L283"),
]),
Definition(id: "qbraid", name: "qBraid", systemImage: "atom", appBundleIdentifiers: [], folders: [
- Folder(".qbraid/environments", .environments),
+ Folder(".qbraid/environments", .environments, source: "https://docs.qbraid.com/cli/user-guide/environments"),
]),
// Models and datasets
Definition(id: "ollama", name: "Ollama", systemImage: "brain", appBundleIdentifiers: [], folders: [
- Folder(".ollama/models", .models),
- Folder(".ollama/logs", .logs),
+ Folder(".ollama/models", .models, source: "https://github.com/ollama/ollama/blob/main/docs/faq.mdx#L233-L236"),
+ Folder(".ollama/logs", .logs, source: "https://github.com/ollama/ollama/blob/main/docs/macos.mdx#L26-L28"),
]),
Definition(id: "lmstudio", name: "LM Studio", systemImage: "brain", appBundleIdentifiers: [], folders: [
- Folder(".lmstudio/models", .models),
- Folder(".cache/lm-studio/models", .models),
+ Folder(".lmstudio/models", .models, source: "https://lmstudio.ai/docs/app/advanced/import-model"),
+ Folder(".cache/lm-studio/models", .models, source: "https://lmstudio.ai/blog/lmstudio-v0.3.6"),
]),
Definition(id: "huggingface", name: "Hugging Face", systemImage: "brain", appBundleIdentifiers: [], folders: [
- Folder(".cache/huggingface/hub", .models),
- Folder(".cache/huggingface/datasets", .models),
- Folder(".cache/huggingface/xet", .cache),
- Folder(".cache/huggingface/assets", .cache),
- Folder(".cache/huggingface/transformers", .models),
+ Folder(".cache/huggingface/hub", .models, source: "https://github.com/huggingface/huggingface_hub/blob/main/docs/source/en/package_reference/environment_variables.md#L37-L42"),
+ Folder(".cache/huggingface/datasets", .models, source: "https://github.com/huggingface/datasets/blob/main/docs/source/cache.mdx#L20"),
+ Folder(".cache/huggingface/xet", .cache, source: "https://github.com/huggingface/huggingface_hub/blob/main/docs/source/en/package_reference/environment_variables.md#L44-L48"),
+ Folder(".cache/huggingface/assets", .cache, source: "https://github.com/huggingface/huggingface_hub/blob/main/docs/source/en/package_reference/environment_variables.md#L50-L56"),
+ Folder(".cache/huggingface/transformers", .models, source: "https://github.com/huggingface/transformers/blob/v4.21.3/src/transformers/utils/hub.py#L70"),
]),
Definition(id: "torch", name: "PyTorch", systemImage: "brain", appBundleIdentifiers: [], folders: [
- Folder(".cache/torch/hub", .models),
- Folder(".cache/torch/transformers", .models),
+ Folder(".cache/torch/hub", .models, source: "https://github.com/pytorch/pytorch/blob/main/docs/source/hub.md#L122-L124"),
+ Folder(".cache/torch/transformers", .models, source: "https://github.com/huggingface/transformers/blob/v4.21.3/src/transformers/utils/hub.py#L65"),
]),
Definition(id: "mlxdata", name: "MLX Data", systemImage: "brain", appBundleIdentifiers: [], folders: [
- Folder(".cache/mlx.data", .models),
+ Folder(".cache/mlx.data", .models, source: "https://github.com/ml-explore/mlx-data/blob/main/python/mlx/data/datasets/common.py#L11"),
]),
Definition(id: "whisper", name: "Whisper", systemImage: "brain", appBundleIdentifiers: [], folders: [
- Folder(".cache/whisper", .models),
+ Folder(".cache/whisper", .models, source: "https://github.com/openai/whisper/blob/main/whisper/__init__.py#L119-L134"),
]),
Definition(id: "gpt4all", name: "GPT4All", systemImage: "brain", appBundleIdentifiers: [], folders: [
- Folder(".cache/gpt4all", .models),
+ Folder(".cache/gpt4all", .models, source: "https://github.com/nomic-ai/gpt4all/blob/main/gpt4all-bindings/python/gpt4all/gpt4all.py#L36"),
]),
Definition(id: "tensorflow", name: "TensorFlow Datasets", systemImage: "brain", appBundleIdentifiers: [], folders: [
- Folder("tensorflow_datasets", .models),
+ Folder("tensorflow_datasets", .models, source: "https://github.com/tensorflow/datasets/blob/master/tensorflow_datasets/core/constants.py#L36-L37"),
]),
Definition(id: "keras", name: "Keras", systemImage: "brain", appBundleIdentifiers: [], folders: [
- Folder(".keras/datasets", .models),
- Folder(".keras/models", .models),
+ Folder(".keras/datasets", .models, source: "https://github.com/keras-team/keras/blob/master/keras/src/utils/file_utils.py#L230-L232"),
+ Folder(".keras/models", .models, source: "https://github.com/keras-team/keras/blob/master/keras/src/applications/resnet.py#L209"),
]),
Definition(id: "nltk", name: "NLTK Data", systemImage: "brain", appBundleIdentifiers: [], folders: [
- Folder("nltk_data", .models),
+ Folder("nltk_data", .models, source: "https://github.com/nltk/nltk/blob/develop/nltk/downloader.py#L1399-L1402"),
]),
]
@@ -496,6 +501,7 @@ public enum DeveloperCaches {
url: url,
kind: folder.kind(at: url),
size: contents.flatMap { $0.couldNotBeRead ? nil : $0.size },
+ source: folder.source,
couldNotBeRead: contents?.couldNotBeRead == true
))
}
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
index 54467977..8cb7d471 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
@@ -10,7 +10,7 @@ struct DeveloperCachesTests {
for path in paths {
try directory.directory(path)
}
- let tool = DeveloperCaches.Definition(id: "tool", name: "Tool", systemImage: "hammer", appBundleIdentifiers: [], folders: paths.map { DeveloperCaches.Folder($0, .cache) })
+ let tool = DeveloperCaches.Definition(id: "tool", name: "Tool", systemImage: "hammer", appBundleIdentifiers: [], folders: paths.map { DeveloperCaches.Folder($0, .cache, source: "https://example.com") })
let unanswered = Unanswered()
let stop = try await unanswered.stop {
@@ -167,6 +167,17 @@ struct DeveloperCachesTests {
}
}
+ /// Every folder the table offers names where its tool documents it: a page, or the file inside Xcode that names
+ /// it, for the folders Apple documents nowhere else.
+ @Test func everyFolderNamesItsSource() {
+ for definition in DeveloperCaches.definitions {
+ for folder in definition.folders {
+ let isAPage = folder.source.hasPrefix("https://") && URL(string: folder.source)?.host() != nil
+ #expect(isAPage || folder.source.hasPrefix("Xcode 27: "), "\(definition.id)'s \(folder.path) names \(folder.source)")
+ }
+ }
+ }
+
@Test func everyDefinitionIsDistinctAndNoFolderIsCountedTwice() {
let identifiers = DeveloperCaches.definitions.map(\.id)
#expect(Set(identifiers).count == identifiers.count)
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/FileCommandTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/FileCommandTests.swift
index 6d36d75d..b9f0f6e5 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/FileCommandTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/FileCommandTests.swift
@@ -43,7 +43,7 @@ struct FileCommandTests {
systemImage: "hammer",
appBundleIdentifiers: [],
locations: try locations.map { path, kind in
- DeveloperEnvironment.Location(url: try directory.file("home/\(path)/blob", bytes: 30).deletingLastPathComponent(), kind: kind, size: 30)
+ DeveloperEnvironment.Location(url: try directory.file("home/\(path)/blob", bytes: 30).deletingLastPathComponent(), kind: kind, size: 30, source: "https://example.com/\(path)")
}
)
}
@@ -376,6 +376,16 @@ struct FileCommandTests {
])
}
+ /// A script reading `peel caches --json` gets, for each folder, where its tool documents it.
+ @Test func tellsWhereEachCacheIsDocumented() throws {
+ let directory = try TemporaryDirectory()
+ let tool = try environment("Rust", id: "rust", locations: [("Library/Caches/cargo", .cache)], in: directory)
+
+ let json = try Output.jsonText(CachesCommand.records(for: [tool]))
+
+ #expect(json.contains("\"source\" : \"https://example.com/Library/Caches/cargo\""))
+ }
+
@Test func saysEveryCacheLocationWithItsKind() throws {
let directory = try TemporaryDirectory()
let tool = try environment("Rust", id: "rust", locations: [