{"id":15288030,"url":"https://github.com/mishka-group/mishka_installer","last_synced_at":"2025-04-10T02:21:38.032Z","repository":{"id":37407404,"uuid":"470924336","full_name":"mishka-group/mishka_installer","owner":"mishka-group","description":"Mishka Installer is a system plugin manager and run time installer for elixir","archived":false,"fork":false,"pushed_at":"2025-03-25T15:24:55.000Z","size":557,"stargazers_count":36,"open_issues_count":4,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T06:49:06.907Z","etag":null,"topics":["elixir","plugin","plugin-manager","plugin-system"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/mishka_installer","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mishka-group.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"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},"funding":{"github":["mishka-group"],"buy_me_a_coffee":"mishkagroup"}},"created_at":"2022-03-17T09:20:06.000Z","updated_at":"2025-03-25T15:24:59.000Z","dependencies_parsed_at":"2025-01-02T05:09:58.589Z","dependency_job_id":"5c245993-b507-400f-b85a-2c803b7e9995","html_url":"https://github.com/mishka-group/mishka_installer","commit_stats":{"total_commits":406,"total_committers":1,"mean_commits":406.0,"dds":0.0,"last_synced_commit":"8b622cc04ba261a0ae99203d387a83fc180eb9cd"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishka-group%2Fmishka_installer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishka-group%2Fmishka_installer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishka-group%2Fmishka_installer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishka-group%2Fmishka_installer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mishka-group","download_url":"https://codeload.github.com/mishka-group/mishka_installer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248143120,"owners_count":21054709,"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":["elixir","plugin","plugin-manager","plugin-system"],"created_at":"2024-09-30T15:43:52.767Z","updated_at":"2025-04-10T02:21:38.013Z","avatar_url":"https://github.com/mishka-group.png","language":"Elixir","funding_links":["https://github.com/sponsors/mishka-group","https://buymeacoffee.com/mishkagroup","https://www.buymeacoffee.com/mishkagroup","https://img.buymeacoffee.com/button-api/?text=Buy"],"categories":[],"sub_categories":[],"readme":"# Mishka Installer is a system plugin(event) manager and run time installer for Elixir.\n\n[![MishkaInstaller CI](https://github.com/mishka-group/mishka_installer/actions/workflows/ci.yml/badge.svg)](https://github.com/mishka-group/mishka_installer/actions/workflows/ci.yml) [![Hex.pm](https://img.shields.io/badge/hex-0.1.0-blue.svg)](https://hex.pm/packages/mishka_installer) [![GitHub license](https://img.shields.io/badge/apache-2.0-green.svg)](https://raw.githubusercontent.com/mishka-group/mishka_installer/master/LICENSE) ![GitHub issues](https://img.shields.io/github/issues/mishka-group/mishka_installer)\n\n\u003ca href=\"https://www.buymeacoffee.com/mishkagroup\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://img.buymeacoffee.com/button-api/?text=Buy us coffee\u0026emoji=☕\u0026slug=mishkagroup\u0026button_colour=FFDD00\u0026font_colour=000000\u0026font_family=Cookie\u0026outline_colour=000000\u0026coffee_colour=ffffff\" alt=\"Buy Me A Coffee\" height=\"50\" width=\"210\"\u003e\n\u003c/a\u003e\n\n## Low Maintenance Warning: \n\n\u003e **This library is in low maintenance mode, which means the author is currently only responding to pull requests.**\n\n\n## Build purpose\n---\n\nImagine you are going to make an application that will have many plugins built for it in the future.\nBut the fact that many manipulations will be made on your source code makes it difficult to\nmaintain the application. For example, you present a content management system for your users,\nand now they need to activate a section for registration and `SMS`; the system allows you to\npresent your desired input/output absolutely plugin oriented to your users and makes it\npossible for the developers to write their required applications beyond the core source code.\n\n\n\u003e **NOTICE**: Do not use the master branch; this library is under heavy development.\n\u003e Expect version 0.1.0, and for using the new features, please wait until a new release is out.\n\n\n##### This library is divided into the following main sections:\n\n- [Events and Hook](#events-and-hook)\n- [Plugin management system theory and installation of Elixir libraries at runtime](#plugin-management-system-theory-and-installation-of-elixir-libraries-at-runtime)\n\n\n### Events and Hook\n---\n\nIn this section, you can define a series of plugins for each event,\nfor example: after **successful registration** or **unsuccessful purchase** from “the store”,\nand for each event, put a set of callbacks in one module.\n\nAfter completing this step, when the user wants to create his own plugin,\nthe Macro `behaviour` and `Hook` module will call you in its action module.\n\nThis helps you have a regular and `error-free` system, and the library uses an almost\nintegrated structure in all of its events.\n\n\u003e In **Mishka Installer** Library, a series of action or hook functions are\ngiven to the developer of the main plugin or software, which helps build plugins **outside**/**inside**\nthe system and convert software sections into separate events.\n\n**Some of the functions of this module include the following:**\n\n- Retrieves the merged configuration for the hook module.\n- Register a plugin for a specific event.\n- Start a plugin of a specific event.\n- Restart a plugin of a specific event.\n- Stop a plugin of a specific event.\n- Unregister a plugin of a specific event.\n- Retrieves a Plugin `GenServer` state.\n- Each plugin has A `GenServer` to do some auto jobs.\n\n\u003e For more information please see the `MishkaInstaller.Event.Hook` module.\n\n##### Example:\n\n```elixir\ndefmodule RegisterEmailSender do\n  use MishkaInstaller.Event.Hook, event: \"after_success_login\"\n\n  def call(entries) do\n    {:reply, entries}\n  end\nend\n```\n\n**If you want to change a series of default information, do this:**\n\n```elixir\nuse MishkaInstaller.Event.Hook,\n  event: \"after_success_login\",\n  initial: %{depends: [SomeEvent], priority: 20}\n```\n\n**You can call all plugins of an event:**\n\n```elixir\nalias MishkaInstaller.Event.Hook\n\n# Normal call an event plugins\nHook.call(\"after_success_login\", params)\n\n# If you want certain entries not to change\nHook.call(\"after_success_login\", params, [private: something_based_on_your_data])\n\n# If you want the initial entry to be displayed at the end\nHook.call(\"after_success_login\", params, [return: true])\n```\n\n**Note: If you want your plugin to execute automatically,\nall you need to do is send the name of the module in which you utilized\nthe `MishkaInstaller.Event.Hook` to the Application module.**\n\n```elixir\nchildren = [\n  ...\n  RegisterEmailSender\n]\n\n...\nopts = [strategy: :one_for_one, name: SomeModule.Supervisor]\nSupervisor.start_link(children, opts)\n```\n\n\u003e This module is a read-only in-memory storage optimized for the fastest possible read times\n\u003e not for write strategies.\n\n[![Run in Livebook](https://livebook.dev/badge/v1/pink.svg)](https://livebook.dev/run?url=https%3A%2F%2Fgithub.com%2Fmishka-group%2Fmishka_installer%2Fblob%2Fmaster%2Fguidance%2Fevent%2Fhook.livemd)\n\n### Plugin management system theory and installation of Elixir libraries at runtime\n---\n\nThe functionality of this library can be conceptualized as an architectural potential that is\ncomposed of two primary components, which are as follows:\n\n1. Event management (Plugin Hook powered by **Elixir Macro**)\n2. Managing removal and installation of Elixir libraries at `runtime`.\n\nWhen a programmer uses this library for his own software development, we sought to\nensure that in addition to the established capabilities, he also has access to a set of\nappropriate standards for software development that are based on preset behaviors that can be applied;\nThis was our goal.\n\nIt streamlines and organizes the work of a group working on a project while also facilitating\nthe creation of software.\nError control and tree structure, which enable us to develop a system that is robust and trustworthy,\nare two of the guiding ideas behind the construction of this library, which has garnered\nattention from people all around the world.\n\nThe [MishkaInstaller](https://github.com/mishka-group/mishka_installer) library can be created in\nvarious systems, and it provides fundamental capabilities such as the management of plugin states\nand the application of standard behaviors.\nThese features can all be accessed by specified hooks in the library.\n\n\u003e **The installer part is in beta mode, use it carefully and some of its functionality may not work in the Elixir `release`.**\n\n##### Example:\n\n```elixir\nalias MishkaInstaller.Installer.Installer\n\n# Normal calling\nInstaller.install(%__MODULE__{app: \"some_name\", path: \"some_name\", type: :hex})\n\n# Normal calling\nInstaller.uninstall(%__MODULE__{app: \"some_name\", path: \"some_name\", type: :hex})\n\n# Normal calling\nInstaller.async_install(%__MODULE__{app: \"some_name\", path: \"some_name\", type: :hex})\n```\n\n\u003e For more information please see the `MishkaInstaller.Installer.Installer` module.\n\n\n## Installing the library:\n---\n\nIt should be noted that this library must be installed in two parts of the plugin and the\nsoftware that wants to display the plugins, and due to its small dependencies, it does\nnot cause any problems. To install, just add this library to your \"mix.exs\" in the \"deps\"\nfunction as follows:\n\n```elixir\ndef deps do\n  [\n    {:mishka_installer, \"~\u003e 0.1.1\"}\n  ]\nend\n```\n\nThe docs can be found at https://hexdocs.pm/mishka_installer.\n\n---\n\n# Donate\n\nYou can support this project through the \"[Sponsor](https://github.com/sponsors/mishka-group)\" button on GitHub or via cryptocurrency donations. All our projects are **open-source** and **free**, and we rely on community contributions to enhance and improve them further.\n\n| **BTC**                                                                                                                            | **ETH**                                                                                                                            | **DOGE**                                                                                                                           | **TRX**                                                                                                                            |\n| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |\n| \u003cimg src=\"https://github.com/mishka-group/mishka_developer_tools/assets/8413604/230ea4bf-7e8f-4f18-99c9-0f940dd3c6eb\" width=\"200\"\u003e | \u003cimg src=\"https://github.com/mishka-group/mishka_developer_tools/assets/8413604/0c8e677b-7240-4b0d-8b9e-bd1efca970fb\" width=\"200\"\u003e | \u003cimg src=\"https://github.com/mishka-group/mishka_developer_tools/assets/8413604/3de9183e-c4c0-40fe-b2a1-2b9bb4268e3a\" width=\"200\"\u003e | \u003cimg src=\"https://github.com/mishka-group/mishka_developer_tools/assets/8413604/aaa1f103-a7c7-43ed-8f39-20e4c8b9975e\" width=\"200\"\u003e |\n\n\u003cdetails\u003e\n  \u003csummary\u003eDonate addresses\u003c/summary\u003e\n\n**BTC**:‌\n\n```\nbc1q24pmrpn8v9dddgpg3vw9nld6hl9n5dkw5zkf2c\n```\n\n**ETH**:\n\n```\n0xD99feB9db83245dE8B9D23052aa8e62feedE764D\n```\n\n**DOGE**:\n\n```\nDGGT5PfoQsbz3H77sdJ1msfqzfV63Q3nyH\n```\n\n**TRX**:\n\n```\nTBamHas3wAxSEvtBcWKuT3zphckZo88puz\n```\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmishka-group%2Fmishka_installer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmishka-group%2Fmishka_installer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmishka-group%2Fmishka_installer/lists"}