treeplan
is a command-line tool that generates a text tree view of a folder structure.
To install treeplan
, you need to have Node.js installed. Then, you can install it globally using npm, pnpm, or yarn:
npm install -g treeplan
pnpm add -g treeplan
yarn global add treeplan
You can also run it directly using npx
or pnpx
without installing it globally:
npx treeplan
pnpx treeplan
treeplan [options]
-
-V, --version
: Output the version number -
-p, --path <path>
: The directory path to generate a tree view for (default:.
) -
-o, --output <file>
: Output file to save the tree view -
-i, --ignore <folders>
: Comma-separated list of folders to ignore (e.g.,node_modules
,dist
) (default:node_modules
,.git
) -
-n, --no-default-ignore
: Do not ignore default folders (node_modules
,.git
) -
-h, --help
: Display help for command
Generate a tree view for the current directory and print it to the console:
treeplan
Generate a tree view for a specific directory and save it to a file:
treeplan --path /path/to/directory --output tree.txt
Ignore specific files and folders:
treeplan --ignore files,and,folders,to,ignore
Do not use default ignore patterns:
treeplan --no-default-ignore
This project is licensed under the MIT License.