A command-line tool that generates project directory structures from markdown-style tree representations.
- Create directory structures from markdown tree format
- Support for files and directories
- Configurable file content templates
- Visual feedback during generation
- Overwrite protection with optional override
Modify run.js
const ProjectStructureGenerator = require("./main");
// Define your project structure in markdown tree format
const structure = `
my-project/
├── package.json
├── src/
│ ├── controllers/
│ │ └── main.js
│ ├── models/
│ │ └── user.js
│ └── utils/
│ └── helper.js
└── test/
└── index.js
`;
// Generate the structure
ProjectStructureGenerator.fromString(structure, {
overwrite: true, // Optional: overwrite existing files
verbose: true // Optional: show creation progress
});
node run.js
You will get
my-project
├── package.json
├── src
│ ├── controllers
│ │ └── main.js
│ ├── models
│ │ └── user.js
│ └── utils
│ └── helper.js
└── test
└── index.js