mkdir-ai
v1.0.1
Published
Create a directory tree on disk from an ASCII tree — the kind produced by the `tree` command.
Maintainers
Readme
mkdir-ai

mkdir-ai is a CLI tool that converts a text-based folder structure into an actual project structure. The user provides an ASCII tree in a .txt file, the parser reads that tree and converts it into a list of files and folders, and then the creator module uses the filesystem API to generate those folders and files. The CLI layer handles user commands and connects everything together.
project/
├── src/
│ ├── index.js
│ └── utils/
│ └── helper.js
├── package.json
└── README.mdmkdir-ai structure.txt
# → ✓ Created structure successfully
# → Directories: 4
# → Files: 6Install
# Global install (recommended)
npm install -g mkdir-ai
# Or run without installing
npx mkdir-ai structure.txtUsage
mkdir-ai <structure-file>The structure file is a plain text file containing an ASCII directory tree. Lines starting with # and blank lines are ignored, so you can document your templates inline.
Example
Given structure.txt:
# A minimal Node project skeleton
my-app/
├── src/
│ ├── index.js
│ └── utils/
│ └── helper.js
├── test/
│ └── index.test.js
├── package.json
└── README.mdRunning mkdir-ai structure.txt creates my-app/ in the current directory with all of the above.
Input format
- Each non-blank, non-comment line is one entry.
├──/└──indicate a child at the current depth.│indicates a deeper nesting level (its children are indented further).- Lines like
src/(trailing slash) are directories; lines likeindex.jsare files. - If a name has no trailing slash but has children on the next line, it's treated as a directory.
