Skip to main content

Simple file search CLI — search by filename or content (grep)

Project description

search

Simple file search CLI — search by filename or content.

Installation

# From the project directory
pip install .

# Or with ANSI color support on Windows
pip install ".[color]"

# Editable (development) install
pip install -e .

Usage

# Search for files by name (substring by default)
search document.txt

# Exact match
search --exact document.txt

# Glob pattern
search --glob "*.jpg"

# Regular expression
search --regex "data_\d{4}"

# Case-insensitive
search --ignore-case readme

# Search file CONTENTS (like grep)
search --grep "TODO|FIXME"

# Limit to current directory
search --roots . myfile.txt

# With live progress
search --progress --roots . myfile.txt

# Exclude common directories
search --exclude-dir .git --exclude-dir node_modules config

# Limit depth and results
search --max-depth 3 --max-results 10 "*.py"

# Sort results
search --sort name --roots . "*.txt"

# Use python -m
python -m search --roots . --help

Flags

Flag Description
filename Name or pattern to search for
--progress Show live scan progress
--roots DIR [DIR ...] One or more root directories
--mounts Search all mounted filesystems
--glob Treat filename as glob (e.g. *.jpg)
--regex Treat filename as regex
--exact Exact filename match
--ignore-case Case-insensitive matching
--exclude-dir DIR Exclude directory (repeatable)
--max-depth N Max recursion depth
--max-results N Stop after N matches
--sort {path,name,size} Sort order
--grep Search file contents (like grep)

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

searchx_cli-1.0.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

searchx_cli-1.0.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file searchx_cli-1.0.0.tar.gz.

File metadata

  • Download URL: searchx_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for searchx_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 54f669c3d1c7aa3a54e4c97a55de170394172728a53afd682b59e152c92d277f
MD5 064e104e0e549f498734585114809c30
BLAKE2b-256 b5e845c3b4cacc24dcdf999de2706db054917ee0b349c7312452cbac8792dffa

See more details on using hashes here.

File details

Details for the file searchx_cli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: searchx_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for searchx_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9feb5272def9a8d651a0139b565c43ee15e31c712bf3461bcb76c2c28cbed256
MD5 7d325a77e6a116b2ebbd911ce1d378ad
BLAKE2b-256 64bae9d9e434cf11137e56f8186111658a1f1e685b065366b119c91ddc5d35f5

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