Explita InfraExplita Infra
DeployCLI Reference

eda init

Interactive initialization, project scaffolding, and automatic Docker port detection

eda init

The eda init command scaffolds an explita.json configuration file in your project directory. It inspects your project files (such as Dockerfile, package.json, or environment files) to auto-detect application name, framework, and listening ports.

eda init [options]
explita deploy init [options]

1. Options

FlagShorthandTypeDescription
--name <name>-nStringApplication name (defaults to current directory name or package.json name).
--port <port>-pNumberContainer target port (auto-detected from Dockerfile EXPOSE or framework defaults).
--domain <domain>-dStringCustom domain(s) to attach to production (repeatable or comma-separated).
--force-fBooleanOverwrite existing explita.json if one is already present.

2. Interactive Scaffolding Workflow

When run without flags in an interactive terminal, eda init prompts for essential parameters:

eda init

Sample Interactive Output:

⚙️  Initializing Explita Deploy project...
? Application name: (my-next-app)
? Detected port 3000 from Dockerfile EXPOSE. Use this port? (Y/n) y
? Attach a custom production domain? (e.g. app.example.com): myapp.com
✓ Created explita.json
💡 Run 'eda' to deploy your application to the remote server!

3. Non-Interactive / Scripted Initialization

Initialize a project in continuous integration or automation scripts without interactive prompts:

eda init -n payment-api -p 8080 -d api.payments.internal -f

4. Generated Configuration File (explita.json)

eda init creates a declarative configuration file at the root of your project similar to the following:

{
  "$schema": "https://infra.explita.ng/config/schema.json",
  "deploy": {
    "name": "payment-api",
    "port": 8080
  }
}

Supported Auto-Detection Engines:

  • Dockerfile: Inspects EXPOSE <port> directives.
  • Node.js (package.json): Detects Next.js (3000), Remix (3000), Vite (5173), NestJS (3000), Express (3000/8080).
  • Python: Detects FastAPI / Uvicorn (8000), Django (8000), Flask (5000).
  • Go: Inspects main.go for http.ListenAndServe(":8080", ...).
  • Rust / Actix / Axum: Inspects main.rs for bind ports.

On this page