
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
@karmaniverous/dirtree
Advanced tools
Parses a directory into a nicely-formatted ASCII tree. Includes a CLI.
Parses a directory into a nicely-formatted ASCII tree. Includes a CLI.
To install:
npm install @karmaniverous/dirtree
To import:
import { dirtree } from '@karmaniverous/dirtree`;
PS C:\> dirtree -d src -a size
└─ src
├─ cli
│ └─ index.mjs: 1344
└─ export
├─ dirtree
│ ├─ dirtree.mjs: 2045
│ └─ dirtree.test.mjs: 303
└─ index.mjs: 73
Usage: dirtree [options]
Options:
-a, --attribute <string> Decorate files with an fs.Stats attribute. https://nodejs.dev/en/api/v19/fs/#fsstats
-n, --depth <int> Limit the tree to this depth. Default is unlimited.
-d, --dir <string> Path to starting directory. Defaults to current working directory.
-e, --exclude <string> RegExp pattern to exclude paths from tree.
-h, --help display help for command
string
Extracts an ascii tree representing the file structure under a directory path.
Kind: global function
Returns: string
- ASCII tree.
Param | Type | Description |
---|---|---|
[options] | Object | Options object. |
[options.attribute] | string | Decorate files with an fs.Stats attribute. https://nodejs.dev/en/api/v19/fs/#fsstats |
[options.debug] | boolean | Log intermediate steps to console. |
[options.depth] | number | Limit the tree to this depth. Default is unlimited. |
[options.dir] | string | Path to starting directory. Defaults to current working directory. |
[options.exclude] | RegExp | RegExp pattern to exclude paths from tree. |
See more great templates and other tools on my GitHub Profile!
FAQs
Parses a directory into a nicely-formatted ASCII tree. Includes a CLI.
The npm package @karmaniverous/dirtree receives a total of 0 weekly downloads. As such, @karmaniverous/dirtree popularity was classified as not popular.
We found that @karmaniverous/dirtree demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.