Metadata-Version: 2.4
Name: apt-file-fast
Version: 0.1.0
Summary: Fast sharded-index replacement for apt-file search on Debian/Ubuntu.
Project-URL: Homepage, https://github.com/izumo-m/apt-file-fast
Project-URL: Repository, https://github.com/izumo-m/apt-file-fast
Project-URL: Issues, https://github.com/izumo-m/apt-file-fast/issues
Author-email: Masanao Izumo <49137441+izumo-m@users.noreply.github.com>
License-Expression: MIT
License-File: LICENSE
Keywords: apt,apt-file,debian,dpkg,package-search,ripgrep,ubuntu
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: System :: Archiving :: Packaging
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# apt-file-fast

A fast replacement for `apt-file search` on Debian/Ubuntu — with **dramatically faster index creation**.

`apt-file-fast` builds and maintains a local search index of the files provided by your
installed packages. Updates are incremental: only the data for packages added, removed, or
changed since the last run is rewritten, so refreshing after `apt install` / `apt upgrade`
is **orders of magnitude faster than `apt-file update`**.

## Requirements

- Debian or Ubuntu
- Python 3.10+
- [`ripgrep`](https://github.com/BurntSushi/ripgrep) (`apt install ripgrep`)

## Install

### From PyPI (recommended)

```bash
uv tool install apt-file-fast
```

Or run it one-shot without installing:

```bash
uvx apt-file-fast --help
```

### From source

```bash
git clone https://github.com/izumo-m/apt-file-fast.git
cd apt-file-fast
uv sync
uv run apt-file-fast --help
```

## Usage

Build or refresh the index (run once, then after every `apt install`/`apt upgrade`):

```bash
apt-file-fast update
```

Search for a file across all installed packages:

```bash
apt-file-fast search ls
apt-file-fast search -i README            # case-insensitive
apt-file-fast search -x '^/usr/bin/py.*'  # regex
```

Clear the cache:

```bash
apt-file-fast clean
```

### Options

| Option              | Scope        | Description                                 |
| ------------------- | ------------ | ------------------------------------------- |
| `--cache-dir PATH`  | all commands | Override cache location                     |
| `-i, --ignore-case` | `search`     | Case-insensitive match                      |
| `-x, --regexp`      | `search`     | Treat the query as a regex                  |

See `apt-file-fast --help` for the full list of options.

## License

[MIT](LICENSE) © 2026 Masanao Izumo

---

Contributors and maintainers: see
[`docs/development.md`](https://github.com/izumo-m/apt-file-fast/blob/main/docs/development.md)
for internals and the release process.
