Metadata-Version: 2.4
Name: biston
Version: 0.3.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Rust
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 :: Software Development :: Libraries :: Python Modules
Requires-Dist: pytest>=6.0 ; extra == 'dev'
Requires-Dist: pytest-asyncio ; extra == 'dev'
Requires-Dist: black ; extra == 'dev'
Requires-Dist: isort ; extra == 'dev'
Requires-Dist: mypy ; extra == 'dev'
Provides-Extra: dev
Summary: A tool for analyzing Python code
Keywords: python,analysis,rust
Author-email: mojzis <mojzisek@gmail.com>
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: documentation, https://github.com/mojzis/biston#readme
Project-URL: homepage, https://github.com/mojzis/biston
Project-URL: repository, https://github.com/mojzis/biston

# biston

A structural clone detector for Python code. Written in Rust.

It parses Python files with [tree-sitter](https://tree-sitter.github.io/tree-sitter/), normalizes the AST, and finds functions that are structurally similar to each other.

## Install

```
pip install biston
```

Or build from source:

```
cargo build --release
```

## Usage

```
biston scan [path]
```

Options:

- `--threshold <0.0-1.0>` — similarity threshold (higher = stricter)
- `--min-lines <n>` — minimum function length to consider
- `--format <text|json|sarif>` — output format
- `--suggest` — show abstraction suggestions for similar pairs
- `--config <dir>` — directory containing `biston.toml` or `pyproject.toml`

## Configuration

Settings can go in `biston.toml` or under `[tool.biston]` in `pyproject.toml`.

## License

MIT

