{"id":30138591,"url":"https://github.com/avirsaha/treemark","last_synced_at":"2025-08-11T01:37:35.368Z","repository":{"id":303735557,"uuid":"1016474783","full_name":"avirsaha/treemark","owner":"avirsaha","description":"A simple Python utility that scans your project directory and outputs a clean markdown tree of your folder and file structure, perfect for documentation and feeding into language models.","archived":false,"fork":false,"pushed_at":"2025-07-15T14:52:25.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-16T07:27:38.261Z","etag":null,"topics":["automation","developer-tools","llms","python","script","vibecoding-tool"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avirsaha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-09T04:30:21.000Z","updated_at":"2025-07-15T14:41:19.000Z","dependencies_parsed_at":"2025-07-09T06:51:23.615Z","dependency_job_id":null,"html_url":"https://github.com/avirsaha/treemark","commit_stats":null,"previous_names":["avirsaha/treemark"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/avirsaha/treemark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avirsaha%2Ftreemark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avirsaha%2Ftreemark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avirsaha%2Ftreemark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avirsaha%2Ftreemark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avirsaha","download_url":"https://codeload.github.com/avirsaha/treemark/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avirsaha%2Ftreemark/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269818801,"owners_count":24480074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","developer-tools","llms","python","script","vibecoding-tool"],"created_at":"2025-08-11T01:37:26.112Z","updated_at":"2025-08-11T01:37:35.329Z","avatar_url":"https://github.com/avirsaha.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n![codecov](https://codecov.io/gh/avirsaha/treemark/branch/main/graph/badge.svg)\n![Test Status](https://github.com/avirsaha/treemark/actions/workflows/test.yml/badge.svg)\n\n# TreeMark\n\n**TreeMark** is a lightweight Python CLI tool that generates a clean, readable **Markdown** (or plain text) representation of your project’s directory structure. Perfect for documentation, code walkthroughs, and feeding structured project info to LLMs.\n\n---\n\n## 🚀 Features\n\n* 📁 Recursively walks through your folder structure\n* 📝 Outputs a Markdown tree that works in GitHub, Notion, etc.\n* 🧾 Option to output in plain text instead of Markdown\n* 📏 Limit directory depth with `--max-depth`\n* 📦 Show file sizes with `--sizes`\n* 💾 Save output to a file with `--output`\n* 🎯 Supports ignoring files/folders\n* 🎯 Supports selecting only certain top-level items\n* ✅ No external dependencies, pure Python!\n\n---\n\n## 📦 Installation\n\u003c!--\n### 📌 From PyPI (Recommended)\n\n\u003e Requires Python 3.6+\n\n```bash\npip install treemark\n````\n\nOnce installed, run it using:\n\n```bash\ntreemark\n```\n--\u003e\n### 🛠️ From Source (Recommended)\n\nClone the repository:\n\n```bash\ngit clone https://github.com/avirsaha/treemark.git\ncd treemark\npip install .\n```\n\nOr install in editable mode (for development):\n\n```bash\npip install -e .\n```\n\n---\n\n## 📂 Usage\n\n### Basic Usage\n\n```bash\ntreemark\n```\n\nThis generates a Markdown tree of the current directory.\n\n### Options\n\n| Option            | Description                                                    |\n| ----------------- | -------------------------------------------------------------- |\n| `--root PATH`     | Root directory to start from (default: current directory)      |\n| `--ignore`        | Space-separated list of files/folders to ignore                |\n| `--select-only`   | Space-separated list of top-level items to include exclusively |\n| `--max-depth N`   | Limit how deep the recursion goes (e.g., `--max-depth 2`)      |\n| `--sizes`         | Show file sizes in bytes next to each file                     |\n| `--format FORMAT` | Choose output format: `markdown` (default) or `plain`          |\n| `--output FILE`   | Save the tree output to a specified file                       |\n| `--version`       | Display version info and exit                                  |\n| `-h, --help`      | Show help message and exit                                     |\n\n---\n\n### Example\n\n```bash\ntreemark --root myproject --ignore __pycache__ venv .git --max-depth 2 --sizes --output structure.md\n```\n\nOutput (Markdown):\n\n```\n# Project Structure\n\n├── README.md (1.2 KB)\n├── requirements.txt (57 B)\n└── src/\n    ├── main.py (2.1 KB)\n    └── utils.py (800 B)\n```\n\n---\n\n## ✅ Ideal For\n\n* Project READMEs\n* Codebase onboarding docs\n* Prompting LLMs with structural context\n* Static documentation sites\n\n---\n\n## 🧪 Testing\n\n```bash\npytest\n```\n\nTests are located in the `tests/` directory.\n\n---\n\n## 🧹 Cleanup (Dev Only)\n\nTo remove build artifacts before packaging or publishing:\n\n**Windows:**\n\n```powershell\nRemove-Item -Recurse -Force build, dist, *.egg-info\n```\n\n**macOS/Linux:**\n\n```bash\nrm -rf build dist *.egg-info\n```\n\n---\n\n## 🐛 Troubleshooting\n\n* **PermissionError**: TreeMark now skips inaccessible directories (e.g., `System Volume Information` on Windows).\n* **Output formatting issues?** Make sure you’re viewing the result in a Markdown-capable viewer like GitHub or VSCode.\n\n---\n\n## 🤝 Contributing\n\nWe welcome PRs and suggestions!\n\n1. Fork the repo\n2. Create a feature branch\n3. Make your changes\n4. Write or update tests\n5. Submit a pull request 🚀\n\n\u003c!--See [`CONTRIBUTING.md`](CONTRIBUTING.md) for more.--\u003e\n\n---\n\n## 📜 License\n\n[MIT License](LICENSE) © 2025 Aviraj Saha\n\n---\n\n## 🔗 Related Projects\n\n* [`tree`](https://man7.org/linux/man-pages/man1/tree.1.html) — Classic CLI directory viewer\n* [`py-tree`](https://pypi.org/project/tree/) — CLI tree views, not markdown-focused\n\n---\n\n## ✅ TODOs\n\n* [x] Add output to file support\n* [x] Add folder depth limit\n* [x] Add format options (Markdown vs plain text)\n* [x] Show file sizes\n* [ ] Add color themes (for terminal output)\n* [ ] Add Git integration (e.g., show tracked/untracked)\n\n---\n\n## 📣 Stay in Touch\n\n* GitHub: [@avirsaha](https://github.com/avirsaha)\n* Issues or feature requests? [Submit here](https://github.com/avirsaha/treemark/issues)\n* Email: [aviraj.saha@outlook.com](mailto:aviraj.saha@outlook.com)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favirsaha%2Ftreemark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favirsaha%2Ftreemark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favirsaha%2Ftreemark/lists"}