Quickstart
View SourceMake Claude Code write production-ready Elixir, automatically.
This guide gets you from zero to format-checking, error-detecting Elixir code quickly.
What You'll Build
In this quickstart, you'll:
- Watch Claude Code detect formatting issues in code with long lines
- See compilation errors caught in real-time
- Experience the productivity boost firsthand
Prerequisites
- Elixir 1.18+ installed
- Claude Code CLI installed (install guide)
- An Elixir project
Step 1: Install Claude
Run this single command:
mix igniter.install claude
When prompted:
- Press
Yto install Igniter (if not already installed) - Press
Yto apply all changes
This automatically:
- ✅ Adds Claude to your dependencies
- ✅ Creates
.claude.exsconfiguration - ✅ Installs formatting and compilation hooks
- ✅ Sets up
.claude/directory structure
Step 2: Test Format Checking
Ask Claude Code to create a file with long lines:
Please create a file called lib/user_service.ex with this exact content:
defmodule UserService do
def format_user_info(user) do
"User: #{user.first_name} #{user.last_name} (#{user.email}) - Role: #{user.role}, Department: #{user.department}, Status: #{user.status}"
end
def build_response(user, account, preferences) do
{:ok, %{user_id: user.id, account_id: account.id, name: user.name, email: user.email, preferences: preferences, created_at: user.created_at, updated_at: user.updated_at}}
end
endWatch the feedback! Claude will create the file, and immediately:
- 🎨 Format checking runs
- ⚠️ Claude is alerted that the file needs formatting (lines too long)
- 🔧 Claude can run
mix formatto fix it
If Claude formats the file, it will look like:
defmodule UserService do
def format_user_info(user) do
"User: #{user.first_name} #{user.last_name} (#{user.email}) - Role: #{user.role}, Department: #{user.department}, Status: #{user.status}"
end
def build_response(user, account, preferences) do
{:ok,
%{
user_id: user.id,
account_id: account.id,
name: user.name,
email: user.email,
preferences: preferences,
created_at: user.created_at,
updated_at: user.updated_at
}}
end
endStep 3: Experience Compilation Checking
Ask Claude Code to introduce an error:
Please edit lib/user_service.ex and add a typo - change 'preferences' to 'preferenses'
in the build_response functionWatch what happens:
- ❌ Compilation error detected immediately
- 🔍 Error details shown to Claude
- 🔧 Claude can fix it automatically
You'll see feedback like:
Compilation failed with warnings/errors:
** (CompileError) lib/user_service.ex:7: undefined variable "preferenses"Step 4: Try Pre-Commit Protection
Ask Claude Code to commit code with issues:
Please commit all changes with a descriptive messageIf there are any formatting issues, compilation errors, or unused dependencies, Claude will:
- 🛑 Block the commit
- 📋 Show what needs fixing
- 🔄 Help resolve issues before committing
What Just Happened?
You've just experienced Claude's core features:
- Format Checking - Every
.exand.exsfile is checked for proper formatting - Instant Compilation Checks - Errors caught before they reach production
- Pre-Commit Validation - Only clean code gets committed
- Intelligent Feedback - Claude sees and can fix issues automatically
Next Steps
Enable More Features
- Configure Additional Hooks - Enable related files suggestions and more
- Create Sub-Agents - Build specialized AI assistants for your project
- Phoenix MCP Server - Add
mcp_servers: [:tidewave]to your.claude.exs
Learn More
Troubleshooting
Claude hooks not running?
- Run
claude --versionto verify Claude Code CLI is installed - Check
.claude/settings.jsonexists - Try
mix claude.installto reinstall hooks
Can't install Igniter?
- Ensure you're using Elixir 1.18 or later
- Run
mix deps.getafter manual installation
Need help?
🎉 Congratulations! You're now using Claude to write better Elixir code, automatically.