Metadata-Version: 2.4
Name: searchx-cli
Version: 1.0.0
Summary: Simple file search CLI — search by filename or content (grep)
Author-email: Almir Filho <almirfilho9@users.noreply.github.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/almirfilho9/search
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Utilities
Classifier: Topic :: System :: Filesystems
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Provides-Extra: color
Requires-Dist: colorama>=0.4.0; extra == "color"

# search

Simple file search CLI — search by filename or content.

## Installation

```bash
# From the project directory
pip install .

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

# Editable (development) install
pip install -e .
```

## Usage

```bash
# 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) |
