{"id":15458110,"url":"https://github.com/dmotz/statmap","last_synced_at":"2025-06-25T22:06:16.934Z","repository":{"id":12085224,"uuid":"14673049","full_name":"dmotz/statmap","owner":"dmotz","description":"Output recursive directory stats as JSON for visualization and analysis.","archived":false,"fork":false,"pushed_at":"2014-01-27T20:49:25.000Z","size":136,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-09T12:08:58.730Z","etag":null,"topics":["analysis","cli","javascript","node"],"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/dmotz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-25T01:17:53.000Z","updated_at":"2021-01-21T18:51:53.000Z","dependencies_parsed_at":"2022-09-14T00:20:17.841Z","dependency_job_id":null,"html_url":"https://github.com/dmotz/statmap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dmotz/statmap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmotz%2Fstatmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmotz%2Fstatmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmotz%2Fstatmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmotz%2Fstatmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmotz","download_url":"https://codeload.github.com/dmotz/statmap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmotz%2Fstatmap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261960502,"owners_count":23236573,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["analysis","cli","javascript","node"],"created_at":"2024-10-01T22:59:03.533Z","updated_at":"2025-06-25T22:06:16.909Z","avatar_url":"https://github.com/dmotz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# statmap\n#### Output recursive directory stats as JSON for visualization and analysis.\n[Dan Motzenbecker](http://oxism.com), MIT License\n\n[@dcmotz](http://twitter.com/dcmotz)\n\n\n### Installation and Usage\n\n**As a system executable:**\n\n```\n$ npm install -g statmap\n```\n\nWhen used as an executable, statmap returns JSON over stdout.\n\nTo map the current directory:\n\n```\n$ statmap \u003e stats.json\n```\n\nPass an optional argument for a different directory:\n\n\n```\n$ statmap .. \u003e parent.json\n```\n\nThe JSON will contain a recursive representation of the directory and all\nchildren. Each key is a file or directory name with a corresponding value\ncontaining a `stats` object and a `children` object if it is a directory.\nDirectories also are also given a `sum` property which reflects the size of\nall children recursively, unlike the typical `size` property of directory's\n`stats` object.\n\nHere's an excerpt of the output for the package itself:\n\n```javascript\n{\n  \"statmap\": {\n    \"stats\": {\n      \"dev\": 16777220,\n      \"mode\": 16877,\n      \"nlink\": 9,\n      \"uid\": 501,\n      \"gid\": 80,\n      \"rdev\": 0,\n      \"blksize\": 4096,\n      \"ino\": 141035615,\n      \"size\": 306,\n      \"blocks\": 0,\n      \"atime\": \"2013-11-25T01:02:05.000Z\",\n      \"mtime\": \"2013-11-25T01:02:05.000Z\",\n      \"ctime\": \"2013-11-25T01:02:05.000Z\"\n    },\n    \"sum\": 165329,\n    \"children\": {\n      \"README.md\": {\n        \"stats\": {\n          \"dev\": 16777220,\n          \"mode\": 33188,\n          \"nlink\": 1,\n          \"uid\": 501,\n          \"gid\": 80,\n          \"rdev\": 0,\n          \"blksize\": 4096,\n          \"ino\": 141057002,\n          \"size\": 550,\n          \"blocks\": 8,\n          \"atime\": \"2013-11-25T01:02:05.000Z\",\n          \"mtime\": \"2013-11-25T01:01:52.000Z\",\n          \"ctime\": \"2013-11-25T01:01:54.000Z\"\n        }\n      },\n      \"index.js\": {\n        \"stats\": {\n          \"dev\": 16777220,\n          \"mode\": 33188,\n          \"nlink\": 1,\n          \"uid\": 501,\n          \"gid\": 80,\n          \"rdev\": 0,\n          \"blksize\": 4096,\n          \"ino\": 141035626,\n          \"size\": 1180,\n          \"blocks\": 8,\n          \"atime\": \"2013-11-25T01:02:06.000Z\",\n          \"mtime\": \"2013-11-25T00:51:31.000Z\",\n          \"ctime\": \"2013-11-25T00:51:31.000Z\"\n        }\n      },\n      \"node_modules\": {\n        \"stats\": {\n          \"dev\": 16777220,\n          \"mode\": 16877,\n          \"nlink\": 3,\n          \"uid\": 501,\n          \"gid\": 20,\n          \"rdev\": 0,\n          \"blksize\": 4096,\n          \"ino\": 141036545,\n          \"size\": 102,\n          \"blocks\": 0,\n          \"atime\": \"2013-11-25T00:53:55.000Z\",\n          \"mtime\": \"2013-11-24T23:00:54.000Z\",\n          \"ctime\": \"2013-11-24T23:00:54.000Z\"\n        },\n        \"sum\": 124651,\n        \"children\": {\n          \"async\": {\n            \"stats\": {\n        //...\n```\n\nUsing this data, you could create something like a\n[D3 zoomable treemap](http://mbostock.github.io/d3/talk/20111018/treemap.html)\nof your hard drive.\n\n\n**As a library:**\n\n```\n$ npm install --save statmap\n```\n\nPass a path and a callback:\n\n```javascript\nvar statmap = require('statmap');\n\nstatmap('./spells', function(err, stats) {\n  console.log(utils.inspect(stats, { color: true, depth: null }));\n});\n\n```\n\nWhen used as a library, a live object is returned rather than a JSON string.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmotz%2Fstatmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmotz%2Fstatmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmotz%2Fstatmap/lists"}