Skip to main content

fs-search

fs-search is a command-line tool that allows you to search for files and directories within a specified base path. You can customize your search by including or excluding specific file extensions and directories, and the results can be displayed in a user-friendly format with options to save them to a file.

Features

  • Search for files and directories starting from a specified base path.
  • Exclude files based on extensions (-e).
  • Exclude directories from the search (-E).
  • Search only for files (-f) or only for directories (-d).
  • Save the results to a file (-o).
  • Display relative paths instead of full paths (-r).
  • Supports cross-platform usage with pathlib.
  • Colorful output using colorama.
  • Easily extendable for future features.

Installation

You can install fs-search via pip:

pip install fs-search

Usage

Basic Search

Search the current directory for files and directories:

fs-search

Exclude File Extensions

Exclude specific file extensions from the search:

fs-search -e .log -e .tmp

Exclude Directories

Exclude specific directories from the search:

fs-search -E node_modules -E .git

Search Only Files

Search only for files (excluding directories):

fs-search -f

Search Only Directories

Search only for directories (excluding files):

fs-search -d

Save Results to a File

Save the search results to a file:

fs-search -o results.txt

Display Relative Paths

Display relative paths instead of full paths:

fs-search -r

Combine Options

You can combine multiple options:

fs-search -b /path/to/search -e .log -E node_modules -f -o results.txt

Development

To contribute to fs-search, you can clone the repository and install the necessary dependencies:

git clone https://github.com/voyager-2021/fs-search.git
cd fs-search
pip install -e .[dev]

Running Mypy

Run mypy before commiting. To run mypy (using mypy), simply run:

mypy search_fs --strict

Todo

Optimize lol.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project Links

Metadata

Release files for fs-search 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fs-search 0.1.2
File Size Uploaded Provenance
fs_search-0.1.2.tar.gz 6.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for fs-search 0.1.2
File Interpreter ABI Platform
fs_search-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 13.6 kB

Release files / fs_search-0.1.2.tar.gz

Download URL fs_search-0.1.2.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3fb973198ccb0f57b112e1e4d8cfb8a100f2b53267f104fcb6b1335cf025e3a4
BLAKE2b-256 checksum
How to use checksums
f0cfe8f90acc97d57e155781762da4352a23c3278c193dfa102285804d1fbf92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.0

Release files / fs_search-0.1.2-py3-none-any.whl

Download URL fs_search-0.1.2-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
50821fcdee3a7d781dbdca6ee7345c5faab1af07fedda6be1d60e632c1b36f17
BLAKE2b-256 checksum
How to use checksums
2bf6ca033f67e30542e198eeeba676a7ba7864c485bdc4c942ba8b5f6d4adbe1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.0

Security for fs-search 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page