-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrs_clean.example.toml
More file actions
122 lines (95 loc) · 3.21 KB
/
rs_clean.example.toml
File metadata and controls
122 lines (95 loc) · 3.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# rs_clean Configuration File
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
## Platform-Specific Locations
### Windows
- **User config**: `%APPDATA%\rs_clean\rs_clean.toml`
- **Local config**: `%LOCALAPPDATA%\rs_clean\rs_clean.toml`
- **Project config**: `rs_clean.toml` in project root
### Unix-like (Linux, macOS)
- **User config**: `~/.rs_clean/rs_clean.toml`
- **Project config**: `rs_clean.toml` in project root
- **Hidden config**: `.rs_clean.toml` in project root
## JSON Format Example
```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 Format Example
```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
```
## Configuration Options
- `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 Override
Command line arguments always take precedence over configuration file settings:
```bash
# Override default path from config
rs_clean /custom/path
# Override exclude types from config
rs_clean --exclude-type cargo --exclude-type go
# Override exclude dirs from config
rs_clean --exclude-dir build --exclude-dir dist
# Use specific config file
rs_clean --config /path/to/custom-config.json
# Show verbose output
rs_clean --verbose
```
## Windows-Specific Usage
### Configuration Commands
```cmd
# Initialize user config file (creates %APPDATA%\rs_clean\rs_clean.toml)
rs_clean config init
# Set configuration values
rs_clean config set verbose true
rs_clean config set max_concurrent 4
rs_clean config set exclude_types cargo,go
# Show current configuration
rs_clean config show
```
### Windows Path Examples
```toml
# Windows paths in configuration
default_path = "C:\\Users\\username\\projects"
exclude_dirs = ["node_modules", "target", "dist"]
exclude_types = ["cargo", "go", "gradle"]
max_concurrent = 4
verbose = true
```
### Windows PowerShell Usage
```powershell
# Initialize config
rs_clean config init
# Set values with spaces in paths
rs_clean config set default_path "C:\Projects\MyProject"
# Multiple exclude types
rs_clean config set exclude_types "cargo,go,gradle"
# Run with config
rs_clean --verbose
```
### Cross-Platform Notes
- 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