All Projects โ†’ MrRaindrop โ†’ Tree Cli

MrRaindrop / Tree Cli

Licence: mit
๐ŸŒดList contents of directories in tree-like format.

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Tree Cli

Wmztreeview
็ฑปไผผๅ‰็ซฏelementUI็š„ๆ ‘ๅฝขๆŽงไปถ,ๅฏ่‡ชๅฎšไน‰่Š‚็‚นๅ†…ๅฎน,ๆ”ฏๆŒๆ— ้™ๆž่Š‚็‚น,ๅฏๆ‹–ๆ‹ฝๅขžๅˆ ่Š‚็‚น็ญ‰็ญ‰,้ž้€’ๅฝ’ๅฎž็Žฐ
Stars: โœญ 118 (-16.9%)
Mutual labels:  tree
Django Jsoneditor
Django JSONEditor input widget to provide javascript online JSON Editor
Stars: โœญ 124 (-12.68%)
Mutual labels:  tree
Merkle Tree
Merkle Trees and Merkle Inclusion Proofs
Stars: โœญ 130 (-8.45%)
Mutual labels:  tree
Polygon Wind
Wind shader for low poly assets in Unity.
Stars: โœญ 119 (-16.2%)
Mutual labels:  tree
Span Tree
๐ŸŒณ Tree for GitLab
Stars: โœญ 123 (-13.38%)
Mutual labels:  tree
Java Ds Algorithms
Data Structures and Algorithms in Java
Stars: โœญ 125 (-11.97%)
Mutual labels:  tree
Infinite Tree
A browser-ready tree library that can efficiently display a large amount of data using infinite scrolling.
Stars: โœญ 117 (-17.61%)
Mutual labels:  tree
Array To Tree
Convert a plain array of nodes (with pointers to parent nodes) to a nested data structure
Stars: โœญ 141 (-0.7%)
Mutual labels:  tree
Merkle
Node.js module implementing Merkle tree algorithm
Stars: โœญ 123 (-13.38%)
Mutual labels:  tree
Slim
Surprisingly space efficient trie in Golang(11 bits/key; 100 ns/get).
Stars: โœญ 1,705 (+1100.7%)
Mutual labels:  tree
Tree Online
An online tree-like utility for generating ASCII folder structure diagrams. Written in TypeScript and React.
Stars: โœญ 119 (-16.2%)
Mutual labels:  tree
Syro
Simple router for web applications
Stars: โœญ 121 (-14.79%)
Mutual labels:  tree
Eix
eix can access Gentoo portage ebuild information and description very quickly (using a local cache). It can also be used to access information on installed packages, local settings, and local and external overlays, and informs about changes in the tree
Stars: โœญ 126 (-11.27%)
Mutual labels:  tree
Ack2
**ack 2 is no longer being maintained. ack 3 is the latest version.**
Stars: โœญ 1,504 (+959.15%)
Mutual labels:  tree
Data Structures
Common data structures and algorithms implemented in JavaScript
Stars: โœญ 139 (-2.11%)
Mutual labels:  tree
Bplustree
A minimal but extreme fast B+ tree indexing structure demo for billions of key-value storage
Stars: โœญ 1,598 (+1025.35%)
Mutual labels:  tree
Containers
This library provides various containers. Each container has utility functions to manipulate the data it holds. This is an abstraction as to not have to manually manage and reallocate memory.
Stars: โœญ 125 (-11.97%)
Mutual labels:  tree
Django Treenode
probably the best abstract model / admin for your tree based stuff. ๐ŸŒณ
Stars: โœญ 142 (+0%)
Mutual labels:  tree
Libvot
A C++11 multithread library for image retrieval
Stars: โœญ 139 (-2.11%)
Mutual labels:  tree
Typex
[TOOL, CLI] - Filter and examine Go type structures, interfaces and their transitive dependencies and relationships. Export structural types as TypeScript value object or bare type representations.
Stars: โœญ 128 (-9.86%)
Mutual labels:  tree

tree-cli

CircleCI npm version downloads

List contents of directories in tree-like format.

Tree-cli is a recursive directory listing program that produces a depth indented listing of files. With no arguments, tree lists the files in the current directory. When directory arguments are given, tree lists all the files and/or directories found in the given directories each in turn. Upon completion of listing all files/directories found, tree returns the total number of files and/or directories listed.

example

cmd:

tree -l 2 -o output.txt

result:

/Applications/XAMPP/htdocs/node_playground/tree-cli
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ bin
|  โ””โ”€โ”€ tree
โ”œโ”€โ”€ node_modules
|  โ”œโ”€โ”€ bluebird
|  โ”œโ”€โ”€ chalk
|  โ”œโ”€โ”€ cli-spinner
|  โ”œโ”€โ”€ meow
|  โ””โ”€โ”€ object-assign
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ tree.js

directory: 7 file: 4

install

npm install -g tree-cli

usage

Use the command tree or treee (to avoid confliction with system command).

NOTE: use treee instead of tree on windows system.

tree/treee

Use it as a node module to get the detailed tree data.

require('tree-cli')({
  base: '.',    // or any path you want to inspect.
  noreport: true
}).then(res => {
  // res.data is the data for the file tree.
  // res.report is the stringified scanning report.
  console.log(res.data, res.report);
});

You can find the type declaration for the exporting function and the type declaration of its' params and result in the 'types/index.d.ts' file. If you are using VSCode, you'll find the type hint during your typing.

Breaking change: In version before 0.6.0, the resovled result is the tree structure of the scanned directory. But in latest v0.6.0, the resolved result is changed to a object contains both the file tree structure and the scanned report. The structure of result would be:

{
  data: {
    // ...The file node tree.
  },
  report: '...',  // The final report.
}

use --help to list help info.

tree --help

specify the level of path (how deep to scan).

use -l levelNumber to specify the path level.

tree -l 2

output result to a file

use -o outputFilePath to specify the output file.

tree -l 2 -o out.txt

show directory only

use -d to show directories only.

tree -l 2 -o out.txt -d

other arguments

see Options.

FOR WINDOWS USERS

you should just use the treee command as tree has been already taken by windows system.

treee -l 2 -o out.txt -d

Options

  • --help: outputs a verbose usage listing.
  • --version: outputs the version of tree-cli.
  • --debug: show debug info.
  • --fullpath: prints the full path prefix for each file.
  • --ignore: ignores directory or file you specify - accepts arrays as comma-delimited strings: 'node_modules/, .git/, .gitignore'
  • --link: follows symbolic links if they point to directories, as if they were directories. Symbolic links that will result in recursion are avoided when detected.
  • --noreport: omits printing of the file and directory report at the end of the tree listing and omits printing the tree on console.
  • --base: specify a root directory. Relative path from cwd root and absolute path are both acceptable. This argument is optional.
  • -a: all files are printed. By default tree does not print hidden files (those beginning with a dot '.'). In no event does tree print the file system constructs '.' (current directory) and '..' (previous directory).
  • -d: list directories only.
  • -f: append a '/' for directories, a '=' for socket files and a '|' for FIFOs.
  • -i: makes tree not print the indentation lines, useful when used in conjunction with the -f option.
  • -l: max display depth of the directory tree.
  • -o: send output to filename.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].