How ibnuh/flow.launcher.plugin.ipdetails works
Project Type and Purpose
• This is a single‐plugin C#/.NET application that extends the Flow Launcher host. Its purpose is to fetch and display public IP details (either current or a specified IPv4), using external IP lookup services with a 24‐hour disk cache and optional API key support.
File Structure
• Top‐Level Artifacts
• Flow.Launcher.Plugin.IPDetails.sln – Visual Studio solution
• Flow.Launcher.Plugin.IPDetails/ – main plugin folder
• .github/workflows/release.yml & release.ps1 – CI/CD and release script
• README.md, LICENSE, screenshots/
• Plugin Folder Breakdown
• Main.cs – plugin entry point implementing Flow Launcher’s IPlugin interface
• IpApiResponse.cs – data model for JSON responses
• Converter/IsVpnConverter.cs – value‐converter for UI (e.g., flagging VPN)
• Settings/Settings.cs & SettingsControl.xaml(.cs) – settings model + WPF control (MVVM pattern)
• plugin.json – metadata for Flow Launcher to load the plugin
Extract README Insights
• Integrates with two external services: ipv4.icanhazip.com (for current IP) and ipapi.is (for detailed info, optional API key)
• Caches requests for 24h in plugin directory to reduce API calls and improve performance
• Uses PowerShell script (release.ps1) to build, stop the host, deploy, restart
Main Components & Interactions (to include
a. Flow Launcher Host
• Loads plugin via plugin.json
• Sends user queries (“ip”, “ip <address>”)
b. IPDetails Plugin Core
• Main.cs: registers query/action handlers
• Settings module: reads/writes API key and cache path
• Converter module: transforms raw data to UI‐friendly display
c. Networking Layer
• HTTP Client calls to ipv4.icanhazip.com and ipapi.is
• Retries or error handling (implicit)
d. Caching Layer
• Disk cache (JSON files) in plugin directory
• Cache invalidation after 24h
e. Settings UI
• WPF/XAML control for API key input
• Bound to Settings.cs via MVVM
f. External Services
• ipv4.icanhazip.com (public IP endpoint)
• api.ipapi.is (detail endpoint, requires key for higher quota)
Architectural Patterns & Design Principles
• Plugin Architecture: decouples host and extension by well‐defined interfaces (IPlugin)
• MVVM for settings: separate view (XAML) and view‐model (Settings.cs)
• Caching Strategy: local persistent cache to minimize external calls
• Single‐responsibility: separate classes for conversion, settings, data modeling