mani-calc 1.1.0

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/README.md ADDED
@@ -0,0 +1,614 @@
1
+ <div align="center">
2
+
3
+ # 📊 Mani-Calc
4
+
5
+ **Spotlight for Windows** - Instant calculations from Windows Search
6
+
7
+ [![npm version](https://img.shields.io/npm/v/mani-calc.svg)](https://www.npmjs.com/package/mani-calc)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
+ [![Platform](https://img.shields.io/badge/platform-Windows-0078D6.svg)](https://www.microsoft.com/windows)
10
+ [![Node Version](https://img.shields.io/badge/node-%3E%3D14.0.0-brightgreen.svg)](https://nodejs.org)
11
+
12
+ <p>
13
+ <strong>Finally, Windows gets what macOS has had for years.</strong><br/>
14
+ Calculate expressions, convert units, and process natural language queries<br/>
15
+ directly from Windows Search - no app to open, no context switching.
16
+ </p>
17
+
18
+ [Quick Start](#-quick-start) â€Ē [Features](#-features) â€Ē [Examples](#-examples) â€Ē [Installation](#-installation) â€Ē [Usage](#-usage)
19
+
20
+ </div>
21
+
22
+ ---
23
+
24
+ ## ðŸŽŊ The Problem
25
+
26
+ macOS users can type `2+3*5` in Spotlight and instantly get `17`.
27
+
28
+ Windows users? They have to open Calculator, type the expression, copy the result, and switch back to what they were doing.
29
+
30
+ **Not anymore.**
31
+
32
+ ---
33
+
34
+ ## âœĻ The Solution
35
+
36
+ **Mani-Calc** turns your Windows Search into a powerful calculator. Type math expressions, conversions, or natural language queries and get instant results — just like macOS Spotlight, but for Windows.
37
+
38
+ ```bash
39
+ # Install once
40
+ npm install -g mani-calc
41
+ mani-calc install
42
+
43
+ # Use forever
44
+ # Type in Windows Search:
45
+ calc: 2 + 3 * 5 → 17 âœĻ
46
+ calc: 10 km to miles → 6.21 miles âœĻ
47
+ calc: what is 25% of 200 → 50 âœĻ
48
+ ```
49
+
50
+ Results appear instantly. Auto-copied to clipboard. Pure productivity.
51
+
52
+ ### ðŸŽĻ **NEW: Overlay Mode**
53
+
54
+ Now with a **beautiful floating search box** that appears anywhere with `Alt+Space`!
55
+
56
+ ```bash
57
+ # Start overlay mode
58
+ npm run overlay
59
+
60
+ # Press Alt+Space anywhere
61
+ # Type: 2 + 3 * 5 → Instant result!
62
+ # Type: sleep → Computer goes to sleep!
63
+ ```
64
+
65
+ **Features:**
66
+ - ⚡ Global hotkey (`Alt+Space`)
67
+ - ðŸŽĻ Glassmorphism design
68
+ - ðŸ’ŧ System commands (sleep, lock, shutdown, etc.)
69
+ - 🚀 Live preview
70
+ - 📋 Auto-copy results
71
+
72
+ **[Learn more about Overlay Mode →](OVERLAY_MODE.md)**
73
+
74
+ ---
75
+
76
+ ## 🚀 Quick Start
77
+
78
+ ### 1. Install the Package
79
+ ```bash
80
+ npm install -g mani-calc
81
+ ```
82
+
83
+ ### 2. Set Up Windows Search Integration
84
+ ```bash
85
+ mani-calc install
86
+ ```
87
+ > **Note:** You may need to run this as Administrator for full Windows Search integration.
88
+
89
+ ### 3. Start Using!
90
+
91
+ Open Windows Search (`Win + S`) and type:
92
+ ```
93
+ calc: 2 + 3 * 5
94
+ ```
95
+
96
+ **That's it!** The result appears instantly and is automatically copied to your clipboard.
97
+
98
+ ---
99
+
100
+ ## ðŸŽĻ Features
101
+
102
+ ### ðŸ§Ū Math Calculations
103
+ Perform any mathematical operation with full operator precedence:
104
+
105
+ ```bash
106
+ calc: 2 + 3 * 5 # 17
107
+ calc: (10 + 20) / 5 # 6
108
+ calc: sqrt(144) # 12
109
+ calc: 2^10 # 1024
110
+ calc: sin(pi/2) # 1
111
+ calc: log(100) # 2
112
+ calc: abs(-42) # 42
113
+ ```
114
+
115
+ **Supported:**
116
+ - Basic operators: `+`, `-`, `*`, `/`, `^` (power)
117
+ - Functions: `sqrt()`, `sin()`, `cos()`, `tan()`, `log()`, `ln()`, `abs()`, `ceil()`, `floor()`, `round()`
118
+ - Constants: `pi`, `e`
119
+ - Parentheses for grouping
120
+
121
+ ### 💎 Natural Language Processing
122
+ Ask questions in plain English:
123
+
124
+ ```bash
125
+ calc: what is 25 percent of 200 # 50
126
+ calc: 15% of 300 # 45
127
+ calc: half of 80 # 40
128
+ calc: quarter of 100 # 25
129
+ calc: square root of 64 # 8
130
+ calc: 10 squared # 100
131
+ calc: 5 cubed # 125
132
+ calc: 2 to the power of 8 # 256
133
+ ```
134
+
135
+ ### 🔄 Unit Conversions
136
+ Convert between units instantly:
137
+
138
+ #### Length
139
+ ```bash
140
+ calc: 10 km to miles # 6.21 miles
141
+ calc: 5 miles to km # 8.05 km
142
+ calc: 100 cm to inches # 39.37 inches
143
+ calc: 6 feet to meters # 1.83 meters
144
+ ```
145
+
146
+ #### Weight
147
+ ```bash
148
+ calc: 10 kg to pounds # 22.05 pounds
149
+ calc: 5 pounds to kg # 2.27 kg
150
+ calc: 1000 grams to kg # 1 kg
151
+ calc: 16 oz to pounds # 1 pound
152
+ ```
153
+
154
+ #### Temperature
155
+ ```bash
156
+ calc: 0 celsius to fahrenheit # 32 fahrenheit
157
+ calc: 100 celsius to fahrenheit # 212 fahrenheit
158
+ calc: 98.6 fahrenheit to celsius # 37 celsius
159
+ calc: 273.15 kelvin to celsius # 0 celsius
160
+ ```
161
+
162
+ #### Time
163
+ ```bash
164
+ calc: 2 hours to minutes # 120 minutes
165
+ calc: 120 seconds to minutes # 2 minutes
166
+ calc: 1 day to hours # 24 hours
167
+ calc: 365 days to hours # 8760 hours
168
+ ```
169
+
170
+ #### Volume
171
+ ```bash
172
+ calc: 5 liters to gallons # 1.32 gallons
173
+ calc: 1 gallon to liters # 3.79 liters
174
+ calc: 500 ml to liters # 0.5 liters
175
+ calc: 2 cups to ml # 473.18 ml
176
+ ```
177
+
178
+ #### Speed
179
+ ```bash
180
+ calc: 100 km/h to mph # 62.14 mph
181
+ calc: 60 mph to km/h # 96.56 km/h
182
+ calc: 10 m/s to km/h # 36 km/h
183
+ ```
184
+
185
+ ### 📋 Automatic Clipboard Integration
186
+ Every result is automatically copied to your clipboard. Just press `Ctrl+V` to paste it anywhere!
187
+
188
+ ### 📚 Calculation History
189
+ Keep track of your recent calculations:
190
+
191
+ ```bash
192
+ calc: history # View last 10 calculations
193
+ calc: clear history # Clear all history
194
+ ```
195
+
196
+ History is stored locally with timestamps, so you can always review past calculations.
197
+
198
+ ---
199
+
200
+ ## ðŸ“Ĩ Installation
201
+
202
+ ### Prerequisites
203
+ - **Node.js** >= 14.0.0 ([Download here](https://nodejs.org))
204
+ - **Windows** 10 or 11
205
+ - **npm** (comes with Node.js)
206
+
207
+ ### Install Globally
208
+ ```bash
209
+ npm install -g mani-calc
210
+ ```
211
+
212
+ ### Set Up Windows Search Integration
213
+ ```bash
214
+ mani-calc install
215
+ ```
216
+
217
+ This command:
218
+ - Registers the `calc:` protocol handler
219
+ - Creates a Windows Search connector
220
+ - Sets up registry entries for seamless integration
221
+
222
+ > **Tip:** If Windows Search integration doesn't work immediately, try:
223
+ > 1. Running `mani-calc install` as Administrator
224
+ > 2. Restarting Windows Explorer: `taskkill /f /im explorer.exe && start explorer.exe`
225
+ > 3. Logging out and back in
226
+
227
+ ---
228
+
229
+ ## 📖 Usage
230
+
231
+ Mani-Calc offers **four ways** to use it:
232
+
233
+ ### 1ïļâƒĢ Overlay Mode (NEW! ⭐)
234
+
235
+ The most powerful way - a floating search box with global hotkey:
236
+
237
+ ```bash
238
+ # Start overlay mode
239
+ npm run overlay
240
+
241
+ # Or after global install
242
+ mani-calc-overlay
243
+ ```
244
+
245
+ Then press **`Alt+Space`** anywhere in Windows to toggle the search box!
246
+
247
+ **Features:**
248
+ - Works from any application
249
+ - Beautiful glassmorphism UI
250
+ - Live preview as you type
251
+ - System commands (sleep, lock, shutdown, etc.)
252
+ - Auto-hide when you click outside
253
+
254
+ **Examples:**
255
+ ```
256
+ Alt+Space → "2 + 3 * 5" → Enter
257
+ Alt+Space → "10 km to miles" → Enter
258
+ Alt+Space → "sleep" → Enter (computer sleeps!)
259
+ Alt+Space → "lock" → Enter (computer locks!)
260
+ ```
261
+
262
+ **[Full Overlay Mode Documentation →](OVERLAY_MODE.md)**
263
+
264
+ ### 2ïļâƒĢ Windows Search
265
+
266
+ After installation, open Windows Search (`Win + S`) and type:
267
+
268
+ ```
269
+ calc: [your expression]
270
+ ```
271
+
272
+ **Examples:**
273
+ ```
274
+ calc: 2 + 3 * 5
275
+ calc: 10 km to miles
276
+ calc: what is 25 percent of 200
277
+ calc: sqrt(144)
278
+ calc: history
279
+ ```
280
+
281
+ ### 3ïļâƒĢ Command Line
282
+
283
+ Use directly from your terminal:
284
+
285
+ ```bash
286
+ # Basic calculation
287
+ mani-calc "2 + 3 * 5"
288
+
289
+ # Natural language
290
+ mani-calc "what is 25 percent of 200"
291
+
292
+ # Unit conversion
293
+ mani-calc "10 km to miles"
294
+
295
+ # View history
296
+ mani-calc history
297
+
298
+ # Get help
299
+ mani-calc --help
300
+
301
+ # Check version
302
+ mani-calc --version
303
+ ```
304
+
305
+ ### 4ïļâƒĢ Interactive Mode (REPL)
306
+
307
+ Start an interactive session:
308
+
309
+ ```bash
310
+ mani-calc
311
+ ```
312
+
313
+ Then type your calculations:
314
+
315
+ ```
316
+ calc> 2 + 3 * 5
317
+ ✓ 2 + 3 * 5 = 17
318
+ (Result copied to clipboard)
319
+
320
+ calc> 10 km to miles
321
+ ✓ 10 km = 6.21 miles
322
+ (Result copied to clipboard)
323
+
324
+ calc> what is 25 percent of 200
325
+ ✓ what is 25 percent of 200 = 50
326
+ (Result copied to clipboard)
327
+
328
+ calc> history
329
+ Recent Calculations:
330
+
331
+ 1. what is 25 percent of 200 = 50 (7:45 PM)
332
+ 2. 10 km = 6.21 miles (7:44 PM)
333
+ 3. 2 + 3 * 5 = 17 (7:43 PM)
334
+
335
+ calc> exit
336
+ 👋 Goodbye!
337
+ ```
338
+
339
+ **Interactive Mode Commands:**
340
+ - `exit` or `quit` - Exit interactive mode
341
+ - `clear` - Clear the screen
342
+ - `help` - Show help
343
+ - `history` - View calculation history
344
+ - Any calculation - Get instant result
345
+
346
+ ---
347
+
348
+ ## ðŸ’Ą Real-World Use Cases
349
+
350
+ ### 🛒 Shopping
351
+ ```bash
352
+ # Calculate discount
353
+ calc: what is 20 percent of 150 # 30 (discount amount)
354
+ calc: 150 - 30 # 120 (final price)
355
+
356
+ # Tax calculation
357
+ calc: what is 8.5 percent of 100 # 8.5 (tax amount)
358
+ ```
359
+
360
+ ### ðŸ‘Ļ‍ðŸģ Cooking
361
+ ```bash
362
+ calc: 2 cups to ml # 473.18 ml
363
+ calc: 350 fahrenheit to celsius # 176.67 celsius
364
+ calc: half of 250 # 125 (halving a recipe)
365
+ ```
366
+
367
+ ### ✈ïļ Travel
368
+ ```bash
369
+ calc: 500 km to miles # 310.69 miles
370
+ calc: 120 km/h to mph # 74.56 mph
371
+ calc: 10 kg to pounds # 22.05 pounds (luggage weight)
372
+ ```
373
+
374
+ ### 🏃 Fitness
375
+ ```bash
376
+ calc: 5 miles to km # 8.05 km (running distance)
377
+ calc: 150 pounds to kg # 68.04 kg (body weight)
378
+ ```
379
+
380
+ ### 🔎 Science & Engineering
381
+ ```bash
382
+ calc: 9.8 * 5 # 49 (acceleration * time)
383
+ calc: sqrt(2) * 10 # 14.14 (diagonal calculation)
384
+ calc: pi * 5^2 # 78.54 (circle area)
385
+ ```
386
+
387
+ ### 💞 Finance
388
+ ```bash
389
+ calc: what is 15 percent of 50000 # 7500 (interest calculation)
390
+ calc: 50000 + 7500 # 57500 (total with interest)
391
+ ```
392
+
393
+ ---
394
+
395
+ ## ðŸŽŊ Advanced Features
396
+
397
+ ### Variables & Memory (Interactive Mode)
398
+ Store values for reuse during your session:
399
+
400
+ ```bash
401
+ calc> x = 100
402
+ ✓ x = 100
403
+
404
+ calc> x * 2
405
+ ✓ 200
406
+
407
+ calc> x / 4
408
+ ✓ 25
409
+
410
+ calc> y = x + 50
411
+ ✓ y = 150
412
+
413
+ calc> y * 2
414
+ ✓ 300
415
+ ```
416
+
417
+ ### Complex Expressions
418
+ Chain multiple operations:
419
+
420
+ ```bash
421
+ calc: ((10 + 5) * 3 - 20) / 5 # 5
422
+ calc: sqrt(16) + sqrt(9) # 7
423
+ calc: 2^3 + 3^2 # 17
424
+ calc: sin(pi/4) + cos(pi/4) # 1.41
425
+ ```
426
+
427
+ ### Flexible Syntax
428
+ Units are case-insensitive and flexible:
429
+
430
+ ```bash
431
+ calc: 10 KM to MILES # Works!
432
+ calc: 10 Km to Miles # Works!
433
+ calc: 10 kilometers to miles # Works!
434
+ calc: 10 kilometer to mile # Works!
435
+ ```
436
+
437
+ ---
438
+
439
+ ## 🔧 Commands Reference
440
+
441
+ | Command | Description |
442
+ |---------|-------------|
443
+ | `mani-calc install` | Install Windows Search integration |
444
+ | `mani-calc uninstall` | Remove Windows Search integration |
445
+ | `mani-calc "[expression]"` | Calculate expression directly |
446
+ | `mani-calc` | Start interactive REPL mode |
447
+ | `mani-calc history` | View calculation history |
448
+ | `mani-calc --help` | Show help information |
449
+ | `mani-calc --version` | Show version number |
450
+
451
+ ---
452
+
453
+ ## 🔐 Privacy & Performance
454
+
455
+ ### Privacy First
456
+ - ✅ **100% Offline** - No internet connection required
457
+ - ✅ **No Tracking** - Zero data collection or analytics
458
+ - ✅ **No Telemetry** - Your calculations stay on your machine
459
+ - ✅ **Local Storage** - History stored locally in your AppData folder
460
+
461
+ ### Lightning Fast
462
+ - ⚡ **< 100ms Response Time** - Instant results
463
+ - ðŸŠķ **Lightweight** - Minimal memory footprint
464
+ - 🚀 **No Lag** - Smooth, responsive experience
465
+ - ðŸ’ū **Efficient** - Optimized for performance
466
+
467
+ ---
468
+
469
+ ## 🛠ïļ Troubleshooting
470
+
471
+ ### Windows Search Integration Not Working?
472
+
473
+ **Solution 1: Run as Administrator**
474
+ ```bash
475
+ # Right-click Command Prompt/PowerShell → "Run as Administrator"
476
+ mani-calc install
477
+ ```
478
+
479
+ **Solution 2: Restart Windows Explorer**
480
+ ```bash
481
+ taskkill /f /im explorer.exe && start explorer.exe
482
+ ```
483
+
484
+ **Solution 3: Log Out and Back In**
485
+ Sometimes Windows needs a fresh session to recognize the protocol handler.
486
+
487
+ ### Results Not Copying to Clipboard?
488
+
489
+ Make sure no other application is blocking clipboard access. Close any clipboard managers temporarily.
490
+
491
+ ### Command Not Found?
492
+
493
+ Make sure npm's global bin directory is in your PATH:
494
+ ```bash
495
+ npm config get prefix
496
+ ```
497
+
498
+ Add the output path + `\node_modules\.bin` to your system PATH.
499
+
500
+ ### Need More Help?
501
+
502
+ - 📖 Check [EXAMPLES.md](EXAMPLES.md) for more usage examples
503
+ - 🏗ïļ Read [ARCHITECTURE.md](ARCHITECTURE.md) for technical details
504
+ - 🐛 [Report an issue](https://github.com/Maniredii/mani-calc/issues) on GitHub
505
+ - 💎 Start a [discussion](https://github.com/Maniredii/mani-calc/discussions)
506
+
507
+ ---
508
+
509
+ ## 📚 Documentation
510
+
511
+ - **[OVERLAY_MODE.md](OVERLAY_MODE.md)** - ⭐ NEW: Floating search box guide
512
+ - **[QUICKSTART.md](QUICKSTART.md)** - Get started in 2 minutes
513
+ - **[EXAMPLES.md](EXAMPLES.md)** - Comprehensive usage examples
514
+ - **[ARCHITECTURE.md](ARCHITECTURE.md)** - Technical architecture details
515
+ - **[CONTRIBUTING.md](CONTRIBUTING.md)** - How to contribute
516
+ - **[CHANGELOG.md](CHANGELOG.md)** - Version history
517
+
518
+ ---
519
+
520
+ ## 🗚ïļ Roadmap
521
+
522
+ ### Phase 2 - Productivity Features (v1.1.0)
523
+ - [ ] Live preview while typing in Windows Search
524
+ - [ ] Persistent variables across sessions
525
+ - [ ] Date & time calculations (`today + 15 days`, `days between dates`)
526
+ - [ ] Enhanced error messages with suggestions
527
+
528
+ ### Phase 3 - Advanced Features (v1.2.0)
529
+ - [ ] Graph plotting (`plot y = x^2`)
530
+ - [ ] Step-by-step solutions for equations
531
+ - [ ] Developer mode (hex, binary, base64 conversions)
532
+ - [ ] Scientific notation support
533
+
534
+ ### Phase 4 - Ecosystem (v2.0.0)
535
+ - [ ] Plugin system for extensions
536
+ - [ ] Custom user-defined commands
537
+ - [ ] Voice input support
538
+ - [ ] PowerToys Run integration
539
+ - [ ] Sync history across devices (optional)
540
+
541
+ ---
542
+
543
+ ## ðŸĪ Contributing
544
+
545
+ Contributions are welcome! Whether it's:
546
+
547
+ - 🐛 Bug reports
548
+ - ðŸ’Ą Feature requests
549
+ - 📖 Documentation improvements
550
+ - 🔧 Code contributions
551
+
552
+ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
553
+
554
+ ### Development Setup
555
+
556
+ ```bash
557
+ # Clone the repository
558
+ git clone https://github.com/Maniredii/mani-calc.git
559
+ cd mani-calc
560
+
561
+ # Install dependencies
562
+ npm install
563
+
564
+ # Run tests
565
+ npm test
566
+
567
+ # Test locally
568
+ node bin/cli.js "2 + 3 * 5"
569
+ ```
570
+
571
+ ---
572
+
573
+ ## 📄 License
574
+
575
+ MIT ÂĐ [Mani Reddy](https://github.com/Maniredii)
576
+
577
+ See [LICENSE](LICENSE) for details.
578
+
579
+ ---
580
+
581
+ ## 💖 Acknowledgments
582
+
583
+ Inspired by macOS Spotlight's calculator feature. Built to bring the same productivity boost to Windows users worldwide.
584
+
585
+ ---
586
+
587
+ ## 🌟 Show Your Support
588
+
589
+ If Mani-Calc saves you time and improves your productivity:
590
+
591
+ - ⭐ **Star this repository** on GitHub
592
+ - ðŸĶ **Share it** on social media
593
+ - 📝 **Write a review** or blog post
594
+ - ðŸĪ **Contribute** to the project
595
+
596
+ ---
597
+
598
+ ## 📞 Connect
599
+
600
+ - **GitHub**: [@Maniredii](https://github.com/Maniredii)
601
+ - **Issues**: [Report a bug](https://github.com/Maniredii/mani-calc/issues)
602
+ - **Discussions**: [Ask questions](https://github.com/Maniredii/mani-calc/discussions)
603
+
604
+ ---
605
+
606
+ <div align="center">
607
+
608
+ **Made with âĪïļ for Windows productivity enthusiasts**
609
+
610
+ *Let's change how people calculate on Windows!*
611
+
612
+ [⮆ Back to Top](#-mani-calc)
613
+
614
+ </div>