{"id":20986835,"url":"https://github.com/karmaniverous/dirtree","last_synced_at":"2026-01-18T23:05:08.045Z","repository":{"id":64977549,"uuid":"579616740","full_name":"karmaniverous/dirtree","owner":"karmaniverous","description":"Parses a directory into a nicely-formatted ASCII tree. Includes a CLI.","archived":false,"fork":false,"pushed_at":"2024-08-12T05:56:43.000Z","size":2635,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-13T15:35:06.118Z","etag":null,"topics":["console","directory-tree","pretty-print","terminal","tree","treeify"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@karmaniverous/dirtree","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karmaniverous.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["karmaniverous"]}},"created_at":"2022-12-18T09:50:36.000Z","updated_at":"2024-09-19T05:45:29.000Z","dependencies_parsed_at":"2024-08-12T07:05:47.967Z","dependency_job_id":null,"html_url":"https://github.com/karmaniverous/dirtree","commit_stats":{"total_commits":36,"total_committers":1,"mean_commits":36.0,"dds":0.0,"last_synced_commit":"d06105a08848644b48bbd6580931fcf942a3f36e"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":"karmaniverous/npm-package-template","purl":"pkg:github/karmaniverous/dirtree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karmaniverous%2Fdirtree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karmaniverous%2Fdirtree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karmaniverous%2Fdirtree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karmaniverous%2Fdirtree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karmaniverous","download_url":"https://codeload.github.com/karmaniverous/dirtree/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karmaniverous%2Fdirtree/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28553056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T20:59:07.572Z","status":"ssl_error","status_checked_at":"2026-01-18T20:59:02.799Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["console","directory-tree","pretty-print","terminal","tree","treeify"],"created_at":"2024-11-19T06:15:02.082Z","updated_at":"2026-01-18T23:05:08.031Z","avatar_url":"https://github.com/karmaniverous.png","language":"JavaScript","funding_links":["https://github.com/sponsors/karmaniverous"],"categories":[],"sub_categories":[],"readme":"# dirtree\n\nParses a directory into a nicely-formatted ASCII tree. Includes a CLI.\n\nTo install:\n\n```bash\nnpm install @karmaniverous/dirtree\n```\n\nTo import:\n\n```js\nimport { dirtree } from '@karmaniverous/dirtree`;\n```\n\n## An Example\n\n```text\nPS C:\\\u003e dirtree -d src -a size\n└─ src\n   ├─ cli\n   │  └─ index.mjs: 1344\n   └─ export\n      ├─ dirtree\n      │  ├─ dirtree.mjs: 2045\n      │  └─ dirtree.test.mjs: 303\n      └─ index.mjs: 73\n```\n\n# Command Line Interface\n\n```text\nUsage: dirtree [options]\n\nOptions:\n  -a, --attribute \u003cstring\u003e  Decorate files with an fs.Stats attribute. https://nodejs.dev/en/api/v19/fs/#fsstats\n  -n, --depth \u003cint\u003e         Limit the tree to this depth. Default is unlimited.\n  -d, --dir \u003cstring\u003e        Path to starting directory. Defaults to current working directory.\n  -e, --exclude \u003cstring\u003e    RegExp pattern to exclude paths from tree.\n  -h, --help                display help for command\n```\n\n# API Documentation\n\n\u003ca name=\"dirtree\"\u003e\u003c/a\u003e\n\n## dirtree([options]) ⇒ \u003ccode\u003estring\u003c/code\u003e\nExtracts an ascii tree representing the file structure under a directory path.\n\n**Kind**: global function  \n**Returns**: \u003ccode\u003estring\u003c/code\u003e - ASCII tree.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [options] | \u003ccode\u003eObject\u003c/code\u003e | Options object. |\n| [options.attribute] | \u003ccode\u003estring\u003c/code\u003e | Decorate files with an fs.Stats attribute. https://nodejs.dev/en/api/v19/fs/#fsstats |\n| [options.debug] | \u003ccode\u003eboolean\u003c/code\u003e | Log intermediate steps to console. |\n| [options.depth] | \u003ccode\u003enumber\u003c/code\u003e | Limit the tree to this depth. Default is unlimited. |\n| [options.dir] | \u003ccode\u003estring\u003c/code\u003e | Path to starting directory. Defaults to current working directory. |\n| [options.exclude] | \u003ccode\u003eRegExp\u003c/code\u003e | RegExp pattern to exclude paths from tree. |\n\n\n---\n\nSee more great templates and other tools on\n[my GitHub Profile](https://github.com/karmaniverous)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarmaniverous%2Fdirtree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarmaniverous%2Fdirtree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarmaniverous%2Fdirtree/lists"}