{"id":28420777,"url":"https://github.com/grrowl/ts-print-tree","last_synced_at":"2026-02-17T17:02:20.042Z","repository":{"id":246629163,"uuid":"821690968","full_name":"grrowl/ts-print-tree","owner":"grrowl","description":"Print a tree-like view of your project and accessible imports (good for documentation and LLMs!)","archived":false,"fork":false,"pushed_at":"2024-07-08T03:40:31.000Z","size":393,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-06T16:51:41.219Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grrowl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-06-29T06:54:10.000Z","updated_at":"2024-12-24T12:41:49.000Z","dependencies_parsed_at":"2024-06-29T08:27:04.951Z","dependency_job_id":"3feb348d-6b10-4188-aee1-29faa3e5b628","html_url":"https://github.com/grrowl/ts-print-tree","commit_stats":null,"previous_names":["grrowl/ts-print-tree"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/grrowl/ts-print-tree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grrowl%2Fts-print-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grrowl%2Fts-print-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grrowl%2Fts-print-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grrowl%2Fts-print-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grrowl","download_url":"https://codeload.github.com/grrowl/ts-print-tree/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grrowl%2Fts-print-tree/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29550825,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T14:33:00.708Z","status":"ssl_error","status_checked_at":"2026-02-17T14:32:58.657Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-06-05T03:49:44.510Z","updated_at":"2026-02-17T17:02:20.025Z","avatar_url":"https://github.com/grrowl.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌳 ts-print-tree\n\n## Overview\n\nts-print-tree is a command-line tool that generates a tree-like representation of your TypeScript project structure, including exported members and their signatures. It's perfect for quickly understanding the layout and API of a TypeScript project, or a concise way of summarising your project's structure to AI models like ChatGPT or Claude.\n\n## 🚀 Features\n\n- Generates a tree-like view of your TypeScript project structure\n- Lists exported members (functions, classes, interfaces) from each file\n- Displays function signatures with parameter types and return types\n- Ignores common directories and files (e.g., node_modules, .git)\n- Customizable ignore patterns\n\n## 🤖 Why Use ts-print-tree?\n\n- Quickly grasp the structure of a new or unfamiliar TypeScript project\n- Generate project descriptions for documentation purposes\n- Create input for AI models like ChatGPT or Claude to assist with project understanding and development\n- Easily share project structure with team members or stakeholders\n\n## 📦 Installation\n\nNo installation required! You can run ts-print-tree directly using `npx` or `bunx`.\n\n## 🛠️ Usage\n\nNavigate to the root of your TypeScript project (where your `tsconfig.json` is located) and run:\n\n```\nnpx ts-print-tree\n```\n\nor if you prefer to use Bun:\n\n```\nbunx ts-print-tree\n```\n\nThe tool will output a tree-like structure of your project, including files, directories, and exported members.\n\n## 📋 Example Output\n\n```\nts-print-tree/\n└── src/\n    ├── index.ts\n    │   ├── interface TreeNode\n    │   └── function tree(rootDir?: string, pathFilter?: (path: string) =\u003e boolean, visibilityLevel?: VisibilityLevel): TreeNode\n    └── utils/\n        └── helper.ts\n        └── function formatDate(date: Date): string\n```\n\nMore comprehensive example output can be found in the [test snapshots for this very project](https://github.com/grrowl/ts-print-tree/blob/main/src/__snapshots__/cli.test.ts.snap).\n\n## 🔧 Customization\n\nYou can customize ignored patterns and output format by passing arguments to the CLI command. For example:\n\n```\nnpx ts-print-tree -- --ignore \"docs\" --ignore \"/\\\\.(test|spec)\\\\.ts$/\" --list --private\n```\n\nThis will ignore files and directories of docs or ending with `.test.ts` or `.spec.ts`, include private members, and output in list format (which is more efficient for LLM usage).\n\nRun `npx ts-print-tree -- --help` to see all available options.\n\n## 🧰 Programmatic Usage\n\nYou can also use ts-print-tree programmatically in your TypeScript projects:\n\n```typescript\nimport { tree, VisibilityLevel } from 'ts-print-tree';\n\nconst projectStructure = tree(\n  process.cwd(),\n  (path) =\u003e !path.includes('node_modules'),\n  VisibilityLevel.Public\n);\n\nconsole.log(JSON.stringify(projectStructure, null, 2));\n```\n\nThis will give you a structured representation of your project that you can further process or format as needed.\n\n## 📚 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## 📄 License\n\nThis project is licensed under the ISC License - I hope you find it useful!\n\n## 🙏 Acknowledgments\n\n- TypeScript team for the excellent Compiler API\n- All the open-source contributors who inspire projects like this\n\nHappy exploring! 🕵️‍♀️🌟\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrrowl%2Fts-print-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrrowl%2Fts-print-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrrowl%2Fts-print-tree/lists"}