[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-115000":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":9,"pushedAt":25,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":15,"starSnapshotCount":15,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},115000,"fix-storage","govijr\u002Ffix-storage","govijr","A CLI to fix your mac's & linux machine's storage problems, just run fix-storage.",null,"TypeScript",347,22,64,5,0,18,231,211,94.09,"MIT License",false,"main",true,[],"2026-11-22 03:18:53","2026-11-23 19:28:16","\u003Cdiv align=\"center\">\n\n# fix-storage\n\n**See what is filling your disk on macOS or Linux, find the culprit, and clear what is safe to clear, from the terminal.**\n\n[![CI](https:\u002F\u002Fgithub.com\u002Fgovijr\u002Ffix-storage\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fgovijr\u002Ffix-storage\u002Factions\u002Fworkflows\u002Fci.yml)\n[![Release](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Fgovijr\u002Ffix-storage?color=4ade80)](https:\u002F\u002Fgithub.com\u002Fgovijr\u002Ffix-storage\u002Freleases)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg)](LICENSE)\n![macOS | Linux](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatform-macOS%20%7C%20Linux-lightgrey)\n\n\u003Cimg width=\"3344\" height=\"2160\" alt=\"image\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fbbd9ade2-e996-4e2f-9979-ff73b57738f1\" \u002F>\n\n\u003C\u002Fdiv>\n\n```bash\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fgovijr\u002Ffix-storage\u002Fmain\u002Finstall.sh | sh\n```\n\n---\n\n## Why\n\n\"System Data: 86 GB\" and a full disk warning don't tell you what to do. fix-storage measures your disk the way Finder's Storage panel does, then goes further:\n\n- **Finds the culprit.** Under every big folder it prints where the space actually is, following the biggest subfolder down: `└ mostly in app\u002Fnode_modules\u002F  31.2 GB · 77%  junk`. Press `g` to jump straight there.\n- **Labels everything.** Each item is tagged `junk`, `unused`, `system` or left as yours, with a one-line reason: *rebuilds with npm install · not touched in 7 months*, *installer · not needed once installed*, *screen capture from 3 weeks ago*.\n- **Shows when you last used it.** Last-opened dates come from Spotlight (on Linux, from file access times), so an app you haven't opened in two years stands out.\n- **Every drive, dual boot included (Linux).** Each mounted drive gets its own scan; a Windows partition or another Linux install is shown look only, with labels that say what to do about it from that system.\n- **Clears safely.** Caches and the Trash are cleared for good; everything else goes to the Trash so you can get it back. Nothing is removed without a second keypress.\n- **Feels like a terminal tool.** One monospace font, keyboard first, mouse optional, with a live dot-matrix disk meter drawn in real pixels.\n\n## Install\n\n```bash\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fgovijr\u002Ffix-storage\u002Fmain\u002Finstall.sh | sh\n```\n\nThe installer puts the app in `~\u002F.fix-storage` and links the `fix-storage` command into `~\u002F.local\u002Fbin`. It needs no `sudo`.\n\n**Requirements**\n\n- macOS (Apple silicon or Intel), or Linux (x86_64 or arm64)\n- Node.js 20.11 or newer (`brew install node`, or your distribution's `nodejs` and `npm` packages)\n- On Linux: `unzip`, used once to unpack the graphics runtime. The runtime is Electron-based, so it needs the libraries any desktop already has; on a bare server use `--plain`.\n- For the graphical view: a terminal with the kitty graphics protocol, such as [Ghostty](https:\u002F\u002Fghostty.org), [kitty](https:\u002F\u002Fsw.kovidgoyal.net\u002Fkitty\u002F), [WezTerm](https:\u002F\u002Fwezfurlong.org\u002Fwezterm\u002F) or iTerm2. Other terminals get a character-only view.\n\n\u003Cdetails>\n\u003Csummary>Other install options\u003C\u002Fsummary>\n\n```bash\n# A specific version\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fgovijr\u002Ffix-storage\u002Fmain\u002Finstall.sh | sh -s -- --version 0.2.0\n\n# Somewhere else\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fgovijr\u002Ffix-storage\u002Fmain\u002Finstall.sh | FIX_STORAGE_HOME=~\u002Fapps\u002Ffix-storage FIX_STORAGE_BIN=~\u002Fbin sh\n\n# From source\ngit clone https:\u002F\u002Fgithub.com\u002Fgovijr\u002Ffix-storage && cd fix-storage\nnpm install && npm start\n# On Linux, if npm install fails with EXDEV (a tmpfs \u002Ftmp):\nmkdir -p .tmp && TMPDIR=$PWD\u002F.tmp npm install\n```\n\n\u003C\u002Fdetails>\n\n## Usage\n\n```bash\nfix-storage              # scan your disk and open the interactive view\nfix-storage --dry-run    # same, but deleting only pretends\nfix-storage --demo       # a made-up disk, to try the interface; reads and deletes nothing\nfix-storage --plain      # print a text summary and exit\nfix-storage --json       # print the summary as JSON and exit\n\n# Linux\nfix-storage --drives             # list mounted drives, and partitions that are not mounted\nfix-storage --drive \u002Fmnt\u002Fgames   # start on a drive: its number, name, label, device or any path on it\nfix-storage --plain --drive 2    # text summary of the second drive\n```\n\n> [!TIP]\n> On macOS, give your terminal **Full Disk Access** (System Settings → Privacy & Security → Full Disk Access) so the scan can read Mail, Messages, Safari and other protected folders. Without it, those folders are counted under *System data*.\n>\n> On Linux, run it as yourself, not with `sudo`. Folders only root can read (Docker's images, `\u002Froot`) are counted under *System data*.\n\n### Keys\n\n| Key | In the category list | In a folder |\n| --- | --- | --- |\n| `↑` `↓` \u002F `j` `k` | pick a category | move |\n| `→` \u002F `Enter` | look inside | open the folder |\n| `←` \u002F `Esc` | | go up a level |\n| `g` | | jump to the culprit |\n| `f` | show only junk and unused | show only junk and unused |\n| `o` \u002F `Space` | | reveal in Finder, or in the file manager on Linux |\n| `⌫` \u002F `d` | | move to Trash, or delete for caches and Trash (press twice) |\n| `c` | clear all caches \u002F empty the Trash (press twice) | |\n| `v` \u002F `1`–`9` | next drive \u002F that drive (Linux) | next drive \u002F that drive (Linux) |\n| `Tab` | switch panes | switch panes |\n| `r` \u002F `q` | rescan \u002F quit | rescan \u002F quit |\n\nEverything is clickable too: categories, the disk meter, rows, the breadcrumb, the drive names and every action.\n\n## Linux, drives and dual boot\n\nOn Linux, fix-storage reads the mount table and treats each filesystem as one drive, however many times it is mounted. A bind-mounted `\u002Fhome` or a set of btrfs subvolumes is measured once, and a drive mounted inside a folder of another (say `~\u002Fgames`) counts only on its own drive. The drive holding your home folder opens first; `v` cycles through the rest.\n\n| Drive | What you see | Can it remove things? |\n| --- | --- | --- |\n| Your home and system drives | The usual categories, mapped to Linux: Flatpak, Snap, `\u002Fopt`, `~\u002F.local\u002Fshare` and `~\u002F.config` under Apps; your XDG folders under Photos, Videos, Music and Documents; `~\u002F.cache` under Caches; the freedesktop.org trash. System data lists `\u002Fusr`, package caches, the journal, crash dumps and swap, each labelled with the command that shrinks it, like `sudo paccache -rk1` or `sudo journalctl --vacuum-size=500M`. | Yes, the same rules as on macOS. |\n| Other drives | Everything on the drive, sorted into Photos, Videos, Music and Apps (Steam libraries) by folder name, the rest under Documents. Active swap files count as System data. | Yes. Moved items go to that drive's own `.Trash-$UID`, like a file manager does. |\n| A Windows partition | Windows, `Program Files`, each user's `AppData`, `Downloads` and so on, with labels for `hiberfil.sys`, `pagefile.sys`, `WinSxS`, `Windows.old` and Windows Update downloads. | No, look only. Clean it up from Windows. |\n| Another Linux install, or a boot\u002FEFI partition | What is on it. | No, look only. |\n\nPartitions that are not mounted, such as the Windows side of a dual boot, are listed by `fix-storage --drives` with the command that mounts them read-only (`udisksctl mount -b \u002Fdev\u002F… -o ro`). If an NTFS partition comes up read-only, Windows is probably hibernated by Fast Startup; shut Windows down fully before writing to it from Linux.\n\n## How it decides\n\n### Labels\n\n| Label | Meaning | Examples |\n| --- | --- | --- |\n| `junk` | Rebuilds by itself or is a leftover. Removing it loses nothing. | `node_modules`, `.next`, `__pycache__`, Pods, Xcode DerivedData, iOS DeviceSupport, `.dmg`\u002F`.pkg`\u002F`.deb`\u002F`.rpm` installers, Steam shader caches, caches, the Trash |\n| `unused` | Probably not needed, but your call. | build output, `.venv`, old simulators, Xcode archives, iPhone backups, archives in Downloads, screen recordings older than two weeks, anything not opened in a year |\n| `system` | A tool manages it; removing it by hand breaks the tool. The reason says which command to use instead. | Docker's disk image, Ollama models, Homebrew, Flatpak, Snap, packages under `\u002Fusr` and `\u002Fopt` |\n| *(none)* | Yours and in use. | everything else |\n\nThe rules live in [`src\u002Fcore\u002Fclassify.ts`](src\u002Fcore\u002Fclassify.ts). They are deliberately conservative; pull requests with new patterns are very welcome.\n\n### Culprits\n\nFor a folder, fix-storage runs one `du` pass over it, then follows the biggest child down for as long as that child holds more than half of its parent. It stops at things that are one unit to you, like `node_modules`, `.app` bundles or a Photos library, and ends at a single file if one file is most of the folder. When no one thing dominates, it shows the three biggest instead. Sizes measured along the way are reused, so opening those folders afterwards is instant.\n\n### What it will and won't remove\n\n- **Caches and Trash** items are deleted for good. Apps rebuild caches when they need them.\n- **Everything else** is moved to the Trash (with macOS's own `trash` command, or Finder on older systems; on Linux, the freedesktop.org trash your file manager uses), so you can drag it back out. The space comes back once you empty the Trash.\n- **Never removed:** System data, anything under `\u002FSystem` or `\u002Fprivate`, your Keychains, Preferences, Mail, Messages, Photos and Safari data, the top-level folders the scan measures, and anything outside them.\n- **Never removed on Linux:** anything under `\u002Fusr`, `\u002Fetc`, `\u002Fvar`, `\u002Fopt`, `\u002Fboot` and the other system folders, Flatpak's own folders, active swap files, `~\u002F.ssh`, `~\u002F.gnupg`, your keyrings and browser profiles, and anything on a Windows partition, another Linux install or a boot partition.\n- `--dry-run` and `--demo` never touch the disk.\n\n## Uninstall\n\n```bash\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fgovijr\u002Ffix-storage\u002Fmain\u002Finstall.sh | sh -s -- --uninstall\n```\n\n## Development\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fgovijr\u002Ffix-storage && cd fix-storage\nnpm install\nnpm run demo        # build and open the demo disk\nnpm run typecheck\n```\n\nThe interface is React rendered by [pixel](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@zenbu-labs\u002Fpixel), which draws real pixels into terminals that support the kitty graphics protocol.\n\n```\nsrc\u002F\n  main.tsx          entry point and key handling\n  plain.ts          --plain \u002F --json \u002F --drives output\n  core\u002F\n    scan.ts         measures a drive with du\n    categories.ts   the categories, and which folders count toward them on macOS\n    layout.ts       which folders count toward which category on each Linux drive\n    drives.ts       mounted drives and unmounted partitions (Linux)\n    platform.ts     the few things that differ between macOS and Linux\n    classify.ts     junk \u002F unused \u002F system labels and their reasons\n    browse.ts       folder listing, culprits, last-used dates, reveal, trash\n    trash.ts        the freedesktop.org trash (Linux)\n    clean.ts        clearing a whole category\n    demo.ts         the made-up demo disks\n  ui\u002F\n    app.tsx         the interface\n    bar.ts          the dot-matrix disk meter\n    store.ts        app state and actions\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for how to propose changes and cut a release.\n\n## License\n\n[MIT](LICENSE)\n","fix-storage 是一款面向 macOS 和 Linux 用户的终端磁盘空间分析与清理工具。它精准模拟系统存储面板的统计逻辑，递归定位大容量目录中的实际占用源，自动标注文件类型（如 junk、unused、system）并显示最后访问时间；支持多挂载点扫描（含双系统分区），提供安全清理机制（缓存与回收站直清，其余文件仅移入回收站）及实时图形化磁盘视图（需兼容终端）。适用于开发者、运维人员及普通用户快速诊断不明磁盘占用、释放空间，尤其适合 Node.js 环境下因 node_modules 或构建产物导致的存储膨胀场景。",2,"2026-11-24 04:50:02","CREATED_QUERY"]