1.0.0 • Published 6 months ago
gleee v1.0.0
Gleee - Directory Structure Generator
A simple CLI tool that generates directory structure in either ASCII tree format or JSON format.
Features
- Generate directory structure in ASCII tree format
- Generate directory structure in JSON format (AI/Machine friendly)
- Support recursive directory listing
- Simple and easy to use
- Generate AI-friendly JSON structure for better GitHub Copilot integration
- Respect .gitignore patterns
- Automatically excludes .git directory
Why Gleee?
Enhanced GitHub Copilot Integration
One of the main challenges when working with GitHub Copilot is that it lacks context about your project structure. While Copilot is excellent at understanding code within a single file, it often struggles with:
- Understanding the overall project structure
- Relationships between files and directories
- Identifying available modules and dependencies
- Suggesting imports from your project's files
Glee helps solve these issues by:
- Providing structured project information in formats that AI tools can easily process
- Generating JSON output that can be included in prompts to Copilot
- Creating clear, hierarchical representations of your project structure
Installation
Using npm
npm install -g gleee
Using yarn
yarn global add gleee
Usage
gleee [options] [directory] [output-file]
Examples
- Generate tree structure for current directory:
gleee .
- Generate JSON structure for a specific directory:
gleee /path/to/project output.json
- Save tree structure to custom file:
gleee . project-structure.md
Sample Outputs
Markdown Tree Output
# Directory Listing for /project
├── src/
│ ├── components/
│ │ ├── Header.js
│ │ └── Footer.js
│ └── index.js
├── package.json
└── README.md
JSON Output
{
"rootPath": "/project",
"timestamp": "2025-01-29T14:37:48.502Z",
"structure": [
{
"name": "src",
"type": "directory",
"children": [
{
"name": "components",
"type": "directory",
"children": [
{
"name": "Header.js",
"type": "file"
},
{
"name": "Footer.js",
"type": "file"
}
]
},
{
"name": "index.js",
"type": "file"
}
]
}
]
}
Tips
- Use .gitignore to exclude unwanted files/directories
- JSON output is ideal for programmatic processing
- Markdown output is great for documentation
1.0.0
6 months ago