{"id":22118228,"url":"https://github.com/yswrepos/treeify-cli","last_synced_at":"2025-03-24T06:18:54.837Z","repository":{"id":57379675,"uuid":"438677362","full_name":"yswrepos/treeify-cli","owner":"yswrepos","description":"🌟 List directory structure as tree-like in terminal","archived":false,"fork":false,"pushed_at":"2021-12-16T02:20:45.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-28T13:44:37.772Z","etag":null,"topics":["command-line","terminal","tree","treeify","treeify-cli"],"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/yswrepos.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":"2021-12-15T15:23:12.000Z","updated_at":"2021-12-16T02:22:41.000Z","dependencies_parsed_at":"2022-09-06T03:32:31.128Z","dependency_job_id":null,"html_url":"https://github.com/yswrepos/treeify-cli","commit_stats":null,"previous_names":["egsee/treeify-cli","yswrepos/treeify-cli","yushenw/treeify-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yswrepos%2Ftreeify-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yswrepos%2Ftreeify-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yswrepos%2Ftreeify-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yswrepos%2Ftreeify-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yswrepos","download_url":"https://codeload.github.com/yswrepos/treeify-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245217946,"owners_count":20579300,"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":["command-line","terminal","tree","treeify","treeify-cli"],"created_at":"2024-12-01T13:48:23.713Z","updated_at":"2025-03-24T06:18:54.816Z","avatar_url":"https://github.com/yswrepos.png","language":"JavaScript","readme":"# treeify-cli \n\n\u003cp\u003e\n    \u003ca href=\"https://www.npmjs.com/package/treeify-cli\"\u003e\n        \u003cimg src=\"https://img.shields.io/npm/v/treeify-cli\" alt=\"NPM Version\"\u003e\u003c/a\u003e\n    \u003c!-- \u003ca href=\"https://www.npmjs.org/package/treeify-cli\"\u003e\n        \u003cimg src=\"http://img.shields.io/npm/dm/treeify-cli.svg\" alt=\"Downloads\"\u003e\u003c/a\u003e --\u003e\n    \u003ca href=\"https://www.npmjs.com/package/treeify-cli\"\u003e\n        \u003cimg src=\"https://img.shields.io/npm/l/treeify-cli.svg?sanitize=true\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nYou can use treeify-cli list directory structure as tree-like in terminal.\n## Example\n\nRun this command in treeify-cli root directory\n```sh\ntreeify-cli -d ./treeify-cli --ignore node_modules,.git,.DS_Store\n```\n\nThis will print the following results:\n```\n·\n└── treeify-cli\n    ├── .gitignore\n    ├── .npmignore\n    ├── LICENSE\n    ├── README.md\n    ├── bin\n    │   └── treeify-cli.js\n    ├── package-lock.json\n    ├── package.json\n    ├── read-dir-to-tree.js\n    └── tree.js\n```\n\nThe option `--ignore` or `-i` will ignore directory that you don't want list in terminal\n\n\nUse `--out` or `-o` to output content to a specified file\n\n```\ntreeify-cli -d ./treeify-cli -o output-demo.md\n```\n\nUse `--level` or `-l` option to list custom depth\n\n```\ntreeify-cli -d ./treeify-cli -l 2\n```\n\n### Install Globally\nIn order to use `treeify-cli` in terminal you should install `treeify-cli` globally\n```\nnpm install -g treeify-cli\n```\n\n### Options\n\n```\nUsage: treeify-cli [options]\n\nOptions:\n  -V, --version               output the version number\n  -d, --dir \u003cdirectoryPath\u003e   the directory path you want to render by tree\n  -o, --out \u003cfilename\u003e        write the tree to a new file\n  -i, --ignore \u003cignoreFiles\u003e  ignore the specified directory or file, they will not be listed\n  -l, --level \u003clevel\u003e         the depth of the directory tree\n  -c, --color [color]         tree’s color which output to the terminal (default: \"white\")\n  -h, --help                  display help for command\n```\n### Example with API\n\n```js\nvar cli = require('treeify-cli')\ncli.asTree([\n        {\n            name: \"done\",\n            children: [\n                { name: \"hiking\" }, \n                { name: \"camping\"}\n            ]\n        }, \n        {\n            name: \"todos\",\n            children: [\n                { name: \"scuba diving\" },\n                { name: \"surfing\" }\n            ]\n        }\n    ])\n```\nThis will get the following results:\n```\n·\n├── done\n│   ├── hiking\n│   └── camping\n└── todos\n    ├── scuba diving\n    └── surfing\n```\nYou can change the default node name by passing in the second parameter, the default value is {label: \"name\", children: \"children\"}\n```js\ntree.asTree([\n    {\n        title: \"done\",\n        items: [\n            { title: \"hiking\" }, \n            { title: \"camping\"}\n        ]\n    }\n], { label: \"title\", children: \"items\" })\n```\n\n### Cloning this repository\n\n```sh\ngit clone --depth=1 https://github.com/egsee/treeify-cli.git\n```\n### License\n\n[MIT](./LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyswrepos%2Ftreeify-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyswrepos%2Ftreeify-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyswrepos%2Ftreeify-cli/lists"}