Skip to main content

Pseek is a Python library to search files, folders, and text

Project description

Pseek

Overview

A powerful command-line tool for searching files, directories, and content inside files efficiently. The tool supports searching by name, content, extensions, and more with advanced filtering options.

Features

  • Search in file & folder names
  • Search inside file contents
  • Highlight matches in terminal output
  • Optimized for speed with ThreadPoolExecutor
  • Cross-platform (Linux, macOS, Windows)

Installation

1️⃣ Install via pip (Recommended)

pip install pseek

2️⃣ Install from source

git clone https://github.com/ArianN8610/pysearch.git
cd pysearch
pip install click==8.1.8 lark==1.2.2

Usage

Run the command with a search query:

pseek <query> [options]

Examples

Search for a keyword in file & folder names

pseek "my_keyword" --path /path/to/search --file --directory

Search inside file contents

pseek "error" --path /var/logs --content

Search only in specific file types

pseek "TODO" --path ./projects --ext py --ext txt

Search by regex

pseek "error\d+" --regex

Command Options

Option Description
--path Base directory to search in (default: current directory .)
--file Search only in file names
--directory Search only in directory names
--content Search inside file contents
--ext, --exclude-ext Filter by file extension (e.g., .txt, .log)
--case-sensitive Make the search case-sensitive (except when --expr is enabled, in which case you can make it case sensitive by putting c before term: c"foo")
--regex Use regular expressions to search (except when --expr is enabled, in which case you can make it regex by putting r before term: r"foo")
--include, --exclude Limit search results to specific set of directories or files
--re-include, --re-exclude Limit search results to specific directories or files with regex
--word Match the whole word only (except when --expr is enabled, in which case you can make it match whole word by putting w before term: w"foo")
--expr Enable to write conditions in the query. Example: r"foo.*bar" and ("bar" or "baz") and not "qux" (To use regex, word, and case-sensitive features, you can use the prefixes r, w, and c before terms. Allowed modes: r, w, c, wc, cw, rc, cr. Examples: r"foo.*bar", wc"Foo", cr".*Foo", ...)
--timeout To stop the search after a specified period of time (Seconds)
--max-size, --min-size Specify maximum and minimum sizes for files and directories
--full-path Display full path of files and directories
--no-content Only display files path for content search

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

pseek-2.3.1.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pseek-2.3.1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file pseek-2.3.1.tar.gz.

File metadata

  • Download URL: pseek-2.3.1.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for pseek-2.3.1.tar.gz
Algorithm Hash digest
SHA256 49fce45c549148a31a3bc52745b8c9a13eeef9c35948860ed11fd7203563e2b2
MD5 ac0bc2ec785277422d8ad3e6e5854469
BLAKE2b-256 35c29957db082c474e1193581264017e4a809dd1fa51904f9b26b97521fb5ea6

See more details on using hashes here.

File details

Details for the file pseek-2.3.1-py3-none-any.whl.

File metadata

  • Download URL: pseek-2.3.1-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for pseek-2.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 77b1f91cdb73302aa91a8d8bea7cd80e518e9444bc08c64c2d0d8f3568ce53f2
MD5 725fc8ad8cd6bd1a00c368c23796efec
BLAKE2b-256 89469671c121fce9e5f5e8f04d0f61c38cba27ed00ba66b4ee1fd3c4635d83e5

See more details on using hashes here.

Supported by

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