New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

treesrc

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

treesrc

A CLI tool written in TypeScript to display directory structure and file contents, respecting .gitignore rules.

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
0
Created
Source

🌳 treesrc

A CLI tool written in TypeScript that displays directory structures and file contents, fully respecting .gitignore rules.

📦 Installation

Install globally via npm:

npm install -g treesrc

or use it temporarily without installing:

npx treesrc <directory>

🚀 Quick Usage

Simply run treesrc followed by the target directory:

treesrc ./my-project

You 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 .gitignore rules
  • 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 link

Run 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 .git to default ignore patterns
  • Improved documentation

v1.0.0

  • First stable release
  • Rewritten in TypeScript
  • npm published

📄 License

MIT License

Made with ❤️ by O6lvl4.

Keywords

cli

FAQs

Package last updated on 19 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts