{"id":31679209,"url":"https://github.com/kestrun/kestrun","last_synced_at":"2026-02-06T23:09:08.398Z","repository":{"id":304102706,"uuid":"1017669339","full_name":"Kestrun/Kestrun","owner":"Kestrun","description":"PowerShell brains. Kestrel speed.","archived":false,"fork":false,"pushed_at":"2025-10-03T18:19:40.000Z","size":38766,"stargazers_count":6,"open_issues_count":9,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-03T18:22:59.923Z","etag":null,"topics":["automation","cross-platform","csharp","dotnet-core","kestrel","kestrun","nuget","powershell","psgallery","razor-pages","scripting","server-framework","vb-net","web-framework"],"latest_commit_sha":null,"homepage":"https://www.kestrun.dev","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kestrun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-10T23:01:22.000Z","updated_at":"2025-10-03T17:12:54.000Z","dependencies_parsed_at":"2025-07-11T08:44:16.552Z","dependency_job_id":"443f0c6e-6f22-4eaa-8c2a-68580c25145f","html_url":"https://github.com/Kestrun/Kestrun","commit_stats":null,"previous_names":["mdaneri/kestrun","kestrun/kestrun"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Kestrun/Kestrun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kestrun%2FKestrun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kestrun%2FKestrun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kestrun%2FKestrun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kestrun%2FKestrun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kestrun","download_url":"https://codeload.github.com/Kestrun/Kestrun/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kestrun%2FKestrun/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278903011,"owners_count":26065786,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","cross-platform","csharp","dotnet-core","kestrel","kestrun","nuget","powershell","psgallery","razor-pages","scripting","server-framework","vb-net","web-framework"],"created_at":"2025-10-08T06:46:04.941Z","updated_at":"2026-02-06T23:09:08.384Z","avatar_url":"https://github.com/Kestrun.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable-file MD041 --\u003e\n```text\n██╗  ██╗███████╗███████╗████████╗██████╗ ██╗   ██╗███╗   ██╗\n██║ ██╔╝██╔════╝██╔════╝╚══██╔══╝██╔══██╗██║   ██║████╗  ██║\n█████╔╝ █████╗  ███████╗   ██║   ██████╔╝██║   ██║██╔██╗ ██║\n██╔═██╗ ██╔══╝  ╚════██║   ██║   ██╔██╗  ██║   ██║██║╚██╗██║\n██║  ██╗███████╗███████║   ██║   ██║ ██╗ ╚██████╔╝██║ ╚████║\n╚═╝  ╚═╝╚══════╝╚══════╝   ╚═╝   ╚═╝ ╚═╝  ╚═════╝ ╚═╝  ╚═══╝\nKestrun — PowerShell brains. Kestrel speed.\n```\n\n---\n\u003c!-- CI / Quality --\u003e\n[![CI](https://github.com/Kestrun/Kestrun/actions/workflows/ci-main.yml/badge.svg)](https://github.com/Kestrun/Kestrun/actions/workflows/ci-main.yml)\n[![CodeQL](https://github.com/kestrun/kestrun/actions/workflows/codeql.yml/badge.svg)](https://github.com/kestrun/kestrun/actions/workflows/codeql.yml)\n[![ClamAV Scan](https://img.shields.io/github/actions/workflow/status/kestrun/kestrun/clam-av-main.yml?branch=main\u0026label=ClamAV%20Scan)](https://github.com/kestrun/kestrun/actions/workflows/clam-av-main.yml)\n\n\u003c!-- Coverage --\u003e\n[![CodeFactor](https://www.codefactor.io/repository/github/kestrun/kestrun/badge/main)](https://www.codefactor.io/repository/github/kestrun/kestrun/overview/main)\n[![Coveralls Badge](https://coveralls.io/repos/github/Kestrun/Kestrun/badge.svg?branch=main)](https://coveralls.io/github/Kestrun/Kestrun?branch=main)\n[![Coverage Status](https://coverage.kestrun.dev/badge_combined.svg)](https://coverage.kestrun.dev)\n\n\u003c!-- Platforms --\u003e\n[![Linux](https://img.shields.io/badge/Linux-Supported-success?logo=linux)](https://github.com/Kestrun/Kestrun/actions)\n[![macOS](https://img.shields.io/badge/macOS-Supported-success?logo=apple)](https://github.com/Kestrun/Kestrun/actions)\n[![Windows](https://img.shields.io/badge/Windows-Supported-success?logo=windows)](https://github.com/Kestrun/Kestrun/actions)\n\n[![x64](https://img.shields.io/badge/x64-Supported-success?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHJlY3QgeD0iNiIgeT0iNiIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEyIiByeD0iMiIgZmlsbD0id2hpdGUiLz48cmVjdCB4PSIxIiB5PSI4IiB3aWR0aD0iNCIgaGVpZ2h0PSIyIiBmaWxsPSJ3aGl0ZSIvPjxyZWN0IHg9IjEiIHk9IjE0IiB3aWR0aD0iNCIgaGVpZ2h0PSIyIiBmaWxsPSJ3aGl0ZSIvPjxyZWN0IHg9IjE5IiB5PSI4IiB3aWR0aD0iNCIgaGVpZ2h0PSIyIiBmaWxsPSJ3aGl0ZSIvPjxyZWN0IHg9IjE5IiB5PSIxNCIgd2lkdGg9IjQiIGhlaWdodD0iMiIgZmlsbD0id2hpdGUiLz48L3N2Zz4=)](https://github.com/Kestrun/Kestrun/actions)\n[![Arm64](https://img.shields.io/badge/Arm64-Supported-success?logo=arm)](https://github.com/Kestrun/Kestrun/actions)\n\n[![.NET 8](https://img.shields.io/badge/.NET-8.0-512BD4)](https://dotnet.microsoft.com/download/dotnet/8.0)\n[![.NET 9](https://img.shields.io/badge/.NET-9.0-512BD4)](https://dotnet.microsoft.com/download/dotnet/9.0)\n[![PowerShell 7.4](https://img.shields.io/badge/PowerShell-7.4-blue)](https://github.com/PowerShell/PowerShell/releases/tag/v7.4.0)\n[![PowerShell 7.5](https://img.shields.io/badge/PowerShell-7.5-blue)](https://github.com/PowerShell/PowerShell/releases/tag/v7.5.0)\n[![PowerShell 7.6](https://img.shields.io/badge/PowerShell-7.6(preview)-blue)](https://github.com/PowerShell/PowerShell/releases/tag/v7.6.0-preview.4)\n\n![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)\n[![Contributions](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](CONTRIBUTING.md)\n[![Releases](https://img.shields.io/github/v/release/Kestrun/Kestrun?display_name=release)](https://github.com/Kestrun/Kestrun/releases)\n\n[![Docs](https://img.shields.io/badge/docs-online-blue)](https://docs.kestrun.dev)\n[![NuGet](https://img.shields.io/nuget/v/Kestrun)](https://www.nuget.org/packages/Kestrun/)\n[![PowerShell Gallery](https://img.shields.io/powershellgallery/v/Kestrun)](https://www.powershellgallery.com/packages/Kestrun)\n\nKestrun is a hybrid web framework that combines the speed and scalability of ASP.NET Core (Kestrel) with the\nflexibility and scripting power of PowerShell. It enables you to build web APIs, automation endpoints, and\ndynamic services using both C# and PowerShell in a single, integrated environment.\n\n## Rich Documentation and Tutorial\n\nFull documentation and tutorial for Kestrun is available online at [docs.kestrun.dev](https://docs.kestrun.dev).\nYou can find guides, API references, and usage examples to help you get started and explore advanced features.\n\n## Core Capabilities\n\n- **🚀 Fast, cross-platform web server**\n  Powered by **ASP.NET Core (Kestrel)** with full access to advanced HTTP/2, header compression, and TLS options.\n\n- **🐚 Native PowerShell integration**\n  Routes can be backed by PowerShell scripts with isolated, pooled **runspaces** and dynamic\n  `$Context.Request` / `$Context.Response` variables.\n\n- **🧠 Multi-language route execution**\n  Register endpoints backed by PowerShell, C# (Roslyn scripting), VB.NET (Roslyn scripting), or native C# handlers.\n  (F# / Python / JavaScript exist as language identifiers, but scripting for them is not enabled yet.)\n\n- **🔐 Authentication built-ins**\n  JWT bearer, API keys, Basic, Windows/Negotiate, and client certificate authentication.\n\n- **📘 OpenAPI + interactive docs**\n  Generate OpenAPI (v3.0 / v3.1 / v3.2) and serve docs UIs (Swagger UI / ReDoc / Scalar / RapiDoc / Elements).\n\n- **🔁 Realtime**\n  Server-Sent Events (SSE) and SignalR support.\n\n- **🌍 Localization**\n  Request-based culture resolution with PowerShell `.psd1` or JSON string tables, per-key fallback across culture hierarchies,\n  and seamless integration with PowerShell routes and Razor pages.\n\n- **🛡️ Middleware \u0026 extensibility**\n  Add middleware for antiforgery, CORS, compression, caching, sessions, status code pages, exception handling, static files, gRPC, and more.\n\n- **⚡ Task Scheduling \u0026 Background Jobs**\n  Cron-based scheduling (Cronos) with PowerShell, C#, and VB.NET jobs.\n\n## Requirements\n\n**For Building:**\n\n- [.NET 8 SDK](https://dotnet.microsoft.com/download/dotnet/8.0) **AND**\n  [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0)\n  (solution multi-targets net8.0 + net10.0; net9.0 available via `-Frameworks` parameter)\n- **PowerShell 7.4+** (7.4 / 7.5 run on .NET 8; 7.6 preview runs on .NET 10)\n\n**Invoke-Build** and **Pester** PowerShell modules:\n\n```powershell\nInstall-PSResource -Name 'InvokeBuild','Pester' -Scope CurrentUser\n```\n\n**For Runtime (Run Only):**\n\nIf you're only *running* Kestrun apps (not building from source), install the ASP.NET Core Runtime\nmatching the PowerShell version you are using:\n\n| PowerShell Version | Install (Run-only) | Rationale |\n|--------------------|--------------------|-----------|\n| 7.4 / 7.5 | [.NET 8 ASP.NET Core Runtime](https://dotnet.microsoft.com/download/dotnet/8.0) | Bundles Microsoft.NETCore.App + Microsoft.AspNetCore.App 8.x |\n| 7.6 (preview) | [.NET 10 ASP.NET Core Runtime](https://dotnet.microsoft.com/download/dotnet/10.0) | Preview runtime aligning with PS 7.6 build |\n\nInstalling the **.NET SDK** already gives you the corresponding runtimes. For run-only scenarios the\n**ASP.NET Core Runtime** alone is sufficient (it includes the base .NET runtime).\n\nDownload PowerShell from the official\n[PowerShell Releases](https://github.com/PowerShell/PowerShell/releases).\n\n### Verify installation\n\n  ```powershell\n  # List SDKs (expect 8.x and 9.x if building from source)\n  dotnet --list-sdks\n\n  # List runtimes (look for Microsoft.NETCore.App and Microsoft.AspNetCore.App)\n  dotnet --list-runtimes | Where-Object { $_ -match 'Microsoft.(AspNetCore|NETCore).App' }\n  ```\n\n  Expected (abbreviated):\n\n  ```text\n  Microsoft.NETCore.App 8.0.x\n  Microsoft.AspNetCore.App 8.0.x\n  Microsoft.NETCore.App 9.0.x\n  Microsoft.AspNetCore.App 9.0.x\n  Microsoft.NETCore.App 10.0.x\n  Microsoft.AspNetCore.App 10.0.x\n  ```\n\n  If something is missing, install the matching ASP.NET Core Runtime from the download links above.\n\n### Build \u0026 Run\n\n  Clone the repository:\n\n  ```powershell\n  git clone https://github.com/Kestrun/Kestrun.git\n  cd Kestrun\n  ```\n\n- **🛠️ CI/CD ready**\n  - Build- and run-time configurable\n  - Works in containerized / headless environments\n  - Supports Dev/Prod fallback module path detection\n\n- **🛡️ Optional Add-ons**\n  Add via fluent extensions:\n  - `AddAntiforgery()` middleware\n  - `AddStaticFiles()`, `AddDefaultFiles()`, `AddFileServer()`\n  - `AddCors(policy)` or `AddCorsAllowAll()`\n  - `AddSignalR\u003cT\u003e()` for real-time hubs\n  - `AddAuthentication()` with multiple schemes (Windows, Basic, JWT, Certificate, etc.)\n  - Ready for Swagger, gRPC, custom middleware hooks\n\n- **⚡ Task Scheduling \u0026 Background Jobs**\n  - **Cron-based scheduling**: Full cron expression support via Cronos\n  - **Multi-language job support**: Schedule PowerShell, C#, and VB.NET scripts as background jobs\n  - **Job management**: Start, stop, and monitor scheduled tasks with detailed logging\n\n## Deployment \u0026 Extensibility\n\n\u003c!-- Deployment \u0026 Extensibility content intentionally follows earlier build section --\u003e\nThis section summarizes extension capabilities (see earlier sections for build \u0026 run instructions).\n\n### Using the PowerShell Module\n\nImport the module (from source):\n\n```powershell\nImport-Module ./src/PowerShell/Kestrun/Kestrun.psm1\n```\n\n## Running Tests\n\n### Using Invoke-Build (Recommended)\n\nThe project includes an Invoke-Build script that automatically handles both C# (xUnit) and PowerShell (Pester) tests:\n\n```powershell\nInvoke-Build Test\n```\n\n### Manual Test Execution\n\n#### C# Tests\n\n```powershell\nInvoke-Build Kestrun.Tests\n```\n\n#### PowerShell Tests\n\n```powershell\nInvoke-Build Test-Pester\n```\n\n## Documentation and Tutorial\n\nKestrun docs are built with [Just-the-Docs](https://github.com/just-the-docs/just-the-docs).\nAll new documentation **must be compatible** (front matter, `parent`, `nav_order`, etc.).\n\nSee [docs/](docs/) for structure.\n\n## Project Structure\n\n- `src/CSharp/` — C# core libraries and web server\n  - `Kestrun/Authentication` — authentication handlers and schemes\n  - `Kestrun/Certificates` — certificate management utilities\n  - `Kestrun/Hosting` — host configuration and extensions\n  - `Kestrun/Languages` — multi-language scripting support (C#, VB.NET, etc.)\n  - `Kestrun/Logging` — Serilog integration and logging helpers\n  - `Kestrun/Middleware` — custom middleware components\n  - `Kestrun/Models` — request/response classes and data models\n  - `Kestrun/Razor` — Razor Pages integration with PowerShell\n  - `Kestrun/Scheduling` — task scheduling and background job support\n  - `Kestrun/Scripting` — script execution and validation\n  - `Kestrun/Security` — security utilities and helpers\n  - `Kestrun/SharedState` — thread-safe global state management\n  - `Kestrun/Utilities` — shared utility functions\n- `src/PowerShell/` — PowerShell module and scripts\n- `examples/` — Example projects and demonstrations\n  - `CSharp/Authentication` — authentication examples\n  - `CSharp/Certificates` — certificate usage examples\n  - `CSharp/HtmlTemplate` — HTML templating examples\n  - `CSharp/MultiRoutes` — multi-route examples\n  - `CSharp/RazorSample` — Razor Pages examples\n  - `CSharp/Scheduling` — task scheduling examples\n  - `CSharp/SharedState` — shared state examples\n  - `PowerShell/` — PowerShell examples\n  - `Files/` — test files and resources\n- `tests/` — Test projects (C#, PowerShell)\n- `docs/` — Documentation files (Just-the-Docs)\n- `Utility/` — Build and maintenance scripts\n- `.github/` — GitHub Actions workflows\n- `Lint/` — Code analysis rules\n\n## Contributing\n\nContributions of all sizes are welcome — from docs improvements to new feature modules.\nSee [CONTRIBUTING.md](CONTRIBUTING.md) and the online guide at \u003chttps://docs.kestrun.dev/contributing\u003e.\n\n## License\n\nLicensed under the MIT License. See [LICENSE](LICENSE).\n\n## Acknowledgements\n\n### Documentation\n\n- [Just-the-Docs](https://github.com/just-the-docs/just-the-docs) for documentation\n\n### Code Quality\n\n- [ReportGenerator](https://github.com/danielpalme/ReportGenerator) for code coverage reporting\n- [codefactor](https://www.codefactor.io/) for code quality analysis\n- [coveralls](https://coveralls.io/) for code coverage tracking\n\n### AI Assistance\n\n- [ChatGPT](https://openai.com/chatgpt) for conversational AI support\n- [Copilot](https://github.com/features/copilot) for AI-powered code suggestions\n\n### Collaboration and Version Control\n\n- [GitHub](https://github.com/) for version control and collaboration\n- [NuGet](https://www.nuget.org/) for package management\n- [PowerShell Gallery](https://www.powershellgallery.com/) for PowerShell modules\n\n### Scripting and Automation\n\n- [PowerShell](https://github.com/PowerShell/PowerShell) for scripting and automation\n- [.NET](https://dotnet.microsoft.com/) for the underlying framework\n- [Pester](https://pester.dev/) for PowerShell testing\n\n### Logging and Serialization\n\n- [PoShLog](https://github.com/PoShLog/PoShLog) — inspiration and portions of code for logging (MIT License)\n- [powershell-yaml](https://github.com/cloudbase/powershell-yaml) — adapted tests and implementation code for YAML serialization (Apache-2.0 License)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkestrun%2Fkestrun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkestrun%2Fkestrun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkestrun%2Fkestrun/lists"}