Skip to content

Commit

Permalink
create the script for tree generation
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammadkhakshoor committed Feb 6, 2025
1 parent 645f361 commit 79c5892
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 80 deletions.
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 📂 tree-lens

**A simple and powerful CLI tool to generate a tree-like structure of a directory and its contents.**

[![npm version](https://img.shields.io/npm/v/tree-lens.svg?style=flat-square)](https://www.npmjs.com/package/tree-lens) 📦 Available on **[npm](https://www.npmjs.com/package/tree-lens)**

## 🚀 Features

-**Instant Directory Visualization** – Generate a structured tree representation of any directory.
-**Easy to Use** – Just install and run a single command.
-**Minimal & Lightweight** – No unnecessary dependencies.
-**Customizable Output** – Future updates may include filtering, formatting, and exporting options.

## 📥 Installation

Install `tree-lens` globally using npm:

```sh
npm install -g tree-lens
```

## 📌 Usage

**Generate a tree for the current directory**

```sh
tree-lens "path/to/directory"
```

| Option | Description |
| :----------- | :-------------------------------------------------------------------------------------------- |
| `--A` | Show all files and folders |
| `--F` | Show only folders **(default behavior)** |
| `--<number>` | Maximum depth level (e.g., --3 for 3 levels deep -- **default is All files in the directory** |
| Example | `tree-lens ./` or `tree-lens ./src/ --F --5` or `tree-lens ./ --A --3` |

## 📝 Example Output

(in the generated directory_structure.txt file)

[![output example](https://i.postimg.cc/0jxz4YTQ/structure.png "asd")](https://i.postimg.cc/0jxz4YTQ/structure.png "asd")

## 🤝 Contributing

Contributions are welcome! If you have ideas or find bugs, feel free to open an issue or submit a pull request.

#### Made with ❤️ by Mohammad Khakshoor
File renamed without changes.
29 changes: 29 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "tree-lens",
"version": "1.0.2",
"description": "A simple and powerful CLI tool to generate a tree-like structure of a directory and its contents.",
"main": "index.js",
"type": "module",
"bin": {
"tree-lens": "./index.js"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"CLI",
"directory",
"tree",
"file-structure",
"tree-generator",
"file-generator",
"directory-visualization"
],
"author": "Mohammad Khakshoor",
"license": "MIT",
"repository": "https://github.com/mohammadkhakshoor/tree-lens.git",
"bugs": {
"url": "https://github.com/mohammadkhakshoor/tree-lens/issues"
},
"homepage": "https://github.com/mohammadkhakshoor/tree-lens#readme"
}
40 changes: 0 additions & 40 deletions package/README.md

This file was deleted.

40 changes: 0 additions & 40 deletions package/package.json

This file was deleted.

0 comments on commit 79c5892

Please sign in to comment.