HomeFrontCommand 3.5.0

dotnet add package HomeFrontCommand --version 3.5.0
                    
NuGet\Install-Package HomeFrontCommand -Version 3.5.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HomeFrontCommand" Version="3.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HomeFrontCommand" Version="3.5.0" />
                    
Directory.Packages.props
<PackageReference Include="HomeFrontCommand" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add HomeFrontCommand --version 3.5.0
                    
#r "nuget: HomeFrontCommand, 3.5.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=HomeFrontCommand&version=3.5.0
                    
Install as a Cake Addin
#tool nuget:?package=HomeFrontCommand&version=3.5.0
                    
Install as a Cake Tool

HomeFrontCommandLibrary

📡 A C# library for retrieving alerts from Israel's Home Front Command (פיקוד העורף) Provides access to real-time rocket/siren alerts and alert history, with multi-language support and city names.


📦 Installation

Via NuGet:

dotnet add package HomeFrontCommand

Or clone this repository and reference the project directly.


✅ Features

  • Get the current active alert
  • Fetch historical alert data
  • Automatically translated alert categories and cities names (Hebrew, Russian, English, Arabic)
  • Resolve city names by alert
  • In-memory caching support for optimal performance

🚀 Quick Start

using HomeFrontCommandLibrary;
using HomeFrontCommandLibrary.Enums;

class Program
{
    static async Task Main()
    {
        var command = new HomeFrontCommand(Language.Russian);

        var activeAlert = await command.GetActiveAlert();
        Console.WriteLine($"Alert category: {activeAlert.Category.Title}");
        Console.WriteLine("Cities:");
        foreach (var city in activeAlert.Cities)
            Console.WriteLine($" - {city.Name}");

        var history = await command.GetAlertsHistory();
        Console.WriteLine($"Last alert was on: {history.First().AlertDate}");
    }
}

🧩 Models

Alert

public class Alert
{
    public Category Category { get; set; }
    public List<City> Cities { get; set; }
    public DateTime AlertDate { get; set; }
}

AlertHistory

public class AlertHistory
{
    public Category Category { get; set; }
    public City City { get; set; }
    public DateTime AlertDate { get; set; }
}

Category

public class Category
{
    public int Id { get; set; }
    public int MatrixId { get; set; }
    public string Title { get; set; } = string.Empty;
    public string Description { get; set; } = string.Empty;
}

City

public class City
{
    public int AreaId { get; set; }
    public string Name { get; set; } = string.Empty;
    public string AreaName { get; set; } = string.Empty;
    public int ProtectionTime { get; set; }
}

🌐 Supported Languages

Language Enum Value
Hebrew Language.Hebrew
Russian Language.Russian
English Language.English
Arabic Language.Arabic

🧠 Dependencies


🛠 Roadmap

  • Dependency Injection support
  • Unit test coverage
  • Redis or external cache support
  • Additional data endpoints

📄 License

MIT © Rafael Chasman

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.5.0 123 6/24/2025
3.0.0 130 6/23/2025
2.5.0 131 6/22/2025
2.0.0 132 6/18/2025
1.0.0 136 6/15/2025