# Watchfiles Documentation
High-performance file watching library for automatic development reloading
**Version:** v1.1.0 | **Platforms:** Windows, macOS, Linux | **Last updated:** December 17, 2025
## Overview
Watchfiles is a cross-platform file watching library that provides real-time file system monitoring with native OS API integration. In the Robotics MCP WebApp, it's used by Uvicorn for automatic server reloading during development.
## Key Features
- **Cross-Platform** - Windows, macOS, Linux
- **High Performance** - Native OS APIs
- **Low Resource** - < 1% CPU usage
- **Fast Response** - < 100ms detection
## Technical Architecture
### Dual-Process System
- Main server process (FastAPI/WebSockets)
- Reloader process (watchfiles monitoring)
```
INFO: Started reloader process [485560] using WatchFiles
INFO: Started server process [502800]
```
### Integration
- Uvicorn uses watchfiles for --reload mode
- Monitors Python files, config files, templates
- Automatic restart on file changes
- Preserves WebSocket connections during reload (where supported)
## Usage
```bash
uvicorn main:app --reload --host 0.0.0.0 --port 8000
```
The `--reload` flag enables watchfiles-based file monitoring.
## Configuration
Default watch patterns include:
- `*.py` - Python source files
- `*.yaml`, `*.yml` - Configuration
- `*.json` - JSON configs
- `*.html`, `*.css`, `*.js` - Frontend assets (when applicable)
---
[Back to Development](development.md) | [Documentation Home](../README.md)