filemayor 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +90 -0
- package/README.md +188 -0
- package/core/reporter.js +1 -0
- package/index.js +1 -0
- package/package.json +5 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
FILEMAYOR PROPRIETARY LICENSE
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-2026 Lehlohonolo Goodwill Nchefu (Chevza). All rights reserved.
|
|
4
|
+
|
|
5
|
+
NOTICE: This software and all associated documentation files (the "Software")
|
|
6
|
+
are the proprietary property of Lehlohonolo Goodwill Nchefu (Chevza),
|
|
7
|
+
operating as FileMayor, and its contributors.
|
|
8
|
+
|
|
9
|
+
1. GRANT OF LICENSE
|
|
10
|
+
|
|
11
|
+
Subject to the terms of this License, you are granted a limited,
|
|
12
|
+
non-exclusive, non-transferable, revocable license to:
|
|
13
|
+
|
|
14
|
+
a) USE the Software for personal, non-commercial purposes at no cost
|
|
15
|
+
("Free Tier").
|
|
16
|
+
|
|
17
|
+
b) USE the Software for commercial purposes only upon purchasing a valid
|
|
18
|
+
commercial license from FileMayor ("Paid Tier").
|
|
19
|
+
|
|
20
|
+
2. RESTRICTIONS
|
|
21
|
+
|
|
22
|
+
You may NOT:
|
|
23
|
+
|
|
24
|
+
a) Copy, modify, merge, publish, distribute, sublicense, or sell copies
|
|
25
|
+
of the Software without express written permission from FileMayor.
|
|
26
|
+
|
|
27
|
+
b) Reverse engineer, decompile, disassemble, or otherwise attempt to
|
|
28
|
+
derive the source code of compiled portions of the Software.
|
|
29
|
+
|
|
30
|
+
c) Remove or alter any proprietary notices, labels, or trademarks on
|
|
31
|
+
the Software.
|
|
32
|
+
|
|
33
|
+
d) Use the Software to create a competing product or service.
|
|
34
|
+
|
|
35
|
+
e) Use the Software's source code, in whole or in part, in any other
|
|
36
|
+
software product without a commercial license agreement.
|
|
37
|
+
|
|
38
|
+
3. FREE TIER
|
|
39
|
+
|
|
40
|
+
The Free Tier grants individuals the right to:
|
|
41
|
+
- Use the desktop application for personal file organization
|
|
42
|
+
- Use the CLI tool for personal, non-commercial purposes
|
|
43
|
+
- Contribute improvements via pull requests (you retain copyright of
|
|
44
|
+
your contributions but grant FileMayor a perpetual license to use them)
|
|
45
|
+
|
|
46
|
+
4. PAID TIER
|
|
47
|
+
|
|
48
|
+
Commercial use, including but not limited to:
|
|
49
|
+
- Enterprise deployment across multiple machines
|
|
50
|
+
- Integration into commercial products or workflows
|
|
51
|
+
- Use in a business or organizational setting
|
|
52
|
+
- Server / data center deployment
|
|
53
|
+
- SOP AI Engine features
|
|
54
|
+
|
|
55
|
+
requires a valid Paid Tier license. Contact licensing@filemayor.app
|
|
56
|
+
for commercial licensing inquiries.
|
|
57
|
+
|
|
58
|
+
5. AI FEATURES
|
|
59
|
+
|
|
60
|
+
The Software includes AI-powered features that connect to third-party
|
|
61
|
+
APIs (Google Gemini). Use of these features is subject to:
|
|
62
|
+
- The respective third-party API terms of service
|
|
63
|
+
- Data processing as described in FileMayor's Privacy Policy
|
|
64
|
+
- Availability and rate limits of the third-party service
|
|
65
|
+
|
|
66
|
+
6. DATA & PRIVACY
|
|
67
|
+
|
|
68
|
+
The Software processes files locally on your device. AI features may
|
|
69
|
+
transmit document text (not file contents) to third-party APIs for
|
|
70
|
+
analysis. No personal data is collected, stored, or sold by FileMayor.
|
|
71
|
+
|
|
72
|
+
7. NO WARRANTY
|
|
73
|
+
|
|
74
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
75
|
+
OR IMPLIED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
|
76
|
+
FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY ARISING FROM THE USE OF THE
|
|
77
|
+
SOFTWARE.
|
|
78
|
+
|
|
79
|
+
8. TERMINATION
|
|
80
|
+
|
|
81
|
+
This License is effective until terminated. It terminates automatically
|
|
82
|
+
if you fail to comply with any term. Upon termination, you must destroy
|
|
83
|
+
all copies of the Software in your possession.
|
|
84
|
+
|
|
85
|
+
9. GOVERNING LAW
|
|
86
|
+
|
|
87
|
+
This License shall be governed by the laws of the Republic of South Africa.
|
|
88
|
+
|
|
89
|
+
For licensing inquiries: licensing@filemayor.app
|
|
90
|
+
For support: support@filemayor.app
|
package/README.md
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
<](https://www.npmjs.com/package/filemayor)
|
|
10
|
+
[](LICENSE)
|
|
11
|
+
[]()
|
|
12
|
+
[]()
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
**CLI** · **Desktop App** · **PWA** · **Data Center Ready**
|
|
17
|
+
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
## 🚀 Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# npm (recommended)
|
|
24
|
+
npm install -g filemayor
|
|
25
|
+
|
|
26
|
+
# Or one-liner
|
|
27
|
+
curl -fsSL https://raw.githubusercontent.com/filemayor/filemayor/main/install.sh | bash
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## 📦 What It Does
|
|
31
|
+
|
|
32
|
+
| Feature | Description |
|
|
33
|
+
|---------|-------------|
|
|
34
|
+
| **Scan** | Recursively scan directories with size, category, and date filtering |
|
|
35
|
+
| **Organize** | Auto-categorize files into 12 categories with configurable naming |
|
|
36
|
+
| **Clean** | Detect and remove junk files (temp, cache, logs, system junk) |
|
|
37
|
+
| **Watch** | Real-time file watcher with rules engine and auto-organize |
|
|
38
|
+
| **Undo** | Full rollback journal — undo any organization safely |
|
|
39
|
+
| **Config** | `.filemayor.yml` config with hierarchical merge and env vars |
|
|
40
|
+
|
|
41
|
+
## 🖥 CLI Usage
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Scan a directory
|
|
45
|
+
filemayor scan ~/Downloads
|
|
46
|
+
|
|
47
|
+
# Organize files (preview first)
|
|
48
|
+
filemayor organize ~/Downloads --dry-run
|
|
49
|
+
|
|
50
|
+
# Organize with naming convention
|
|
51
|
+
filemayor organize ~/Downloads --naming category_prefix
|
|
52
|
+
|
|
53
|
+
# Clean junk files
|
|
54
|
+
filemayor clean /var/tmp --yes
|
|
55
|
+
|
|
56
|
+
# Watch for new files and auto-organize
|
|
57
|
+
filemayor watch ~/Downloads
|
|
58
|
+
|
|
59
|
+
# Create config file
|
|
60
|
+
filemayor init
|
|
61
|
+
|
|
62
|
+
# Undo last organization
|
|
63
|
+
filemayor undo ~/Downloads
|
|
64
|
+
|
|
65
|
+
# Machine-readable output
|
|
66
|
+
filemayor scan ~/Downloads --json | jq '.files | length'
|
|
67
|
+
filemayor scan . --csv > report.csv
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## ⚙️ Configuration
|
|
71
|
+
|
|
72
|
+
Create a `.filemayor.yml` in your project or home directory:
|
|
73
|
+
|
|
74
|
+
```yaml
|
|
75
|
+
version: 1
|
|
76
|
+
|
|
77
|
+
organize:
|
|
78
|
+
naming: category_prefix # original | category_prefix | date_prefix | clean
|
|
79
|
+
duplicates: rename # rename | skip | overwrite
|
|
80
|
+
maxDepth: 20
|
|
81
|
+
ignore: [node_modules, .git, __pycache__, dist, build]
|
|
82
|
+
|
|
83
|
+
clean:
|
|
84
|
+
categories: [temp, cache, system, logs]
|
|
85
|
+
maxDepth: 10
|
|
86
|
+
|
|
87
|
+
watch:
|
|
88
|
+
directories: [~/Downloads]
|
|
89
|
+
autoOrganize: false
|
|
90
|
+
rules:
|
|
91
|
+
- match: "*.pdf"
|
|
92
|
+
action: move
|
|
93
|
+
dest: ~/Documents/PDFs
|
|
94
|
+
- match: "*.{jpg,png,gif}"
|
|
95
|
+
action: move
|
|
96
|
+
dest: ~/Pictures
|
|
97
|
+
|
|
98
|
+
output:
|
|
99
|
+
format: table # table | json | csv | minimal
|
|
100
|
+
colors: true
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## 📂 Categories
|
|
104
|
+
|
|
105
|
+
FileMayor recognizes **12 file categories** with **180+ extensions**:
|
|
106
|
+
|
|
107
|
+
| Category | Extensions |
|
|
108
|
+
|----------|-----------|
|
|
109
|
+
| Documents | pdf, doc, docx, txt, md, epub... |
|
|
110
|
+
| Images | jpg, png, gif, svg, webp, psd... |
|
|
111
|
+
| Audio | mp3, wav, flac, aac, ogg... |
|
|
112
|
+
| Video | mp4, mkv, avi, mov, webm... |
|
|
113
|
+
| Archives | zip, rar, 7z, tar, gz... |
|
|
114
|
+
| Code | js, ts, py, java, cpp, go, rs... |
|
|
115
|
+
| Config | json, yaml, yml, toml, ini, env... |
|
|
116
|
+
| Fonts | ttf, otf, woff, woff2... |
|
|
117
|
+
| Data | db, sqlite, parquet, hdf5... |
|
|
118
|
+
| Executables | exe, msi, app, apk, deb... |
|
|
119
|
+
| Design | fig, sketch, blend, stl, dwg... |
|
|
120
|
+
| Books | epub, mobi, azw, djvu, cbz... |
|
|
121
|
+
|
|
122
|
+
Custom categories can be added via `.filemayor.yml`.
|
|
123
|
+
|
|
124
|
+
## 🔒 Security
|
|
125
|
+
|
|
126
|
+
- **Path traversal protection** — blocks operations on system directories
|
|
127
|
+
- **System file guards** — won't touch OS-critical files
|
|
128
|
+
- **Rate limiting** — prevents runaway operations
|
|
129
|
+
- **Rollback journal** — every move is logged for safe undo
|
|
130
|
+
- **Content Security Policy** — hardened Electron with CSP headers
|
|
131
|
+
- **No remote code execution** — fully local, no external API calls
|
|
132
|
+
|
|
133
|
+
## 🏗 Architecture
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
filemayor/
|
|
137
|
+
├── cli/ # CLI + Core Engine
|
|
138
|
+
│ ├── index.js # CLI entry point (7 subcommands)
|
|
139
|
+
│ └── core/ # Platform-agnostic engine
|
|
140
|
+
│ ├── scanner.js # Recursive directory scanner
|
|
141
|
+
│ ├── organizer.js # File organization + rollback
|
|
142
|
+
│ ├── cleaner.js # Junk detection + deletion
|
|
143
|
+
│ ├── watcher.js # Real-time file watcher
|
|
144
|
+
│ ├── config.js # YAML config parser
|
|
145
|
+
│ ├── reporter.js # Multi-format output
|
|
146
|
+
│ ├── categories.js # Extension → category mapping
|
|
147
|
+
│ └── security.js # Path guards + sanitization
|
|
148
|
+
├── electron/ # Desktop app (Electron)
|
|
149
|
+
│ ├── main.js # Main process
|
|
150
|
+
│ └── preload.js # IPC bridge
|
|
151
|
+
├── src/ # React frontend
|
|
152
|
+
│ ├── App.tsx # Main app
|
|
153
|
+
│ ├── views/ # UI views
|
|
154
|
+
│ └── locales/ # i18n (10 languages)
|
|
155
|
+
└── public/ # Static assets + PWA
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## 🌍 Platforms
|
|
159
|
+
|
|
160
|
+
| Platform | Method |
|
|
161
|
+
|----------|--------|
|
|
162
|
+
| **Terminal** | `npm install -g filemayor` |
|
|
163
|
+
| **Windows** | Download from GitHub Releases |
|
|
164
|
+
| **macOS** | Download .dmg from Releases |
|
|
165
|
+
| **Linux** | AppImage or .deb from Releases |
|
|
166
|
+
| **Browser** | PWA at filemayor.app |
|
|
167
|
+
| **Servers** | `npm install -g filemayor` + cron/systemd |
|
|
168
|
+
|
|
169
|
+
## 🤝 Contributing
|
|
170
|
+
|
|
171
|
+
1. Fork the repository
|
|
172
|
+
2. Create a feature branch: `git checkout -b feature/amazing-feature`
|
|
173
|
+
3. Commit changes: `git commit -m 'Add amazing feature'`
|
|
174
|
+
4. Push: `git push origin feature/amazing-feature`
|
|
175
|
+
5. Open a Pull Request
|
|
176
|
+
|
|
177
|
+
## 📄 License
|
|
178
|
+
|
|
179
|
+
Proprietary License — see [LICENSE](LICENSE) for details.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
<div align="center">
|
|
184
|
+
<strong>Created by Lehlohonolo Goodwill Nchefu (Chevza)</strong>
|
|
185
|
+
<br>
|
|
186
|
+
<a href="https://github.com/Hrypopo">github.com/Hrypopo</a> · <a href="https://filemayor.app">filemayor.app</a>
|
|
187
|
+
</div>
|
|
188
|
+
]]>
|
package/core/reporter.js
CHANGED
package/index.js
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝
|
|
12
12
|
*
|
|
13
13
|
* Your Digital Life Organizer — CLI Edition
|
|
14
|
+
* Created by Lehlohonolo Goodwill Nchefu (Chevza)
|
|
14
15
|
* Works everywhere: terminals, servers, data centers, CI/CD
|
|
15
16
|
*
|
|
16
17
|
* ═══════════════════════════════════════════════════════════════════
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "filemayor",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Enterprise file management engine — scan, organize, clean, and watch your filesystem from any terminal",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"automation"
|
|
26
26
|
],
|
|
27
27
|
"author": {
|
|
28
|
-
"name": "
|
|
29
|
-
"url": "https://github.com/Hrypopo
|
|
28
|
+
"name": "Lehlohonolo Goodwill Nchefu (Chevza)",
|
|
29
|
+
"url": "https://github.com/Hrypopo"
|
|
30
30
|
},
|
|
31
31
|
"license": "PROPRIETARY",
|
|
32
32
|
"repository": {
|
|
@@ -48,8 +48,7 @@
|
|
|
48
48
|
"files": [
|
|
49
49
|
"index.js",
|
|
50
50
|
"core/",
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"../README.md"
|
|
51
|
+
"LICENSE",
|
|
52
|
+
"README.md"
|
|
54
53
|
]
|
|
55
54
|
}
|