
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
traverse-md
Advanced tools
a command line tool to get the folder structure of your project for your readme file
traverse-md is a simple command-line tool that generates a markdown-compatible directory structure of a given folder and writes it to a README file. It’s perfect for documenting project structures or creating navigable outlines in README.md files.
README.md or updates the existing structure within the fileYou can use traverse-md directly with npx, or install it globally.
npx traverse-md "path/to/directory"
Install traverse-md globally to use it without npx:
npm install -g traverse-md
To generate the structure of the current working directory, run:
npx traverse-md .
Or, if installed globally:
traverse-md .
This will create or update a README.md file in the specified directory with a structured outline of your project.
Provide a specific path if you want to outline a different directory:
npx traverse-md path/to/your-directory
If you want to specify directories to ignore, run the command without arguments:
npx traverse-md
The tool will prompt you to enter:
The path of the directory to traverse.
You can also add your own directories to ignore by passing them as a command line argument:
npx traverse-md . --ignore "dir1,dir2"
Running traverse-md in a Next.js project might produce the following output in your README.md:
my-nextjs-app/
├── public/ # Static files (images, fonts, etc.)
│ └── favicon.ico
├── src/ # Source folder
│ ├── app/ # App directory for Next.js 13+ App Router
│ │ ├── api/ # API routes
│ │ └── layout.tsx # Global layout for the app
│ └── components/ # Reusable components
│ ├── Button.tsx
│ └── Header.tsx
│ └── hooks/ # Custom React hooks
│ └── useAuth.ts
├── .env # Environment variables
├── next.config.js # Next.js configuration
├── package.json # Package dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── README.md # Project documentation
npx traverse-md "path/to/directory" to specify which directory to structure.README.md exists, traverse-md will update the section containing the folder structure instead of appending a duplicate.traverse-md can be extended with future updates. The current implementation writes the folder structure in the README.md file automatically, ensuring a neat, collapsible section. Custom configurations can be added by modifying the codebase to accept parameters for output format or additional information (e.g., file sizes).
I welcome contributions to enhance traverse-md! Here are ways to get involved:
This project is licensed under the MIT License. See the LICENSE file for details.
└── .github └── workflows ├── npm-publish.yml ├── .gitignore ├── index.js ├── package-lock.json ├── package.json ├── README.md
FAQs
a command line tool to get the folder structure of your project for your readme file
We found that traverse-md demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.