Apply Finder view settings recursively across folders on macOS.
mac-set-view opens each folder with Finder, applies your preferred view options, then closes the window so Finder writes the folder metadata into .DS_Store. It is a Python 3.14 CLI managed with uv.
- Set Finder view style: icon, list, column, or gallery.
- Limit recursion with
--depth. - Skip noisy folders and macOS package bundles.
- Configure icon size and text size.
- Arrange icon view by name, kind, size, date, label, or grid.
- Configure list sort column, sort direction, visible columns, and folder size calculation.
- Preview target folders with
--dry-run.
uv tool install git+https://github.com/aspizu/mac-set-viewOr from a local checkout:
uv tool install .Create the default config:
uv run mac-set-view --init-configPreview folders that would be changed:
uv run mac-set-view --dry-runApply settings to a subtree:
uv run mac-set-view --start "$HOME/Documents" --depth 2Override config from CLI:
uv run mac-set-view --view list --sort-by size --sort-direction reversed --columns name,size,kind --calculate-all-sizes
uv run mac-set-view --view icon --arrange-by kind--group-by remains accepted as a deprecated alias for --arrange-by. Finder AppleScript exposes icon arrangement, not true Finder "Group By".
Default config path:
~/Library/Application Support/dev.aspizu.mac-set-view/config.toml
Example:
ignore = [
"Library/",
".Trash/",
".git/",
"node_modules/",
"target/",
".cache/",
"*.app/",
"*.bundle/",
"*.framework/",
"*.key/",
"*.kext/",
"*.numbers/",
"*.pages/",
"*.photoslibrary/",
"*.pkg/",
"*.rtfd/",
]
depth = 3
[view]
style = "list"
icon_size = 64
text_size = 12
arrange_by = "kind"
sort_by = "size"
sort_direction = "reversed"
columns = ["name", "modification-date", "size", "kind"]
calculate_all_sizes = trueIgnore patterns use gitignore syntax. Use --config /path/to/config.toml to choose another config file.
--start <PATH> Start directory. Defaults to home directory.
--config <PATH> Config file path.
--init-config Create default config file if missing.
--dry-run Print folders without changing Finder metadata.
--depth <N> Maximum walk depth. 0 applies only start directory.
--view <STYLE> icon, list, column, gallery.
--icon-size <N> Finder icon size. List view maps <=16 to small, larger to large.
--text-size <N> Finder item text size.
--arrange-by <FIELD> none, grid, name, modification-date, creation-date, size, kind, label.
--sort-by <COLUMN> name, modification-date, creation-date, size, kind, label, version, comment.
--sort-direction <DIR> normal or reversed.
--columns <LIST> Comma-separated list view columns.
--calculate-all-sizes Calculate folder sizes in list view.
- macOS only.
- Finder may prompt for automation permission on first run.
- App bundles and common package directories are skipped because Finder opens them as files or documents, not normal folders.
- True Finder "Group By" is not exposed by Finder AppleScript;
arrange_bycontrols icon arrangement.
uv sync
uv run ruff format --check .
uv run ruff check .
uv run pytest