mix ectomancer.setup (Ectomancer v1.2.1)

Copy Markdown View Source

Interactive setup tool for Ectomancer.

This Mix task provides an interactive workflow to configure Ectomancer in your Phoenix/Ecto project. It automatically discovers Ecto schemas, generates the necessary configuration, and updates your project files.

Usage

mix ectomancer.setup

Workflow

  1. Checks for required dependencies (ecto, plug)
  2. Scans for Ecto schemas in the project
  3. Prompts user to select which schemas to expose
  4. Asks about optional features (Oban bridge, custom namespace)
  5. Generates MCP module and updates configuration files
  6. Provides next steps for the user

Examples

$ mix ectomancer.setup
🔍 Scanning for Ecto schemas...
Found 3 schemas:
  ✓ MyApp.Accounts.User
  ✓ MyApp.Blog.Post
  ✓ MyApp.Blog.Comment

? Select schemas to expose (comma-separated numbers, e.g., 1,2,3)
> 1,2
? Include Oban bridge? (y/N)
> n
? Tool namespace? (e.g., 'MyApp', leave empty for none)
>

Return Codes

  • 0 - Success
  • 1 - No schemas found or no schemas selected
  • 2 - File generation error
  • 3 - Missing required dependencies