# composer v0.2.0 - Table of Contents

> Composable project setup for Elixir applications, built on Igniter

## Pages

- [Elixir Composer](readme.md)
- [Change Log](changelog.md)
- [MIT License](license.md)

- Guides
  - [Cookbooks](cookbooks.md)
  - [Recipes](recipes.md)
  - [Templates](templates.md)
  - [Lint and editor diagnostics](lint.md)
  - [Composer LSP](composer_lsp.md)

## Modules

- [Composer](Composer.md): Composable project setup for Elixir applications, built on
[Igniter](https://hexdocs.pm/igniter).
- [Composer.Editor](Composer.Editor.md): Opens a file in the user's editor, for `mix composer.recipe.edit` and
`mix composer.step.edit`.

- Definitions
  - [Composer.Cookbook](Composer.Cookbook.md): Defines a cookbook: one package's tree of steps and recipes.
  - [Composer.Facets](Composer.Facets.md): The controlled facet vocabulary that steps declare with `use Composer.Step`.
  - [Composer.Step](Composer.Step.md): Defines a composer step.
  - [Composer.Step.Meta](Composer.Step.Meta.md): A step's declared metadata, returned by its `__composer_step__/0`.

- Recipes and references
  - [Composer.Discovery](Composer.Discovery.md): Finds the cookbooks available to the current project.
  - [Composer.Local](Composer.Local.md): Local: your recipes, outside any project.
  - [Composer.Recipe](Composer.Recipe.md): A recipe: a named, self-describing list of steps. Recipes live in
group files (see `Composer.Recipe.Group`), `recipes/<group>.exs`, and
are addressed as `<cookbook>:<group>/<name>`.
  - [Composer.Recipe.Group](Composer.Recipe.Group.md): A recipe group: one `recipes/<group>.exs` file holding one or more
recipes, keyed by name.
  - [Composer.Ref](Composer.Ref.md): A reference to a step or recipe: `"cookbook:path"`.
  - [Composer.Resolver](Composer.Resolver.md): Resolves references and expands recipes into one flat, acyclic,
de-duplicated step list for `Composer.Runner`.

- Writing steps
  - [Composer.Helpers](Composer.Helpers.md): Conveniences for writing steps.

  - [Composer.Templates](Composer.Templates.md): Helpers for steps that write files from templates.
  - [Composer.Versions](Composer.Versions.md): Fetches latest package versions from Hex, npm, GitHub, and the Oban Pro
docs site so generated dependencies start current instead of pinned to
whatever Composer shipped with.

- Engine
  - [Composer.Error](Composer.Error.md): Formats the `{:error, reason}` values returned by composer's modules, and
the warnings returned by `Composer.Resolver.warnings/1`.
  - [Composer.Git](Composer.Git.md): Git support for `mix composer.recipe.run`: the pre-flight status check,
the commit message, and the commit itself.

  - [Composer.Preflight](Composer.Preflight.md): Checks the `requires` of the steps about to run, before anything runs.
  - [Composer.Runner](Composer.Runner.md): Runs a resolved step list against an igniter.

- Tooling
  - [Composer.Index](Composer.Index.md): The shell completion index: `_build/composer/index`.
  - [Composer.Lint](Composer.Lint.md): Checks a cookbook, or your local recipes, for
`mix composer.cookbook.lint`.
  - [Composer.Lint.Diagnostic](Composer.Lint.Diagnostic.md): One problem found by `Composer.Lint`: what is wrong, how bad it is, and
where.
  - [Composer.Lint.Format](Composer.Lint.Format.md): Renders `Composer.Lint.Diagnostic`s for `mix composer.cookbook.lint`.
Every function is pure: it returns text and prints nothing.
  - [Composer.Manifest](Composer.Manifest.md): A cookbook's static manifest: `lib/composer/<package>/manifest.exs`.
  - [Composer.Recipe.Locator](Composer.Recipe.Locator.md): Finds where things are written in a recipe group file, without
evaluating it.

- Editor
  - [Composer.LSP](Composer.LSP.md): `composer-ls`, the language server for recipe group files, started by
`mix composer.lsp`. See the Composer LSP guide.
  - [Composer.LSP.Actions](Composer.LSP.Actions.md): Quick fixes from lint's suggestions.
  - [Composer.LSP.Complete](Composer.LSP.Complete.md): Completion items for a context from `Composer.LSP.Cursor.context/3`.
  - [Composer.LSP.Convert](Composer.LSP.Convert.md): Maps Composer data to the Language Server Protocol's shapes, as plain
maps with atom keys named like GenLSP's structure fields
(`related_information`, `new_text`, ...). `Composer.LSP.Server` turns
them into GenLSP structures; nothing here depends on GenLSP.
  - [Composer.LSP.Cursor](Composer.LSP.Cursor.md): What is under the cursor in a recipe group buffer.
  - [Composer.LSP.Definition](Composer.LSP.Definition.md): Goto-definition targets and `hex:` document links.
  - [Composer.LSP.Diagnostics](Composer.LSP.Diagnostics.md): The diagnostics of a saved recipe group file and of the files that
include its recipes, from disk.
  - [Composer.LSP.Hover](Composer.LSP.Hover.md): Renders a `Composer.LSP.Lookup` result as Markdown for a hover. Every
hover ends with a footer naming the host project, since a reference
valid in one host may not be in another.

  - [Composer.LSP.Lookup](Composer.LSP.Lookup.md): Resolves what is under the cursor (`Composer.LSP.Cursor`) as a run
would: the recipe's aliases are expanded, and the cookbook owning the
buffer's file is the context unqualified references are looked up in
first. Shared by hover and goto-definition.
  - [Composer.LSP.Position](Composer.LSP.Position.md): Converts columns between Composer and the Language Server Protocol.
  - [Composer.LSP.Server](Composer.LSP.Server.md): The GenLSP server of `composer-ls`; the only module that uses GenLSP.
  - [Composer.LSP.Session](Composer.LSP.Session.md): The language server's state process, holding a `Composer.LSP.Workspace`.
  - [Composer.LSP.Workspace](Composer.LSP.Workspace.md): The language server's state, as a struct and pure transitions;
`Composer.LSP.Session` holds it in a process.

- Cookbooks
  - [Composer.Core](Composer.Core.md): Composer's built-in cookbook: steps for setting up a fresh `phx.new` app.

- Built-in steps
  - [Composer.Core.Steps.Cluster.Gigalixir](Composer.Core.Steps.Cluster.Gigalixir.md): Generates Gigalixir deployment configuration: buildpacks, Procfile,
release scripts, and production SSL/endpoint config.
  - [Composer.Core.Steps.Cluster.Gigalixir.Libcluster](Composer.Core.Steps.Cluster.Gigalixir.Libcluster.md): Configures libcluster's Kubernetes strategy for clustering on Gigalixir.
  - [Composer.Core.Steps.Cluster.Libcluster](Composer.Core.Steps.Cluster.Libcluster.md): Adds `libcluster` for clustering Elixir nodes.
  - [Composer.Core.Steps.Ecto.BaseSchema](Composer.Core.Steps.Ecto.BaseSchema.md): Generates a `MyApp.Schema` module with sensible primary key and timestamp
defaults. Uses `UUIDv7` for primary keys when the `uuidv7` dependency is
present, `:binary_id` otherwise.

  - [Composer.Core.Steps.Ecto.ForceDrop](Composer.Core.Steps.Ecto.ForceDrop.md): Updates the `ecto.drop` alias in `mix.exs` to use `--force-drop`.
  - [Composer.Core.Steps.Ecto.Uuidv7](Composer.Core.Steps.Ecto.Uuidv7.md): Adds `uuidv7` for time-sortable UUID primary keys. Updates the app's `Schema` module when present.
  - [Composer.Core.Steps.ObanPro](Composer.Core.Steps.ObanPro.md): Adds `oban_pro` for advanced background job processing features. Requires an Oban Pro license.
  - [Composer.Core.Steps.Pg.Extensions](Composer.Core.Steps.Pg.Extensions.md): Generates a migration enabling common PostgreSQL extensions (citext, pg_trgm, unaccent, vector).
  - [Composer.Core.Steps.Pg.Vector](Composer.Core.Steps.Pg.Vector.md): Adds `pgvector` support for vector similarity search in Postgres.
  - [Composer.Core.Steps.Phx.Bun](Composer.Core.Steps.Phx.Bun.md): Replaces the `esbuild` and `tailwind` asset pipeline with `bun`.
  - [Composer.Core.Steps.Phx.MinimalAppLayout](Composer.Core.Steps.Phx.MinimalAppLayout.md): Replaces the `Layouts.app/1` component with a minimal header-and-main layout.
  - [Composer.Core.Steps.Phx.MinimalHomePage](Composer.Core.Steps.Phx.MinimalHomePage.md): Replaces the `phx.new` marketing home page with a minimal starting point,
and updates the generated page controller test to match.
  - [Composer.Core.Steps.Phx.Remixicons](Composer.Core.Steps.Phx.Remixicons.md): Adds Remix Icons as a Tailwind plugin with `remix-#{ICON}` classes.
  - [Composer.Core.Steps.Phx.RemoveAgentsMd](Composer.Core.Steps.Phx.RemoveAgentsMd.md): Removes the `AGENTS.md` file that `phx.new` generates.
  - [Composer.Core.Steps.Phx.RemoveDaisyUi](Composer.Core.Steps.Phx.RemoveDaisyUi.md): Removes the `:daisyui` Mix dependency and the CSS plugin blocks that `phx.new` generates.
  - [Composer.Core.Steps.Phx.RemoveLiveTitleSuffix](Composer.Core.Steps.Phx.RemoveLiveTitleSuffix.md): Removes the `suffix=" · Phoenix Framework"` attribute from `<.live_title>` in the root layout.
  - [Composer.Core.Steps.Phx.RemoveThemeToggle](Composer.Core.Steps.Phx.RemoveThemeToggle.md): Removes the theme toggle that `phx.new` generates: the theme scripts in the
root layout, and the `theme_toggle` component and its usage in `Layouts`.

  - [Composer.Core.Steps.Phx.RemoveTopbar](Composer.Core.Steps.Phx.RemoveTopbar.md): Removes the topbar progress indicator that `phx.new` generates.
  - [Composer.Core.Steps.Phx.TailwindFormatter](Composer.Core.Steps.Phx.TailwindFormatter.md): Generates a formatter that sorts Tailwind CSS classes in HEEx templates.
  - [Composer.Core.Steps.Setup.Credo](Composer.Core.Steps.Setup.Credo.md): Adds `credo` as a dev/test dependency.
  - [Composer.Core.Steps.Setup.DotenvParser](Composer.Core.Steps.Setup.DotenvParser.md): Adds `dotenv_parser` to load environment variables from a `.env` file.
  - [Composer.Core.Steps.Setup.Exsync](Composer.Core.Steps.Setup.Exsync.md): Adds `exsync` to reload modules on file changes.
  - [Composer.Core.Steps.Setup.GeneratorDefaults](Composer.Core.Steps.Setup.GeneratorDefaults.md): Defaults generators to `binary_id` primary keys and `utc_datetime_usec` timestamps, migrations included.
  - [Composer.Core.Steps.Setup.Gitignore](Composer.Core.Steps.Setup.Gitignore.md): Adds macOS system files to `.gitignore`, creating the file if needed.
  - [Composer.Core.Steps.Setup.MixEnvConfig](Composer.Core.Steps.Setup.MixEnvConfig.md): Adds `config :app, env: Mix.env()` to `config.exs` so the environment is readable at runtime.
  - [Composer.Core.Steps.Setup.MixTestWatch](Composer.Core.Steps.Setup.MixTestWatch.md): Adds `mix_test_watch` to automatically run tests on file changes.
  - [Composer.Core.Steps.Setup.Quokka](Composer.Core.Steps.Setup.Quokka.md): Adds `quokka`, a formatter plugin that rewrites code to match your Credo configuration.
  - [Composer.Core.Steps.Setup.SortDeps](Composer.Core.Steps.Setup.SortDeps.md): Sorts the dependencies in `mix.exs` alphabetically by name.
  - [Composer.Core.Steps.Tidewave.TidewaveConfig](Composer.Core.Steps.Tidewave.TidewaveConfig.md): Creates `.mcp.json` pointing at a local Tidewave MCP server.

## Mix Tasks

- [mix composer.completion](Mix.Tasks.Composer.Completion.md): Prints a completion script for bash, zsh or fish.
- [mix composer.cookbook.lint](Mix.Tasks.Composer.Cookbook.Lint.md): Checks the current project's cookbook (in composer itself, `core`)
- [mix composer.cookbook.list](Mix.Tasks.Composer.Cookbook.List.md): Lists every cookbook composer found, with its package and how many steps
and recipes it holds.
- [mix composer.cookbook.manifest](Mix.Tasks.Composer.Cookbook.Manifest.md): Writes `lib/composer/<cookbook>/manifest.exs` for the current project's
cookbook (in composer itself, `core`).
- [mix composer.gen.cookbook](Mix.Tasks.Composer.Gen.Cookbook.md): Scaffolds the current project's cookbook
- [mix composer.gen.recipe](Mix.Tasks.Composer.Gen.Recipe.md): Adds a recipe stub to a recipe group, creating the group file when it
does not exist.
- [mix composer.gen.step](Mix.Tasks.Composer.Gen.Step.md): Scaffolds a step in the current project's cookbook, with every facet
stubbed out, and a test for it.
- [mix composer.index](Mix.Tasks.Composer.Index.md): Rebuilds `_build/composer/index`, the file the completion script reads.
- [mix composer.install](Mix.Tasks.Composer.Install.md): Installs composer. Invoked by igniter via `mix igniter.install composer`.

- [mix composer.new](Mix.Tasks.Composer.New.md): Sets up the current app as a composer cookbook, with a default recipe
listing every built-in step
- [mix composer.recipe.edit](Mix.Tasks.Composer.Recipe.Edit.md): Opens the group file that holds a recipe in your editor, at the line
where the recipe starts.
- [mix composer.recipe.help](Mix.Tasks.Composer.Recipe.Help.md): An alias for `mix composer.recipe.show`.
- [mix composer.recipe.list](Mix.Tasks.Composer.Recipe.List.md): Lists recipes with their shortdocs: your `local:` recipes first, then
every cookbook's.
- [mix composer.recipe.run](Mix.Tasks.Composer.Recipe.Run.md): Resolves a recipe and applies it to the current app as one diff, then
records the run as one git commit.
- [mix composer.recipe.show](Mix.Tasks.Composer.Recipe.Show.md): Shows a recipe's metadata - shortdoc, doc and flags - and its fully
expanded, numbered step list, with the recipe each step came from and
the include flags that gate it.
- [mix composer.step.edit](Mix.Tasks.Composer.Step.Edit.md): Opens the source file of a step in your editor, at its
`use Composer.Step` line.
- [mix composer.step.find](Mix.Tasks.Composer.Step.Find.md): Searches step ids, summaries and tags, case-insensitively. Steps whose id
matches come first.
- [mix composer.step.help](Mix.Tasks.Composer.Step.Help.md): An alias for `mix composer.step.show`.
- [mix composer.step.list](Mix.Tasks.Composer.Step.List.md): Lists the steps of every cookbook, optionally filtered.
- [mix composer.step.run](Mix.Tasks.Composer.Step.Run.md): Runs one or more steps, as one diff.
- [mix composer.step.show](Mix.Tasks.Composer.Step.Show.md): Shows a step's summary, facets, `requires`, `provides` and `conflicts`,
then dry-runs it against the current project to report the files it
touches and the dependencies it adds. Nothing is written.

- Editor
  - [mix composer.lsp](Mix.Tasks.Composer.Lsp.md): Starts `composer-ls`, the language server for recipe group files, on
stdio. Your editor runs it; see the Composer LSP guide.

