HomeFrontCommand 4.0.0

dotnet add package HomeFrontCommand --version 4.0.0
                    
NuGet\Install-Package HomeFrontCommand -Version 4.0.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="4.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HomeFrontCommand" Version="4.0.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 4.0.0
                    
#r "nuget: HomeFrontCommand, 4.0.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.
#:package HomeFrontCommand@4.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=HomeFrontCommand&version=4.0.0
                    
Install as a Cake Addin
#tool nuget:?package=HomeFrontCommand&version=4.0.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 for city and category 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
  • All responses include all languages (Hebrew, Russian, English, Arabic) � no need to specify language
  • Get all cached cities with GetAllCities()
  • In-memory caching support for optimal performance

?? Quick Start

using HomeFrontCommandLibrary;

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

        // Get current active alert
        var activeAlert = await command.GetActiveAlert();
        if (activeAlert.Category != null)
        {
            // Access category in any language
            Console.WriteLine($"Alert (Hebrew): {activeAlert.Category.Title.Hebrew}");
            Console.WriteLine($"Alert (Russian): {activeAlert.Category.Title.Russian}");
            Console.WriteLine($"Alert (English): {activeAlert.Category.Title.English}");

            // Access cities in any language
            foreach (var city in activeAlert.Cities!)
            {
                Console.WriteLine($" - {city.Name.Hebrew} / {city.Name.English}");
            }
        }

        // Get alert history
        var history = await command.GetAlertsHistory();
        foreach (var alert in history.Take(5))
        {
            Console.WriteLine($"{alert.AlertDate}: {alert.City.Name.Hebrew} - {alert.Category.Title.Russian}");
        }

        // Get all cached cities
        var allCities = command.GetAllCities();
        Console.WriteLine($"Total cities: {allCities.Count}");
    }
}

?? Models

Alert

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

AlertHistory

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

Category

public class Category
{
    public int Id { get; set; }
    public int MatrixId { get; set; }
    public required CategoryTitle Title { get; set; }
    public required CategoryDescription Description { get; set; }
}

public class CategoryTitle
{
    public string Hebrew { get; set; } = string.Empty;
    public string English { get; set; } = string.Empty;
    public string Russian { get; set; } = string.Empty;
    public string Arabic { get; set; } = string.Empty;
}

public class CategoryDescription
{
    public string Hebrew { get; set; } = string.Empty;
    public string English { get; set; } = string.Empty;
    public string Russian { get; set; } = string.Empty;
    public string Arabic { get; set; } = string.Empty;
}

City

public class City
{
    public int Id { get; set; }
    public int AreaId { get; set; }
    public required CityName Name { get; set; }
    public required ReshutName Reshut { get; set; }
    public string AreaName { get; set; } = string.Empty;
    public int ProtectionTime { get; set; }
}

public class CityName
{
    public string Hebrew { get; set; } = string.Empty;
    public string English { get; set; } = string.Empty;
    public string Russian { get; set; } = string.Empty;
    public string Arabic { get; set; } = string.Empty;
}

public class ReshutName
{
    public string Hebrew { get; set; } = string.Empty;
    public string English { get; set; } = string.Empty;
    public string Russian { get; set; } = string.Empty;
    public string Arabic { get; set; } = string.Empty;
}

?? Multi-Language Support

All responses automatically include translations in all supported languages:

Language Property Access
Hebrew .Hebrew
Russian .Russian
English .English
Arabic .Arabic

Example:

var city = await command.GetCityByName("?? ????");
Console.WriteLine(city.Name.Hebrew);   // ?? ????
Console.WriteLine(city.Name.English);  // Tel Aviv
Console.WriteLine(city.Name.Russian);  // ????-????
Console.WriteLine(city.Name.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
4.0.0 84 3/8/2026
3.5.0 227 6/24/2025
3.0.0 198 6/23/2025
2.5.0 202 6/22/2025
2.0.0 211 6/18/2025
1.0.0 220 6/15/2025