Hide (and show again) every file and folder on your macOS Desktop with a single command.
While participants were setting up their presentations for the SCB TechX Hackathon pitches, I noticed that many of their desktops were cluttered with screenshots, folders, and other files that had nothing to do with their presentations. How might we give people a single command to hide their desktop icons, without having to remember or look up an obscure terminal command?
Install the CLI globally (requires Node.js 18 or later):
# npm
$ npm install -g hide-files
# yarn
$ yarn global add hide-files
# pnpm
$ pnpm add -g hide-filesHide the clutter on your Desktop 🤫
$ hide-files hideShow all files and folders on your Desktop again
$ hide-files unhidehide-files sets the macOS hidden flag on each item with chflags. It skips dotfiles (such as .DS_Store), and nothing is moved or deleted. Note that unhide shows every item on your Desktop, including any you had hidden yourself before running hide.
$ pnpm install
$ pnpm test # run the unit tests
$ pnpm lint # check lint and formatting (pnpm lint:fix to fix)
$ pnpm build # compile TypeScript to JavaScriptThis project is inspired by Raycast's Hide Files extension, which is fully open source.

