Skip to content

feat(cli): default to envilder.json when --map is omitted #226

Description

@macalbert

Summary

When the user runs envilder without --map, the CLI should automatically look for envilder.json in the current working directory. Similarly, --envfile should default to .env.

This enables the zero-config experience:

# Before (explicit paths required)
envilder --map=envilder.json --envfile=.env

# After (convention-based defaults)
envilder

Behavior

  1. If --map is not provided → look for envilder.json in cwd
  2. If envilder.json does not exist → clear error: No map file found. Provide --map or create envilder.json in the current directory.
  3. If --envfile is not provided → default to .env

Context

Follows from #216 (naming convention) and future SchemaStore integration (#222). Once envilder.json is the recognized standard name, the CLI should leverage it as the default.

Acceptance Criteria

  • envilder with no args finds envilder.json and generates .env
  • envilder --push with no --map finds envilder.json
  • Clear error message when no envilder.json exists and --map is omitted
  • --map flag still overrides the default
  • Help text updated to reflect optional nature of --map
  • E2E test covering the default behavior
  • Update docs/pull-command.md and docs/push-command.md to document the new defaults
  • Update README.md usage examples to show the zero-config experience
  • Update github-action/README.md if applicable
  • Update website i18n strings and components (GetStarted, HowItWorks) to reflect simpler commands

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

Status
In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions