Skip to content

SCSDC-co/DINFO

DINFO (Directory Info)

Dinfo is a C# tool that provides detailed information about a directory. It uses Spectre.Console to create a clean and colorful TUI, showing files, lines, size, permissions, and file type statistics.

GitHub release License CD

Where to download

🚀 Features

  • Counts the number of files and directories.
  • Counts the number of lines of code, comment and blank lines in files.
  • Shows the total size of the directory.
  • Displays permissions of the directory.
  • Lists all file extensions and shows the most used extension.
  • Supports recursive processing of subdirectories (-r).
  • Verbose mode (-v) for more detailed information.
  • Elegant text-based interface with borders, tables, and colors via Spectre.Console.
  • Save the output in a .json or .yaml file.
  • Config file support: now you can use a dinfo.yaml file to specify options.
  • Ignore files and directories: specify patterns in the config file to automatically skip certain files or folders (using regex!).

💻 Installation

🔧 Manual

  1. Clone the repository:

    git clone https://github.com/SCSDC-co/DINFO.git
  2. Build with .NET:

    dotnet build # you need to be in src/tui for running this command
  3. Run the tool:

    dotnet run -- [directory] [options]  # same for this one

📦 Package

  1. You Can install the package with an AUR helper like yay or paru.

    yay -S dinfo
    paru -S dinfo

❓ Help Page

dinfo.tui v1.0.0

USAGE
  dinfo.tui <targetdirectory> [options]
  dinfo.tui [command] [...]

DESCRIPTION
  Display information about the specified directory and its contents.

PARAMETERS
  targetdirectory   The Directory to be analyzed. Default: Current Directory.

OPTIONS
  -r|--recursive    Recursively list all files and directories. Default: "False".
  -v|--verbose      Enable verbose output. Default: "False".
  -i|--ignore-gitignore  Ignore .gitignore files. Default: "False".
  -o|--output       Specify if you want the output in a file. Default: "False".
  -f|--file-format  Specify the output file (formats: json, yaml). Default: "output.json".
  -n|--no-tui       Disable TUI Default: "False".
  -h|--help         Shows help text.
  --version         Shows version information.

COMMANDS
  file              Display information about the specified file.

You can run `dinfo.tui [command] --help` to show help on a specific command.

Example:

# Get the information about the current directory
dinfo

# Get the information about a specific directory with rucursive processing
dinfo C:\Projects\MyFolder -r

# Get the information about a specific directory with verbose output
dinfo C:\Projects\MyFolder -v

# Save the output in ./output.json
dinfo C:\Projects\MyFolder -o

# Save the output in C:\dinfo-outputs\output1.json
dinfo C:\Projects\MyFolder -o -f C:\dinfo-outputs\output1.json

🖼️ Exampls Output (verbose)

Example Output


🛠️ Configuration example:

# dinfo.yaml
recursive: true
verbose: true
ignore_gitignore: false

ignored_files_or_directories:
  ignored_files:
    - "README.md"
    - "*.log"

  ignored_directories:
    - "node_modules"
    - ".git"

⚡ Technologies


📝 Notes

  • Dinfo is designed to be lightweight, fast, and simple.
  • Ideal for developers who want to count lines of code or get a quick overview of a directory.

🤝 Contributing

Contributions are welcome! Open a pull request or create an issue for suggestions or bug reports.


Roadmap

  • Adding more output types:
    • html
    • database
  • Adding a tree making system of the directory via flags

📜 License

This project is licensed under the GNU GPL v3.0. See the LICENSE file for details.

About

A cool tool to get some informations from directory and files, with json, yaml and html output support.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors