Documentation / Settings file

Settings file

The app saves all settings in one JSON file. You can edit it by hand: Coldpack reads it again every minute and applies a valid change at once. Most keys have a control in the Settings window.

Location: ~/Library/Application Support/Coldpack/settings.json. Check a file with coldpack config check, and see what is in effect with coldpack config show.

Version 7. The file has "version": 7. Older files (1 to 6) migrate without loss. A file with a higher version still loads, and unknown keys become warnings.

All keys

KeyDefaultMeaning
includehome, /Applications (a new install: see Getting started)The folders watched and scanned. Absolute paths, not empty.
rulesmedia, code and cloud skip rulesOrdered list. See below.
cooldownHours6Quiet period after the last change. At least 0.
minAgeDays0The modification date must be older than this. At least 0; 0 is off.
activeHours"" (always)HH:MM-HH:MM in local time. May cross midnight.
ratioThreshold0.85Skip a file when the sample compresses to more than this share. In (0, 1]. The app shows it as "Minimum saving".
minSizeKiB16Minimum file size. At least 0.
maxSizeGiB4Maximum file size. Above 0. Saved and validated; the engine does not apply it yet.
dryRuntrueEstimate only.
pausedfalsePaused.
pauseOnBatterytrueDo not work on battery.
pauseWhenHottrueDo not work when the thermal state is serious or critical, or in Low Power Mode.
idleMinutes5Wait this long after the last keyboard or pointer input. 0 means no idle requirement.
filesPerMinute200The most files per tick. At least 1.
churn.baseDays1First backoff. Saved and validated; not read by the engine yet.
churn.capDays32Longest backoff. At least baseDays.
churn.directoryStrikes3Files of one folder that must come back before the folder backs off. At least 1.
welcomeShownfalseSet after the welcome window.
wasteDisabled[]Ids of cleanup catalog entries you turned off.
wastePatterns[]Your own cleanup patterns: { "pattern", "kind": "path|glob|name", "category"?, "minAgeDays"? }.
dedupMode"suggest"Duplicate files: off, suggest or automatic (details).
dedupMinSizeMiB1Smaller files are not checked. Above 0.
dedupMinAgeDays7A copy changed in this period is not replaced. 0 or more.
dedupSourceFoldersiCloud Drive, ~/Library/CloudStorage, /Volumes/GoogleDriveA file here is always the source and is never replaced. Entries start with / or ~/.
dedupSpotlighttrueRead large files from the Spotlight index; the file map keeps only the others.
dedupRescanDays30Days between two slow walks that refresh the file map. 0 = only on request.

Rules

A rule is an object. It needs an action, either skip or compress.

KeyMeaning
actionskip or compress. Required.
globA path pattern. See Rules and scope.
extensionsA list of extensions, with or without the dot.
minSizeKiB, maxSizeKiBInclusive size limits in KiB (1 KiB = 1,024 bytes). The minimum may not be above the maximum.
executabletrue: any executable bit is set. false: none.
cooldownHours, minAgeDays, ratioThresholdOnly for compress rules. They replace the global values for the files the rule matches.

Cloud folder skips are editable rules. Files below version 5 receive the missing cloud defaults before their own rules. After saving as version 5, removed rules stay removed and your chosen rule order is kept. Add skip rules for custom mirrors and other synchronized folders outside the known locations.

Example

{
  "version": 7,
  "include": ["/Users/me", "/Applications"],
  "dryRun": false,
  "cooldownHours": 6,
  "activeHours": "22:00-06:00",
  "idleMinutes": 5,
  "rules": [
    { "action": "skip", "glob": "~/Music" },
    { "action": "skip", "glob": "~/Library/Mobile Documents" },
    { "action": "skip", "glob": "~/Library/CloudStorage" },
    { "action": "skip", "glob": "/Volumes/GoogleDrive" },
    { "action": "skip", "glob": "**/node_modules/**" },
    { "action": "compress", "glob": "**/Library/Logs/**", "cooldownHours": 1 }
  ]
}

When the file is invalid

Coldpack keeps the last valid settings (the defaults at the first start), writes the error to the log once, shows it in the popover, and refuses to run a command-line command on that file. An unknown key or a wrong type is an error with the key name in the message, for example unknown key "churn.capDay".

Saving safely

Before the app saves, it compares the file with what it last read or wrote. If you changed it on disk, or it is invalid, or it comes from a newer version, you choose to cancel, overwrite (the old file is first copied to settings.json.bak), or load the file.

Older files

A file with no version, or version: 1, may hold only include, exclude, cooldownHours, ratioThreshold, minSizeKiB, dryRun and paused. Each entry of the old exclude list becomes a skip rule above your own rules. The file on disk is not rewritten until the next save.