CLI utility for developers: trim code context, generate folder trees, and more
npm install folderplus#
tree command β but modern, colorful, and developer-friendly.
.gitignore automatically
npm i folderplus
npm install folderplus
npm install -g folderplus
`
β Verify installation:
`
folderplus version
`
π Usage
- Basic tree
`
folderplus tree
`
- Files only
`
folderplus tree --files-only
`
- Directories only
`
folderplus tree --dirs-only
`
- Limit depth
`
folderplus tree --depth 2
`
ποΈ Options & Flags
#### Flag Description
`
--all
`
#### Show hidden files & folders
`
--no-icons
`
#### Disable icons
`
--files-only
`
#### Show only files
`
--dirs-only
`
#### Show only directories
`
--depth
`
#### Limit tree depth
`
--only js,ts
`
#### Sort by directory/file
`
--json
`
#### Output tree as JSON
`
folderplus tree --json > output.json
`
#### Output:
`
Json
{
"name": "project",
"type": "directory",
"children": [
{ "name": "src", "type": "directory" },
{ "name": "index.js", "type": "file" }
]
}
`
π§ How Ignore Works
$3
`
node_modules
.git
Entries from .gitignore
`
#### You can add more using:
`
--ignore dist,build,temp
``