project-structure-cli
v1.1.8
Published
It is a lightweight app to create project structure so that it can be used optimally with LLMs or in creating README
Maintainers
Readme
📂 project-structure-cli
A simple CLI tool to generate a project structure tree and save it to project-structure.txt. It automatically updates the structure every time you run it and supports ignoring specific files and directories.
✨ Features
✅ Generate a project structure tree
✅ Save the structure in project-structure.txt in the root directory
✅ Supports ignoring specific files and directories
✅ Automatically excludes node_modules and folders/files starting with dot(.) eg: .next .git directory by default
✅ use --include to exclusively include folders which are ignored by default
✅ Works with any project setup
🚀 Installation
Use without installing
Run directly using npx:
npx project-structure-cliInstall globally (optional)
npm install -g project-structure-cliThen, you can run:
proj-structure📌 Usage
Basic Usage (Full Structure)
To generate project-structure.txt in the root of your project:
npx project-structure-clior
proj-structureMake your own customised project structure
To generate project-structure.txt along with the folders which are excluded by default
npx project-structure-cli --include .nextExclude Files/Folders from Structure
You can exclude files and directories by passing them as arguments:
npx project-structure-cli --exclude api .envor
proj-structure --exclude api .env📝 Example Output
If your project structure is:
my-project
│── src
│ │── components
│ │ │── Header.tsx
│ │ │── Footer.tsx
│ │── pages
│ │ │── index.tsx
│ │ │── about.tsx
│── public
│ │── favicon.ico
│── package.json
│── tsconfig.json
│── README.md
│── .git
│── node_modulesRunning
npx project-structure-cli --exclude publicor
npx project-structure-cliwill generate project-structure.txt as:
my-project
├── src
│ ├── components
│ │ ├── Header.tsx
│ │ ├── Footer.tsx
│ ├── pages
│ │ ├── index.tsx
│ │ ├── about.tsx
├── package.json
├── tsconfig.json
└── README.md(.git and node_modules are excluded)
🛠 Development
Clone the repo:
git clone https://github.com/anups1ngh/project-structure-generator.git cd project-structure-generatorInstall dependencies:
npm installTest locally:
node index.jsLink the package globally for local testing:
npm link proj-structure
📦 Publishing to npm
To publish the package:
npm login
npm publish🔗 License
This project is licensed under the MIT License (soon will be open Source).
Reach out to developer
Anup Kumar Singh [email protected]
