Metadata-Version: 2.3
Name: krill-collector
Version: 0.1.5
Summary: Record browser workflow sessions into krill recordings
Author: anonymous
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: krill-core==0.1.5
Requires-Dist: playwright>=1.49
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# krill-collector

[![PyPI](https://img.shields.io/pypi/v/krill-collector)](https://pypi.org/project/krill-collector/)
[![Python](https://img.shields.io/pypi/pyversions/krill-collector)](https://pypi.org/project/krill-collector/)

> Named after krill, small marine crustaceans.

Record browser workflows and retain optional PHP request evidence separately.

## Install

Follow the [installation requirements](../../README.md#install). Install the browser binary:

```bash
uv add krill-collector
uv run playwright install chromium
```

## Usage

Record from the command line — drive the browser by hand, then close the tab to finish:

```bash
uv run krill-collect http://target-app.local -o logicflow.json
```

Or from Python:

```python
from pathlib import Path

from krill_collector import WorkflowCollector, save_recording

collector = WorkflowCollector("http://target-app.local")
recording = collector.collect()  # opens a browser; records until the tab closes
save_recording(recording, Path("logicflow.json"))
```

The recording is consumed by the companion [krill-fuzzer](../krill-fuzzer/README.md) package.

## API

```text
Browser capture → WorkflowRecording → recording JSON
PHP capture     → server_requests   → evidence JSONL
```

- [Collector and recorder interfaces](docs/design-collect.md).
- [PHP evidence access and CLI outputs](docs/design-server-requests.md#cli-output).
- [Recording persistence](../krill-core/docs/design-persistence.md).

## Documentation

- [Docs index](docs/index.md) — collect module design and implementation notes.

## License

GPL-2.0 — see [LICENSE](../../LICENSE).
