Skip to main content

Slimer reads your folder structure and file contents to transform it into a concise, readable string overview

Project description

Slimer

Slimer

Directory and File Content Visualisation CLI Tool

Slimer is a command line tool that helps you digest a folder structure and its file contents. It was designed to help with prompt engineering.

Features

  • Display directory structures in a tree-like format.
  • Show the content of files in the structure with an optional character limit.
  • Exclude or forcefully include specific files or directories.
  • Recognize and tag binary files, with an option to include/exclude them.
  • Limit the depth of directory exploration.
  • Copy the result to the clipboard or output to a file.
  • Filter the displayed files based on their modification time.
  • Include specific files based on their extension.

Installation

  • Ensure you have Python installed.
  • Install necessary dependencies:
pip install slimer

Dependencies

  • pyperclip: Used for copying output to clipboard.

Usage

To use Slimer, execute the slimer command and provide the necessary arguments:

slimer /path/to/directory -c -l 500 -e __pycache__ temp
Argument Description
-h, --help show this help message and exit
-c, --copy Copy the output to the clipboard.
-l LIMIT, --limit LIMIT Maximum number of characters to display from each file. No limit by default.
-d DEPTH, --depth DEPTH Maximum depth to explore in the directory structure.
-e [EXCLUDE ...], --exclude [EXCLUDE ...] List of files or directories to exclude.
-i [INCLUDE ...], --include [INCLUDE ...] List of files or directories to forcefully include even if they are in the exclude list.
-b, --binary Include binary files with a [Binary File] flag.
-t, --tree Only display the folder structure without file content.
-p PREPEND, --prepend PREPEND String to prepend at the beginning of the output.
-a APPEND, --append APPEND String to append at the end of the output.
-o OUTPUT, --output OUTPUT Path to a file where the output will be written. If not provided, prints to console.
-r RECENT, --recent RECENT Only display files modified within the last N minutes. Defaults to 10 minutes when no value is provided to the argument.
-f [FILE_EXTENSIONS ...], --file-extensions [FILE_EXTENSIONS ...] List of file extensions to exclusively display (e.g. .py .ts).
-v, --version show program's version number and exit
-s, --strip-comments Strip comments from the code in the output.

Author

Ben Villiere

Contributing

If you'd like to contribute to the development of Slimer, please create an issue or pull request in the project repository.

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slimer-1.0.5.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

slimer-1.0.5-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file slimer-1.0.5.tar.gz.

File metadata

  • Download URL: slimer-1.0.5.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.9.18 Linux/6.2.0-1012-azure

File hashes

Hashes for slimer-1.0.5.tar.gz
Algorithm Hash digest
SHA256 b66c72593faa513696e08ed18c07a611db2fd54b5da2fbad942d4ba19243c155
MD5 929540719345a731a2a9a80961501519
BLAKE2b-256 cd65fda48f1b363c03a49c2f0e69783ec3c8bd532af306a42410c040c2386807

See more details on using hashes here.

File details

Details for the file slimer-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: slimer-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.9.18 Linux/6.2.0-1012-azure

File hashes

Hashes for slimer-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4e7a3e782c6cc50e54e6b88731e4def3b33235a17168f96cbb45b4918c999e60
MD5 446dd749fbac5d7bf6d99d3fe116cd85
BLAKE2b-256 07c9f4565c389593fef6d90f9954ca1deff6a0a8e460ada3e787ba1a90ab29ed

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page