This is an example configuration file for rs_clean. You can save this as:
- `rs_clean.json` or `rs_clean.toml` in your project root
- `.rs_clean.json` or `.rs_clean.toml` for hidden config
- `config/rs_clean.json` or `config/rs_clean.toml` in a config directory
- **User config**: `%APPDATA%\rs_clean\rs_clean.toml`
- **Local config**: `%LOCALAPPDATA%\rs_clean\rs_clean.toml`
- **Project config**: `rs_clean.toml` in project root
- **User config**: `~/.rs_clean/rs_clean.toml`
- **Project config**: `rs_clean.toml` in project root
- **Hidden config**: `.rs_clean.toml` in project root
```json
{
"default_path": "/home/user/projects",
"exclude_types": ["nodejs", "flutter"],
"exclude_dirs": ["vendor", "external"],
"max_concurrent": 8,
"max_depth": 30,
"max_files": 5000,
"verbose": true
}
```
```toml
default_path = "/home/user/projects"
exclude_types = ["nodejs", "flutter"]
exclude_dirs = ["vendor", "external"]
max_concurrent = 8
max_depth = 30
max_files = 5000
verbose = true
```
- `default_path`: Default directory to clean (defaults to current directory)
- `exclude_types`: List of project types to exclude from cleaning
- `exclude_dirs`: List of directory names to exclude from cleaning
- `max_concurrent`: Maximum number of concurrent workers (defaults to CPU core count)
- `max_depth`: Maximum directory depth to scan (defaults to 50)
- `max_files`: Maximum files per project (defaults to 10000)
- `verbose`: Show detailed output (defaults to false)
Command line arguments always take precedence over configuration file settings:
```bash
rs_clean /custom/path
rs_clean --exclude-type cargo --exclude-type go
rs_clean --exclude-dir build --exclude-dir dist
rs_clean --config /path/to/custom-config.json
rs_clean --verbose
```
```cmd
rs_clean config init
rs_clean config set verbose true
rs_clean config set max_concurrent 4
rs_clean config set exclude_types cargo,go
rs_clean config show
```
```toml
default_path = "C:\\Users\\username\\projects"
exclude_dirs = ["node_modules", "target", "dist"]
exclude_types = ["cargo", "go", "gradle"]
max_concurrent = 4
verbose = true
```
```powershell
rs_clean config init
rs_clean config set default_path "C:\Projects\MyProject"
rs_clean config set exclude_types "cargo,go,gradle"
rs_clean --verbose
```
- Configuration file format is identical across platforms
- Path separators are handled automatically (use `/` or `\\` in Windows)
- All commands work the same way on all platforms
- Configuration priority: CLI args > config file > defaults