Metadata-Version: 2.4
Name: brui_core
Version: 1.1.0
Summary: Core browser UI automation framework
Author-email: Ryan Zheng <ryan.zheng.work@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/AutoByteus/brui_core.git
Project-URL: Source, https://github.com/AutoByteus/brui_core.git
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: playwright==1.55.0
Requires-Dist: pyperclip
Requires-Dist: Pillow
Provides-Extra: test
Requires-Dist: pytest-playwright==0.4.4; extra == "test"
Requires-Dist: playwright==1.55.0; extra == "test"
Requires-Dist: pytest-asyncio; extra == "test"

# BRUI Core (Browser UI Automation Core)

A flexible and robust browser UI automation framework that provides essential functionality for browser-based UI automation projects.

## Features

- **Browser Management**: Automated browser launching and control across different operating systems
- **Configuration Handling**: Flexible configuration management with TOML and environment variable support
- **Clipboard Integration**: Easy clipboard monitoring and manipulation
- **UI Integration Base**: Extensible base classes for UI automation
- **Cross-Platform Support**: Works on Linux and macOS

## Installation

### From PyPI (recommended)

```bash
pip install brui_core
```

### From source (editable)

```bash
git clone https://github.com/AutoByteus/brui_core.git
cd brui_core
python -m venv .venv
source .venv/bin/activate  # or .venv\\Scripts\\activate on Windows
pip install -r requirements.txt  # installs the package via -e .
```

### Development / testing extras

```bash
pip install -r requirements-dev.txt  # pulls in brui_core[test]
```

### Dependencies only (no package install)

```bash
pip install -r requirements-deps.txt
```

> Use this when you want all runtime dependencies without installing `brui_core` itself.

### Build the distribution

This project uses modern packaging via `pyproject.toml` and setuptools. To produce sdist/wheel artifacts:

```bash
pip install build
python -m build
```

## Quick Start

```python
from brui_core.ui_integrator import UIIntegrator

async def main():
    # Initialize the UI integrator
    ui = UIIntegrator()
    await ui.initialize()
    
    try:
        # Your automation code here
        pass
    finally:
        # Clean up
        await ui.close()

# Run with asyncio
import asyncio
asyncio.run(main())
```

## Requirements

- Python 3.8+
- Playwright (pinned in `pyproject.toml` and installed automatically)
- Chrome/Chromium browser installed
- Pillow, pyperclip, and other transitive dependencies installed with the package

## Configuration

The framework supports configuration via TOML files or environment variables:

```toml
[browser]
chrome_profile_directory = "Profile 1"
remote_debugging_port = 9222
remote_host = "localhost"
```

Environment variables:
- BROWSER_CONFIG_PATH: Path to custom browser configuration
- CHROME_PROFILE_DIRECTORY: Override chrome profile directory
- CHROME_DOWNLOAD_DIRECTORY: Override download directory

## Contributing

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Support

For support, please open an issue in the GitHub repository.

## Acknowledgments

- Built with Playwright
- Developed by AutoByteus
