treesrc
v1.0.3
Published
A CLI tool written in TypeScript to display directory structure and file contents, respecting .gitignore rules.
Readme
🌳 treesrc
A CLI tool written in TypeScript that displays directory structures and file contents, fully respecting
.gitignorerules.
📦 Installation
Install globally via npm:
npm install -g treesrcor use it temporarily without installing:
npx treesrc <directory>🚀 Quick Usage
Simply run treesrc followed by the target directory:
treesrc ./my-projectYou can also specify additional ignore patterns:
treesrc ./my-project -i '*.log' '*.tmp'🎯 Features
- Display directory structures as a neatly formatted tree
- View the contents of each file in the directory
- Automatically respects
.gitignorerules - Supports custom ignore patterns via CLI arguments
🛠️ CLI Options
Usage: treesrc <directory> [options]
Arguments:
directory Target directory
Options:
-i, --ignore <patterns...> Additional ignore patterns
-V, --version output the version number
-h, --help display help for command⚙️ Development
Setup locally
Clone the repository and install dependencies:
git clone https://github.com/yourusername/treesrc.git
cd treesrc
npm install
npm run build
npm linkRun Locally
npm start -- <directory> [options]📝 Changelog
v1.0.3
- Added support for custom ignore patterns
You can now specify additional ignore patterns via CLI arguments.
Example:treesrc ./my-project -i '*.log' '*.tmp'
v1.0.2
Added binary file detection
Files are now checked for binary content by scanning the first bytes. If binary data is detected, the file content display is skipped with a message: "Binary file not displayed."Updated documentation
README updated to reflect changes regarding handling of binary files.
v1.0.1
- Added
.gitto default ignore patterns - Improved documentation
v1.0.0
- First stable release
- Rewritten in TypeScript
- npm published
📄 License
Made with ❤️ by O6lvl4.
