igniter
Rules for working with Igniter
When & Why to Use This Skill
Igniter is a powerful code generation and project patching framework specifically designed for Elixir development. It enables semantic manipulation of codebases by leveraging AST (Abstract Syntax Trees) through Sourceror.Zipper, allowing for safe, context-aware modifications to both new and existing files. This skill is essential for developers looking to automate boilerplate creation, manage project configurations, and perform precise code refactoring within the Elixir ecosystem.
Use Cases
- Automated Project Patching: Safely update Elixir configuration files (config.exs, runtime.exs) and application modules without manual intervention.
- Intelligent Code Generation: Create custom generators that not only scaffold new modules but also intelligently integrate them into the existing project structure and mix.exs.
- Dependency and Task Management: Programmatically manage project dependencies, task aliases, and formatter settings to ensure consistency across large-scale Elixir projects.
- Semantic AST Refactoring: Perform complex code transformations on functions, maps, lists, and keyword lists using precise, context-aware AST manipulation tools.
| name | igniter |
|---|---|
| description | Rules for working with Igniter |
Rules for working with Igniter
Understanding Igniter
Igniter is a code generation and project patching framework that enables semantic manipulation of Elixir codebases. It provides tools for creating intelligent generators that can both create new files and modify existing ones safely. Igniter works with AST (Abstract Syntax Trees) through Sourceror.Zipper to make precise, context-aware changes to your code.
Available Modules
Project-Level Modules (Igniter.Project.*)
Igniter.Project.Application- Working with Application modules and application configurationIgniter.Project.Config- Modifying Elixir config files (config.exs, runtime.exs, etc.)Igniter.Project.Deps- Managing dependencies declared in mix.exsIgniter.Project.Formatter- Interacting with .formatter.exs filesIgniter.Project.IgniterConfig- Managing .igniter.exs configuration filesIgniter.Project.MixProject- Updating project configuration in mix.exsIgniter.Project.Module- Creating and managing modules with proper file placementIgniter.Project.TaskAliases- Managing task aliases in mix.exsIgniter.Project.Test- Working with test and test support files
Code-Level Modules (Igniter.Code.*)
Igniter.Code.Common- General purpose utilities for working with Sourceror.ZipperIgniter.Code.Function- Working with function definitions and callsIgniter.Code.Keyword- Manipulating keyword listsIgniter.Code.List- Working with lists in ASTIgniter.Code.Map- Manipulating mapsIgniter.Code.Module- Working with module definitions and usageIgniter.Code.String- Utilities for string literalsIgniter.Code.Tuple- Working with tuples