Skip to content

Repository files navigation

init-elixir

A "Hello Elixir World" starter template: mix new --sup plus the full quality-gate toolchain, ready from the first commit. Point new Elixir projects at this repo instead of re-assembling the setup each time.

What's included

Piece Purpose
mix precommit alias Mutating local gate: compile -Werror, prune unused deps, mix format, credo --strict, ex_dna, tests
mix ci alias Non-mutating superset CI runs: adds hex.audit, deps.audit, format/unused-deps checks, and reach.check --arch --smells
Credo + ex_slop Linting plus 40 checks for LLM-generated code patterns
ex_dna Duplication ratchet — new clones fail CI (.ex_dna.exs)
reach Architecture policy (.reach.exs: no String.to_atom; add layers as you grow) and a structural-smell baseline (.reach.baseline.json)
dialyxir Dialyzer with PLTs in priv/plts (gitignored, cached in CI)
mix_audit Dependency vulnerability audit
.github/workflows/ci.yml Three jobs: mix ci, mix test, mix dialyzer — with deps + PLT caching
.github/workflows/release.yml Auto-creates a v<version> GitHub release when version: in mix.exs is bumped on main
AGENTS.md Guidance for coding agents: tooling guide, Elixir conventions, test rules
CONTRIBUTING.md Dev setup, quality gates, PR flow
test/test_helper.exs Excludes :integration-tagged tests by default

Starting a new project from this template

  1. Clone (or use as a GitHub template repo), then rename the app:

    git clone <this-repo> my_app && cd my_app
    grep -rl --exclude-dir=.git -e init_elixir -e InitElixir -e init-elixir . |
      xargs sed -i '' -e 's/init_elixir/my_app/g' -e 's/InitElixir/MyApp/g' -e 's/init-elixir/my-app/g'
    git mv lib/init_elixir.ex lib/my_app.ex
    git mv lib/init_elixir lib/my_app
    git mv test/init_elixir_test.exs test/my_app_test.exs
  2. Rewrite this README.md and the first paragraph of AGENTS.md to describe the actual project.

  3. Verify everything is green:

    mix deps.get
    mix test
    mix ci

Development

Requires Elixir ~> 1.20.

mix deps.get
mix test         # fast suite; add --include integration for everything
mix precommit    # format + full local quality gate before committing

See CONTRIBUTING.md for quality gates and AGENTS.md for codebase tooling.

About

Preferred setup for an Elixir project in 2026

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages