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
| Flag | Shorthand | Type | Description |
|---|---|---|---|
--name <name> | -n | String | Application name (defaults to current directory name or package.json name). |
--port <port> | -p | Number | Container target port (auto-detected from Dockerfile EXPOSE or framework defaults). |
--domain <domain> | -d | String | Custom domain(s) to attach to production (repeatable or comma-separated). |
--force | -f | Boolean | Overwrite 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 initSample 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 -f4. 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.goforhttp.ListenAndServe(":8080", ...). - Rust / Actix / Axum: Inspects
main.rsfor bind ports.