API Reference svelixir v#0.2.0

Copy Markdown

Modules

Documentation for Svelixir.

Argument parsing and config-path validation for mix svelixir.new.

Loads, parses, and validates the Svelixir TOML configuration file.

API asset configuration.

Frontend and API asset configuration.

Authentication strategy configuration.

Cache layer configuration within the container.

Infrastructure container configuration.

Optional feature flags.

Top-level optional configuration block.

OTP-project-specific generation flags.

Project identity fields.

Security tooling configuration within the container.

Inline scripts/bump-version.sh template.

Inline cliff.toml template.

Inline configuration templates.

Inline coveralls.json template.

Inline .credo.exs template.

Inline .doctor.exs template.

Inline dprint.json template.

Inline lefthook.yml template.

Inline MIT LICENSE template.

Inline base Ecto.Migration wrapper template and its citext bootstrap migration.

Inline templates for a generated OTP project's config/ directory (mix new creates none of these; mix phx.new already creates all 5).

Inline README.md template.

Inline Ecto Repo module template.

Inline base Ecto.Schema wrapper template.

Inline .sobelow-conf template (web projects only).

Parses configuration and executes generation tasks using Igniter.

Runs the non-feature-related generation tasks (project structure, config, container, assets) against the igniter. Template (project structure), Deps (quality-gate/test-support dependencies), Config (quality-gate dotfiles), OtpRepo (Repo/Schema/Migration baseline), DevSecrets (.env.dev), Docs (guidance docs), Readme (LICENSE + README.md), and GitTooling (lefthook/dprint/git-cliff + git_ops config) are currently wired up.

Writes the baseline quality-gate dotfiles every svelixir project gets: .credo.exs, .doctor.exs, coveralls.json, and (type=web only) .sobelow-conf.

Adds the baseline quality-gate and test-support dependencies every svelixir project gets regardless of options, and pins the Elixir version floor to ~> 1.20. type=web projects additionally get sobelow -- Config already writes .sobelow-conf for type=web projects, and docker's own generated CI runs mix sobelow --config, so the dependency itself must exist too, not just its config file. project.otp.repo=true additionally gets uniq (UUIDv7 generation for OtpRepo's Schema convention, both project types); type=otp also gets ecto_sql/postgrex -- type=web already has both via mix phx.new.

Copies project.dev_secrets in as .env.dev and adds it to .gitignore. A blank or absent project.dev_secrets is silently skipped; a path that's set but unreadable is a real issue.

Copies svelixir's .claude/ guidance docs (Karpathy instructions, process invariants, git-flow, quality gates, etc.) into every generated project, unchanged by config.

Writes git/commit tooling config (lefthook, dprint, git-cliff, the version-bump script) and wires git_ops into dev.exs.

When project.otp.repo=true: creates the {Module}.Schema/{Module}.Migration base conventions (UUIDv7 primary keys, :utc_datetime_usec timestamps, citext) and a bootstrap citext-enabling migration, for both type=otp and type=web. type=otp projects additionally get {Module}.Repo, wired into the --sup-generated Application's supervision tree, ecto_repos config, and local-Postgres dev/test connection defaults (matching mix phx.new's own convention) -- type=web already gets all of that for free from mix phx.new itself.

Writes the MIT LICENSE and a templated README.md (task-command table + type-aware setup instructions) for every generated project.

Creates the base project structure using Mix generators.

Mix Tasks

Generates the base project structure (via mix new/mix phx.new) from a Svelixir TOML config, skipping feature, container, asset, and auth wiring.

Writes a boilerplate config.toml to the current directory.

Generates a new project from a Svelixir TOML config.