{"id":23895978,"url":"https://github.com/ash-project/igniter","last_synced_at":"2026-04-02T11:40:23.018Z","repository":{"id":242168871,"uuid":"806856856","full_name":"ash-project/igniter","owner":"ash-project","description":"A code generation and project patching framework.","archived":false,"fork":false,"pushed_at":"2026-02-24T02:04:26.000Z","size":2261,"stargazers_count":383,"open_issues_count":29,"forks_count":62,"subscribers_count":6,"default_branch":"main","last_synced_at":"2026-02-24T08:39:19.206Z","etag":null,"topics":["code-generation","elixir","installers","source-code"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/igniter/readme.html","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ash-project.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSES/MIT.txt","code_of_conduct":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"open_collective":"ash-framework"}},"created_at":"2024-05-28T03:31:08.000Z","updated_at":"2026-02-24T02:04:29.000Z","dependencies_parsed_at":"2026-01-02T07:04:58.041Z","dependency_job_id":null,"html_url":"https://github.com/ash-project/igniter","commit_stats":{"total_commits":284,"total_committers":9,"mean_commits":"31.555555555555557","dds":"0.16549295774647887","last_synced_commit":"a255777736044ac40dc02929200cb661478b62f0"},"previous_names":["ash-project/igniter"],"tags_count":195,"template":false,"template_full_name":null,"purl":"pkg:github/ash-project/igniter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ash-project%2Figniter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ash-project%2Figniter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ash-project%2Figniter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ash-project%2Figniter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ash-project","download_url":"https://codeload.github.com/ash-project/igniter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ash-project%2Figniter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30101620,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T23:59:36.199Z","status":"ssl_error","status_checked_at":"2026-03-04T23:56:48.556Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["code-generation","elixir","installers","source-code"],"created_at":"2025-01-04T16:28:27.766Z","updated_at":"2026-03-05T00:01:06.544Z","avatar_url":"https://github.com/ash-project.png","language":"Elixir","readme":"\u003c!--\nSPDX-FileCopyrightText: 2020 Zach Daniel\nSPDX-FileCopyrightText: 2024 igniter contributors \u003chttps://github.com/ash-project/igniter/graphs.contributors\u003e\n\nSPDX-License-Identifier: MIT\n--\u003e\n\n\u003cimg src=\"https://github.com/ash-project/igniter/blob/main/logos/igniter-logo-small.png?raw=true#gh-light-mode-only\" alt=\"Logo Light\" width=\"250\"\u003e\n\u003cimg src=\"https://github.com/ash-project/igniter/blob/main/logos/igniter-logo-small.png?raw=true#gh-dark-mode-only\" alt=\"Logo Dark\" width=\"250\"\u003e\n\n[![CI](https://github.com/ash-project/igniter/actions/workflows/elixir.yml/badge.svg)](https://github.com/ash-project/igniter/actions/workflows/elixir.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Hex version badge](https://img.shields.io/hexpm/v/igniter.svg)](https://hex.pm/packages/igniter)\n[![Hexdocs badge](https://img.shields.io/badge/docs-hexdocs-purple)](https://hexdocs.pm/igniter)\n[![REUSE status](https://api.reuse.software/badge/github.com/ash-project/igniter)](https://api.reuse.software/info/github.com/ash-project/igniter)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/ash-project/igniter)\n\n# Igniter\n\nIgniter is a code generation and project patching framework.\n\nThere are two audiences for Igniter:\n- **End-users**:\n  - Provides tasks like `mix igniter.install` to automatically add dependencies to your project\n  - Provides upgraders to upgrade your deps and apply codemods at the same time\n  - Provides refactors like `mix igniter.refactor.rename_function` to refactor your code automatically\n- **Library authors and platform teams**: Igniter is a toolkit for writing smarter generators that can semantically create _and modify_ existing files in end-user's projects (e.g. codemods)\n\n## For end-users\n\n### Installers\n\nIgniter provides `mix igniter.install`, which will automatically _add the dependency to your mix.exs_ and then run\nthat library's installer if it has one.\n\n### Upgraders\n\nThe `mix igniter.upgrade` mix task is a drop-in replacement for `mix deps.update` but it will additionally\nrun any upgrade patchers defined in the target package (if there are any).\n\nSee the [upgrades guide](/documentation/upgrades.md) guide for more.\n\n### Refactors\n\nIn addition to providing tools for library authors to patch your code, common operations are available to use as needed.\n\n- `mix igniter.refactor.rename_function` - Rename a function in your application, along with all references to it. Optionally it can also mark the previous function as deprecated.\n\n### Others\n\n- `mix igniter.update_gettext` - Use this to update [gettext](https://github.com/elixir-gettext/gettext) if your version of gettext is lower than 0.26.1 and you are seeing a compile warning\n  about gettext backends.\n\n\n### Installation\n\nIgniter requires Elixir 1.15+, but 1.17+ is recommended for full compatibility.\n\n#### Standard Installation for end-users\n\nAdd Igniter to an existing elixir project by adding it to your dependencies in `mix.exs`:\n\n```elixir\n{:igniter, \"~\u003e 0.6\", only: [:dev, :test]}\n```\n\nNote: If you only want to use `mix igniter.install` to add dependencies to your project then you can install the archive instead of adding Igniter to your project.\n\n#### Installing globally via an archive\n\nFirst, install the archive:\n\n```elixir\nmix archive.install hex igniter_new\n```\n\nThen you can run `mix igniter.new` to generate a new elixir project\n\n```\nmix igniter.new app_name --install ash\n```\n\n### Creating a new mix project using Igniter\n\nIf you want to create a new mix project that uses ash and ecto you can run a command like:\n\n```\nmix igniter.new app_name --install ash,ecto\n```\n\nYou can also combine an Igniter install command with existing project generators (e.g. `mix phx.new`) by specifying the mix task name with the `--with` flag. If you want to pass arguments to the existing project generator/task you can pass them with `--with-args`:\n\n```\nmix igniter.new app_name --install ash --with phx.new --with-args=\"--no-ecto --no-html\"\n```\n\n## For library authors and platform teams\n\nIgniter is a toolkit for writing smarter generators that can semantically create _and modify_ existing files.\n\n### Installing for library authors\n\nFor library authors, add Igniter to your `mix.exs` with `optional: true`:\n\n```elixir\n{:igniter, \"~\u003e 0.6\", optional: true}\n```\n\n`optional: true` ensures that end users can install as outlined above, and `:igniter` will not be included in their production application.\n\n### Patterns\n\nMix tasks built with Igniter are both individually callable, _and_ composable. This means that tasks can call each other, and also end-users can create and customize their own generators composing existing tasks.\n\n### Installers\n\nIgniter will look for a task called `\u003cyour_package\u003e.install` when the user runs `mix igniter.install \u003cyour_package\u003e`, and will run it after installing and fetching dependencies.\n\nTo create your installer, use `mix igniter.gen.task \u003cyour_package\u003e.install`\n\n### Generators/Patchers\n\nGenerators created with Igniter can be run like any other mix task, or composed together. For example, lets say that you wanted to have your own `Ash.Resource` generator, that starts with the default `mix ash.gen.resource` task, but then adds or modifies additional files:\n\nTo create your generator, use `mix igniter.gen.task \u003cyour_package\u003e.task.name`\n\n```elixir\n# in lib/mix/tasks/my_app.gen.resource.ex\ndefmodule Mix.Tasks.MyApp.Gen.Resource do\n  use Igniter.Mix.Task\n\n  @impl Igniter.Mix.Task\n  def igniter(igniter) do\n    [resource | _] = igniter.args.argv\n\n    resource = Igniter.Code.Module.parse(resource)\n    my_special_thing = Module.concat([resource, SpecialThing])\n    location = Igniter.Code.Module.proper_location(my_special_thing)\n\n    igniter\n    |\u003e Igniter.compose_task(\"ash.gen.resource\", igniter.args.argv)\n    |\u003e Igniter.Project.Module.create_module(my_special_thing, \"\"\"\n      # this is the special thing for #{inspect()}\n    \"\"\")\n  end\nend\n```\n\n## Upgrading to 0.4.x\n\nYou may notice an issue running `mix igniter.upgrade` if you are using `0.3.x` versions.\nyou must manually upgrade Igniter (by editing your `mix.exs` file or running `mix deps.update`)\nto a version greater than or equal to `0.3.78` before running `mix igniter.upgrade`. A problem\nwas discovered with the process of Igniter upgrading itself or one of its dependencies.\n\nIn any case where Igniter must both download and compile a new version of itself, it will exit\nand print instructions with a command you can run to complete the upgrade. For example:\n\n`mix igniter.apply_upgrades igniter:0.4.0:0.5.0 package:0.1.3:0.1.4`\n","funding_links":["https://opencollective.com/ash-framework"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fash-project%2Figniter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fash-project%2Figniter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fash-project%2Figniter/lists"}