tree-me
v1.0.3
Published
Generate a visual tree and GitHub-style link list for any project folder — exports to clean MDX.
Maintainers
Readme
tree-me 
A minimal, TypeScript-powered CLI tool that recursively walks a directory tree, generates relative file paths, and builds sharable GitHub-style links for every file. Perfect for documenting, linking, or sharing the structure of your projects.
🚀 Features
- 📁 Walks entire folder trees (recursively)
- 🔗 Outputs GitHub-style URLs for each file
- 🧭 Uses a base GitHub path to generate full links
- 🧠 Auto-detects local Git remote URL if
baseUrlis omitted - 📦 Outputs
.txt, Markdown, or JSON - 🌲 Optional pretty-printed tree view
- 🧑💻 Simple CLI interface, ready for automation or docs
📦 Installation
npm install -g tree-me💻 Usage
tree-me [directory] [baseUrl]If no baseUrl is provided, it will auto-detect the Git remote and infer a GitHub-compatible link.
🔧 Example
tree-me ./src https://github.com/yourname/your-repo/tree/main/srcOr just:
tree-me ./src(uses git origin URL as base)
📄 CLI Options
| Flag | Description |
| ---------------- | ----------------------------------------- |
| --format <fmt> | Output format: txt, md, or json |
| --tree | Show a visual tree structure |
| --out <file> | Save output to a file |
| --depth <n> | Limit folder traversal to n levels deep |
| --base <url> | Override auto-detected Git base URL |
🏗️ npm Publishing-Ready Structure
Tree-links is structured for clean TypeScript CLI builds:
tree-me/
├── src/
│ └── index.ts # Entry point CLI script
├── dist/ # Compiled JS output
├── package.json # bin entry and metadata
├── tsconfig.json # Strict, CLI-friendly TS config
├── README.mdTo build and test locally:
npm install
npm run build
npm linkThen you can run it anywhere:
tree-me ./srcTo publish:
npm login
npm publish --access public🧠 Future Enhancements
- Toggle between GitHub / GitLab / Bitbucket link templates
- Include folders as clickable links
- Export as markdown w/ tree + links
- VSCode extension / GUI launcher
- Interactive prompt for missing args
📝 License
MIT
