diff options
| author | gigagamerchaddhruv-spec <gigagamerchaddhruv-spec@users.noreply.github.com> | 2026-10-14 20:18:20 +0530 |
|---|---|---|
| committer | gigagamerchaddhruv-spec <gigagamerchaddhruv-spec@users.noreply.github.com> | 2026-10-14 20:18:20 +0530 |
| commit | aceca8b5dfc8edd378ee9ff891bccb0f94c69f31 (patch) | |
| tree | 08401ce8d050afbbe77514f479601a8e9535f4ec /README.md | |
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 358 |
1 files changed, 358 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..65874ca --- /dev/null +++ b/README.md @@ -0,0 +1,358 @@ +<div align="center"> + +<img src="Resources/AppIcon.png" alt="Bubomb App Icon" width="140" height="140" style="border-radius: 28px; box-shadow: 0 10px 30px rgba(255, 107, 0, 0.35);" /> + +# π£ BUBOMB + +### **Configure the boom.** + +*A native, ultra-minimal macOS menu bar utility designed for instant, zero-latency detonation of your most critical action.* + +<br/> + +[](https://apple.com) +[](https://swift.org) +[](https://github.com/gigagamerchaddhruv-spec/bubomb) +[-7A5AF8?style=for-the-badge)](https://github.com/gigagamerchaddhruv-spec/bubomb) +[](LICENSE) + +<br/> + +> **"One bomb. One configured action. One click. BOOM."** + +<br/> + +[Key Highlights](#-why-bubomb) β’ +[Menu Bar Experience](#-menu-bar-experience) β’ +[Architecture](#-system-architecture) β’ +[Payload Engines](#-supported-payloads) β’ +[Quick Recipes](#-battle-tested-recipes) β’ +[Installation & Build](#-build--quickstart) + +<br/> + +--- + +</div> + +<br/> + +## β‘ The Philosophy + +Most automation tools on macOS have become bloated command centers. You trigger a hotkey, wait for a spotlight modal to render, type a search query, select an item from a list, press Enter, and wait. + +**Bubomb cuts through the noise.** + +You configure what matters **once**. When that moment comesβdeploying code, launching a deep-work stack, blowing away docker caches, or firing a build pipelineβyou simply click the tiny bomb resting quietly in your menu bar. + +**Zero searching. Zero modals. Immediate detonation.** + +<br/> + +``` + Traditional Menu Bar Tools Bubomb + βββββββββββββββββββββββββββββ βββββββββββββββββββββββββββ + β 1. Click menu item β β 1. Click the bomb. β + β 2. Scroll through 15 itemsβ vs β β + β 3. Open sub-menu β β π₯ BOOM. Done. β + β 4. Confirm dialog β βββββββββββββββββββββββββββ + β 5. Wait for output... β + βββββββββββββββββββββββββββββ +``` + +<br/> + +--- + +## β¨ Why Bubomb? + +| Feature | What You Get | +| :--- | :--- | +| π― **Instant Detonation** | Left-click detonates directly with **0ms interaction delay**. No intermediate dropdowns. | +| π **True macOS Native** | Built in **Swift 6**, **SwiftUI**, and **AppKit** (`NSStatusItem`). 100% Cocoa. | +| πͺΆ **Featherweight** | Tiny memory footprint (~18MB RAM), 0% idle CPU, no Electron or web wrappers. | +| π¨ **Dynamic Vector Bomb** | Silhouette adapts natively to Light and Dark macOS menu bars. Dynamic burning fuse sparks and explosion burst animations. | +| π‘οΈ **Subprocess Armor** | Pipe deadlock protection, asynchronous stream drains, supervisor timeouts, and SIGKILL safety nets. | +| β οΈ **Destructive Guard** | Automated heuristic scanning guards against catastrophic patterns (`rm -rf /`, `dd`, fork bombs). | +| π **100% Offline & Sovereign** | No servers, no telemetry, no cloud keys. All logs and scripts stay on your Mac. | + +<br/> + +--- + +## π₯ Menu Bar Experience + +Bubomb lives as an unobtrusive status accessory (`LSUIElement = true`), leaving your Dock clean. + +```mermaid +flowchart TD + Click([User Clicks Menu Bar Bomb]) --> Check{Is Payload Armed?} + + Check -- No --> Settings[Open Bubomb Settings Window] + Check -- Yes --> Detonate[Detonate Configured Action] + + Detonate --> Ignite[Ignite Fuse Animation] + Ignite --> Exec[Execute Async in Background] + Exec --> Result{Execution Success?} + + Result -- Yes --> Boom[π₯ Starburst BOOM & Audio Chime] + Result -- No --> Fail[β Red Alert Indicator & Log Failure] + + Boom --> Idle[Return to Armed Idle] + Fail --> Idle +``` + +### Direct Clicks vs. Power Menu + +* **Normal Left-Click:** Detonates the configured payload immediately. If no payload is armed, opens the Settings window. +* **Right-Click / Control-Click:** Unfurls the utility power menu: + * π£ `Bubomb β Configure the boom` + * π₯ `Detonate Payload (Return)` + * βοΈ `Settings... (Cmd+,)` + * βΉοΈ `Cancel Running Task (during execution)` + * πͺ `Quit Bubomb (Cmd+Q)` + +<br/> + +--- + +## π¨ Iconography & Animation Engine + +Bubomb features original vector artwork designed for crisp rendering at 18Γ18pt menu bar dimensions: + +* **Idle (Template):** Minimalist monochrome bomb silhouette matching your system accents. +* **Detonating (Burning):** High-speed animated fuse ignition with warm orange (`#FF6B00`) and amber (`#FFAA00`) sparks flickering at 120ms intervals. +* **Completion (Success):** Tasteful 8-ray starburst explosion animation, accompanied by a subtle completion sound. +* **Completion (Failure):** Subtle warning badge indicating a non-zero exit status or timeout. +* **Accessibility:** Fully honors macOS `Reduce Motion` preference (`accessibilityDisplayShouldReduceMotion`). + +<br/> + +--- + +## π§© Supported Payloads + +Bubomb includes five typed, extensible payload engines: + +### 1. π» Shell Command +Direct binary execution or explicit shell invocation (`/bin/zsh`, `/bin/bash`, `/bin/sh`). +- Working directory selection with directory picker. +- Parameterized arguments array. +- Custom environment variable key-value table. +- Configurable execution timeouts (5s to 120s or infinite). + +### 2. π Open Application +Instant native app launching via `NSWorkspace`. +- Pick applications from `/Applications` with macOS file panel. +- Pass custom launch arguments to binaries. + +### 3. π Open Web Destination +Opens validated HTTP and HTTPS destinations in your default macOS browser. +- Live URL scheme and host validator. + +### 4. π Run Local Script +Execute scripts (`.sh`, `.py`, `.rb`, `.zsh`, `.pl`) safely. +- Automatic shebang detection (`#!/usr/bin/env python3`). +- Automatic interpreter resolution without silently mutating file permissions. + +### 5. βοΈ Multi-Step Sequence +Chain multiple diverse actions in deterministic order. +- Reorder steps with drag / arrows. +- Live progress reporting (`Step 2 of 4: Running Build...`). +- Configurable failure policy: `stopOnError` or `continueOnError`. + +<br/> + +--- + +## π System Architecture + +Bubomb is structured as a decoupled Swift package: + +```mermaid +graph LR + subgraph UI ["BubombUI (SwiftUI + AppKit)"] + MB["MenuBarController"] + BV["BombIconRenderer"] + SV["SettingsView"] + WM["WindowManager"] + end + + subgraph Core ["BubombCore (Foundation + Swift Concurrency)"] + PE["PayloadExecutor (@MainActor)"] + PR["ProcessRunner (TaskGroup Pipes)"] + SP["SafetyPolicy (Heuristic Engine)"] + SS["SettingsStore (UserDefaults + JSON)"] + end + + MB -->|Click| PE + PE -->|Evaluate| SP + PE -->|Run| PR + PE -->|Persist| SS + PE -.->|State Broadcast| MB + PE -.->|Logs & History| SV +``` + +### Concurrency & Deadlock Elimination +Many macOS apps freeze when subprocesses output large streams because Foundation's `Pipe` buffer (64 KB) fills up before exit. Bubomb uses concurrent non-blocking `readabilityHandler` streams and modern Swift `TaskGroup` routines to drain output buffers in real time, guaranteeing zero UI stalls. + +<br/> + +--- + +## π³ Battle-Tested Recipes + +Here are a few popular payloads Bubomb users keep armed: + +### Recipe 1: The "Emergency Production Reset" +```bash +# Type: Shell Command +docker compose down -v && docker compose up -d --build +``` + +### Recipe 2: The "Deep Work Workspace" +``` +Type: Multi-step Sequence +1. Open App: /Applications/Visual Studio Code.app +2. Open App: /System/Applications/Utilities/Terminal.app +3. Open URL: https://linear.app/my-team/inbox +4. Shell Command: cd ~/code/core && git pull --rebase +``` + +### Recipe 3: The "Flush All macOS Caches" +```bash +# Type: Shell Command +dscacheutil -flushcache && sudo killall -HUP mDNSResponder +``` + +<br/> + +--- + +## π§ͺ Comprehensive Test Suite + +Bubomb includes 29 automated tests verifying every aspect of validation, safety heuristics, process supervision, timeouts, and sequential execution. + +```bash +make test +``` + +``` +π£ Running Bubomb Test Suite... + +β’ PayloadValidationTests + β testEmptyPayloadNameThrows (0.000s) + β testEmptyCommandThrows (0.000s) + β testValidShellCommandPasses (0.000s) + β testNonExistentShellThrows (0.000s) + β testNonExistentWorkingDirectoryThrows (0.000s) + β testInvalidURLThrows (0.000s) + β testValidURLPasses (0.000s) + β testNonExistentScriptThrows (0.000s) + β testEmptySequenceThrows (0.000s) + +β’ SettingsStoreTests + β testInitialSettings (0.004s) + β testSaveAndRetrieveActivePayload (0.004s) + β testExecutionHistoryCap (0.041s) + β testClearHistory (0.005s) + β testResetToDefaults (0.004s) + +β’ ProcessRunnerTests + β testSuccessfulCommandExecution (0.068s) + β testShellCommandExecutorWithArguments (0.073s) + β testNonZeroExitStatusThrows (0.067s) + β testEnvironmentVariablesPassedToProcess (0.083s) + β testWorkingDirectory (0.068s) + β testProcessTimeout (0.346s) + β testProcessCancellation (0.135s) + +β’ URLLauncherTests + β testValidURLs (0.000s) + β testInvalidURLs (0.000s) + +β’ SafetyPolicyTests + β testDestructiveCommandsDetected (0.005s) + β testSuspiciousCommandsDetected (0.001s) + β testSafeCommandsPass (0.003s) + +β’ SequenceExecutorTests + β testSuccessfulSequentialExecution (0.141s) + β testSequenceStopsOnErrorWhenConfigured (0.065s) + β testSequenceContinuesOnErrorWhenConfigured (0.073s) + +-------------------------------------------------- +π₯ All 29 tests passed in 1.19s! BOOM! +``` + +<br/> + +--- + +## π Build & Quickstart + +### Prerequisites +* macOS 14.0 (Sonoma) or newer. +* Xcode Command Line Tools or full Xcode. + +### 1. Build and Run +```bash +git clone git@github.com:gigagamerchaddhruv-spec/bubomb.git +cd bubomb + +# Build and assemble Bubomb.app release bundle +make app + +# Launch in your menu bar +make run +``` + +### 2. Available Make Targets +```bash +make build # Compile debug build via SwiftPM +make test # Run all 29 automated test cases +make app # Package and ad-hoc sign Bubomb.app +make run # Launch Bubomb.app +make clean # Remove build artifacts +``` + +<br/> + +--- + +## β¨οΈ Keyboard Shortcuts + +| Shortcut | Action | +| :--- | :--- | +| `Cmd + S` | Save active payload configuration | +| `Cmd + Return` | Test / detonate payload from settings | +| `Cmd + 1` | Switch to **Payload** tab | +| `Cmd + 2` | Switch to **Execution Log** tab | +| `Cmd + 3` | Switch to **General** tab | +| `Cmd + W` | Close Settings window (Bubomb stays armed in menu bar) | +| `Cmd + Q` | Quit Bubomb completely | + +<br/> + +--- + +## π Security & Privacy Policy + +* **No Privileged Escalation:** Bubomb never invokes `sudo` or requests root privileges automatically. +* **No Telemetry:** Bubomb contains zero analytics, tracking beacons, or remote logging. +* **Integrity Guard:** Evaluates shell payloads for destructive triggers (`rm -rf ~`, formatting drives) and requires deliberate user override before detonation. +* **Gatekeeper Friendly:** Ad-hoc signed out-of-the-box, fully compatible with Apple Silicon and modern macOS runtime protections. + +<br/> + +--- + +<div align="center"> + +**Bubomb** is crafted with β€οΈ for developers who love speed, simplicity, and clean macOS design. + +*"Configure the boom. Click the bomb. Get the result."* + +[β Star on GitHub](https://github.com/gigagamerchaddhruv-spec/bubomb) β’ [Report Issue](https://github.com/gigagamerchaddhruv-spec/bubomb/issues) + +</div> |
