{"id":14960321,"url":"https://github.com/pardeike/harmony","last_synced_at":"2025-05-12T05:28:46.959Z","repository":{"id":39381888,"uuid":"78002587","full_name":"pardeike/Harmony","owner":"pardeike","description":"A library for patching, replacing and decorating .NET and Mono methods during runtime","archived":false,"fork":false,"pushed_at":"2025-04-23T07:06:30.000Z","size":16420,"stargazers_count":5655,"open_issues_count":7,"forks_count":526,"subscribers_count":97,"default_branch":"master","last_synced_at":"2025-05-12T04:07:13.456Z","etag":null,"topics":["cil","csharp","detour","detours","dotnet","monkey-patching","mono","non-destructive","patcher","runtime","unity"],"latest_commit_sha":null,"homepage":"https://www.patreon.com/pardeike","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/pardeike.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"pardeike","patreon":"pardeike"}},"created_at":"2017-01-04T09:43:16.000Z","updated_at":"2025-05-11T21:05:42.000Z","dependencies_parsed_at":"2023-02-08T04:00:45.016Z","dependency_job_id":"39b90fc4-a22c-4248-a90d-0dec8871817e","html_url":"https://github.com/pardeike/Harmony","commit_stats":{"total_commits":1260,"total_committers":64,"mean_commits":19.6875,"dds":"0.43412698412698414","last_synced_commit":"efb41b4b3fe24c8a17b40b16508e5da4b5b05002"},"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pardeike%2FHarmony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pardeike%2FHarmony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pardeike%2FHarmony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pardeike%2FHarmony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pardeike","download_url":"https://codeload.github.com/pardeike/Harmony/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253680899,"owners_count":21946669,"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","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":["cil","csharp","detour","detours","dotnet","monkey-patching","mono","non-destructive","patcher","runtime","unity"],"created_at":"2024-09-24T13:22:02.617Z","updated_at":"2025-05-12T05:28:46.933Z","avatar_url":"https://github.com/pardeike.png","language":"C#","readme":"\u003cp align=\"center\"\u003e\r\n\t\u003cimg src=\"https://raw.githubusercontent.com/pardeike/Harmony/master/HarmonyLogo.png\" alt=\"Harmony\" width=\"180\" /\u003e\u003cbr\u003e\r\n\t\u003cb\u003eVersion 2.3\u003c/b\u003e\u003cbr\u003e\r\n\tA library for patching, replacing and decorating\u003cbr\u003e\r\n\t.NET and Mono methods during runtime.\r\n\u003c/p\u003e\r\n\r\n### About\r\n\r\nHarmony gives you an elegant and high level way to alter the functionality in applications written in C#. It works great in games and is well established in titles like  \r\n\r\n• **Rust**  \r\n• **Rimworld**  \r\n• **7 Days To Die**  \r\n• **Stardew Valley**  \r\n• **Subnautica**  \r\n• **Oxygen Not Included**  \r\n• **Besiege**  \r\n• **Cities:Skylines**  \r\n• **Kerbal Space Program**  \r\n• **Resonite**  \r\n• **BattleTech**  \r\n• **Slime Rancher**  \r\n\r\nand others like Ravenfield, Sheltered, Staxel, The Ultimate Nerd Game, Total Miner, Unturned, SCP: Secret Laboratory ...\r\n\r\nIt is also used in unit testing WPF controls at Microsoft and Google and in many other areas.\r\n\r\n### How it works\r\n\r\nIf you develop in C# and your code is loaded as a module/plugin into a host application, you can use Harmony to alter the functionality of all the available assemblies of that application. Where other patch libraries simply allow you to replace the original method, Harmony goes one step further and gives you:\r\n\r\n• A way to keep the original method intact  \r\n• Execute your code before and/or after the original method  \r\n• Modify the original with IL code processors  \r\n• Multiple Harmony patches co-exist and don't conflict with each other  \r\n• Works at runtime and does not touch any files\r\n\r\n### Installation\r\n\r\nIf you want a single file, dependency-merged assembly, you should use the [Lib.Harmony](https://www.nuget.org/packages/Lib.Harmony) nuget package. This is the **preferred** way.\r\n\r\nIf you instead want to supply the dependencies yourself, you should use the [Lib.Harmony.Thin](https://www.nuget.org/packages/Lib.Harmony.Thin) nuget package. You get more control but you are responsible to make all references available at runtime.\r\n\r\n### Documentation\r\n\r\nPlease check out the [documentation](https://harmony.pardeike.net) and join the official [discord server](https://discord.gg/xXgghXR).\r\n\r\n### Contribute\r\n\r\nI put thousands of hours into this project and its support. So every little action helps:\r\n\r\n• Become a [GitHub sponsor](https://github.com/sponsors/pardeike) or a [Patreon](https://www.patreon.com/pardeike)  \r\n• Upvote this [stackoverflow answer](https://stackoverflow.com/questions/7299097/dynamically-replace-the-contents-of-a-c-sharp-method/42043003#42043003)  \r\n• Spread the word in your developer communities\r\n\r\nThis project uses the great [MonoMod.Core](https://github.com/MonoMod) library by [0x0ade](https://github.com/0x0ade) and [nike4613](https://github.com/nike4613).\r\n\r\n### Harmony 1\r\n\r\nHarmony 1 is deprecated and not under active development anymore. The latest version of it (v1.2.0.1) is stable and contains only minor bugs. Keep using it if you are in an environment that exclusively uses Harmony 1. Currently Harmony 1.x and 2.x are **NOT COMPATIBLE** with each other and **SHOULD NOT BE MIXED**. The old documentation can still be found at the [Wiki](https://github.com/pardeike/Harmony/wiki).\r\n\r\n\u003cbr\u003e\u0026nbsp;\r\n\r\n\u003cp align=\"center\"\u003e\r\n\t\u003ca href=\"../../blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/pardeike/harmony.svg?style=flat-squared\u0026label=License\" /\u003e\u003c/a\u003e\r\n\t\u003ca href=\"../../releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/release/pardeike/harmony.svg?style=flat-squared\u0026label=Release\" /\u003e\u003c/a\u003e\r\n\t\u003ca href=\"https://harmony.pardeike.net\"\u003e\u003cimg src=\"https://img.shields.io/badge/documentation-%F0%9F%94%8D-9cf?style=flat-squared\u0026label=Documentation\" /\u003e\u003c/a\u003e\r\n\u003c/p\u003e\r\n\u003cp align=\"center\"\u003e\r\n\t\u003ca href=\"https://github.com/pardeike/Harmony/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/downloads/pardeike/Harmony/total.svg?style=flat-squared\u0026logo=github\u0026color=009900\u0026label=Release%20Downloads\" /\u003e\u003c/a\u003e\r\n\t\u003ca href=\"https://www.nuget.org/packages/Lib.Harmony\"\u003e\u003cimg src=\"https://img.shields.io/nuget/dt/Lib.Harmony?style=flat-squared\u0026logo=nuget\u0026label=Nuget%20Downloads\u0026color=009900\" /\u003e\u003c/a\u003e\r\n\u003c/p\u003e\r\n\u003cp align=\"center\"\u003e\r\n\t\u003ca href=\"https://github.com/pardeike/Harmony/actions/workflows/test.yml\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/pardeike/Harmony/test.yml?style=flat-squared\u0026logo=github\u0026label=CI%20Tests\" /\u003e\u003c/a\u003e\r\n\t\u003ca href=\"https://discord.gg/xXgghXR\"\u003e\u003cimg src=\"https://img.shields.io/discord/131466550938042369.svg?style=flat-squared\u0026logo=discord\u0026label=Official%20Discord\" /\u003e\u003c/a\u003e\r\n\u003c/p\u003e\r\n\u003cp align=\"center\"\u003e\r\n\t\u003ca href=\"mailto:andreas@pardeike.net\"\u003e\u003cimg src=\"https://img.shields.io/badge/email-andreas@pardeike.net-blue.svg?style=flat-squared\u0026label=Email\" /\u003e\u003c/a\u003e\r\n\t\u003ca href=\"https://twitter.com/pardeike\"\u003e\u003cimg src=\"https://img.shields.io/badge/twitter-@pardeike-blue.svg?style=flat-squared\u0026logo=twitter\u0026label=Twitter\" /\u003e\u003c/a\u003e\r\n\u003c/p\u003e\r\n","funding_links":["https://github.com/sponsors/pardeike","https://patreon.com/pardeike","https://www.patreon.com/pardeike"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpardeike%2Fharmony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpardeike%2Fharmony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpardeike%2Fharmony/lists"}