{"repo":"yangshun/tree-node-cli","free":true,"listed":false,"github":"https://github.com/yangshun/tree-node-cli","clone":"git clone https://github.com/yangshun/tree-node-cli.git","description":"List directory contents in a tree-like format, similar to the Linux tree command","language":"TypeScript","stars":290,"topics":["tree","cli","linux","node","file","directory","hacktoberfest"],"license":"MIT","category":"cli-tools","readme_excerpt":"tree-node-cli Lists the contents of directories in a tree-like format, similar to the Linux tree command. Both CLI and Node.js APIs are provided. tree is a command that produces a nicely-formatted indented output of directories and files. When a directory argument is given, tree lists all the files and/or directories found in the given directory. Note: Symlinks are not followed. Directories that cannot be opened (e.g. due to permission errors) are listed with [error opening dir] instead of crashing, matching Linux tree behavior. Quickstart Instantly execute the command in your current directory via npx / pnpx / bunx / yarn dlx : Installation Example [!NOTE] gitignore is respected by default so node modules and other common files/directories are excluded automatically. Use --no-gitignore to show them. CLI [!IMPORTANT] Use the command treee on Windows and Linux to avoid conflicts with built-in tree command. The following options are available: [!TIP] To exclude the contents of a directory while still printing the directory itself, use a trailing slash with the -I option (e.g., -I \"directory/\" ). For the Node.js API, provide a regex matching the directory contents (e.g., /directory\\// ). Directories listed in .gitignore (e.g. node modules ) are already excluded by default, use --no-gitignore in combination with -I \"directory/\" if you want them to show up. Node.js API tree(path, options?) Returns the tree as a formatted string. treeJson(path, options?) Returns the tree as a struc","default_branch":null,"files":null,"tree":[],"storefront":"/r/yangshun","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/yangshun/tree-node-cli/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}