{"id":13582897,"url":"https://github.com/ryanhefner/filesizes","last_synced_at":"2026-01-24T15:07:47.694Z","repository":{"id":48655458,"uuid":"123189987","full_name":"ryanhefner/filesizes","owner":"ryanhefner","description":"📂⚖️ Easily review the size of files in a given directory and its subdirectories.","archived":false,"fork":false,"pushed_at":"2021-07-15T15:32:17.000Z","size":50,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-28T12:51:09.518Z","etag":null,"topics":["cli","command-line-tool","file-size","javascript","nodejs","utility"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryanhefner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"ryanhefner","patreon":"ryanhefner","open_collective":"ryanhefner","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-02-27T21:20:16.000Z","updated_at":"2023-08-04T20:49:48.000Z","dependencies_parsed_at":"2022-08-23T15:50:57.036Z","dependency_job_id":null,"html_url":"https://github.com/ryanhefner/filesizes","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ryanhefner/filesizes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanhefner%2Ffilesizes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanhefner%2Ffilesizes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanhefner%2Ffilesizes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanhefner%2Ffilesizes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanhefner","download_url":"https://codeload.github.com/ryanhefner/filesizes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanhefner%2Ffilesizes/sbom","scorecard":{"id":791994,"data":{"date":"2025-08-11","repo":{"name":"github.com/ryanhefner/filesizes","commit":"cfff533e81601b1dccef76fc72855c2e09b47a0d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/8 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"22 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T07:49:07.863Z","repository_id":48655458,"created_at":"2025-08-23T07:49:07.864Z","updated_at":"2025-08-23T07:49:07.864Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28730310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","command-line-tool","file-size","javascript","nodejs","utility"],"created_at":"2024-08-01T15:03:06.383Z","updated_at":"2026-01-24T15:07:47.672Z","avatar_url":"https://github.com/ryanhefner.png","language":"JavaScript","funding_links":["https://github.com/sponsors/ryanhefner","https://patreon.com/ryanhefner","https://opencollective.com/ryanhefner"],"categories":["JavaScript"],"sub_categories":[],"readme":"# 📂⚖️ filesizes\n\nEasily review the size of files in a given directory and its subdirectories.\n\n## Install\n\nVia [NPM](https://npmjs.com/package/filesizes)\n\n```sh\nnpm install --save filesizes\n```\n\nCLI (command line tool)\n\n```sh\nnpm install -g filesizes\n```\n\n## How to use\n\nYou can use this module in two ways. The first, is a simple way to get an array of all the file names and the size of each file within a given directory and its subdirectories. You can also use the included CLI (command line tool) that lets you initiate the command against a folder on your machine.\n\nHere are some examples on how you would use them, both in a project or via the command line.\n\n### Import\n\nUsing this tool in your project, it returns an array for each file that include the `name` and `size` for each file that match your criteria. This can be handy for CMS tools that need to show a listing of files and their file sizes, or if you have some admin features that you want to use to manage files on your server.\n\n#### Example\n\n```js\nimport fileSizes from 'filesizes';\n\nconst fileInfo = fileSizes();\nfileInfo.forEach(info =\u003e console.log(file.name, file.size));\n```\n\n#### Options\n\nThe `fileSizes` method accepts an object allowing you to define the options that are used when generating the array of file names and sizes. The following options can be set when you execute the method.\n\n* `dir` - Initial directory to traverse the files and subdirectories. (Default: `./`)\n* `excludeFiles` - Array of either basic strings or regular expressions of files to exclude from the list. (Default: `['.DS_Store', '.DS_Store?', '.Spotlight-V100', '.Trashes', 'ehthumbs.db', 'Thumbs.db']`)\n* `excludeDirectories` - Array of either basic string or regular expressions of directories to exclude from the list. (Default: `['.git', 'node_modules', 'vendor']`)\n* `verbose` - For use when running the CLI command. Outputs progress of files checked while traversing the directory. (Default: `false`)\n\n### CLI (command line tool)\n\nIn addition to the standard method, this module includes a handy command line tool that lets you run the command and generates a table listing all the files that match your criteria, along with their file size and size of file when gzipped.\n\nI’ve found this handy for being able to quickly assess the size of assets for a project, or hunt down a large file that is taking up too much space on my computer.\n\n#### Examples\n\n```sh\n$ filesizes [options] [dir]\n```\n\nInitiate command with options and `dir` argument. Listing all files in the `public` directory in the current directory and flagging files that are greater than 1,000,000 bytes (1 MB).\n\n```sh\n$ filesizes -l 1000000 public\n```\n\n#### Arguments\n\n* `dir` - Initial directory to traverse the files and subdirectories. (Default: `./`)\n\n#### Options\n\n* `-f, --exclude-file` - Comma-delimited list of either basic strings or regular expressions of files to exclude from the list. (Default: `'.DS_Store, .DS_Store?, .Spotlight-V100, .Trashes, ehthumbs.db, Thumbs.db'`)\n* `-d, --exclude-directories` - Comma-delimited list of either basic string or regular expressions of directories to exclude from the list. (Default: `'.git, node_modules, vendor'`)\n* `-l, --large-file` - Size used to flag a file as being too large. Files that meet or exceed this value will be represented in `red` in the outputted table. (Default: `null`)\n* `-v, --verbose` - Output the progress of files checked while traversing the directory.\n\n## License\n\n[MIT](LICENSE) © [Ryan Hefner](https://www.ryanhefner.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanhefner%2Ffilesizes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanhefner%2Ffilesizes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanhefner%2Ffilesizes/lists"}