memorix icon indicating copy to clipboard operation
memorix copied to clipboard

Don't override .env.example if it exists

Open amr opened this issue 7 months ago • 1 comments

Memorix overwrote my existing .env.example after memorix init.

One proposal: if .env.example exists, use .env.memorix-example or just default to it.

amr avatar Apr 25 '26 04:04 amr

Thanks, this is a real bug. I patched it locally and validated it with focused tests.

What changed:

  • memorix init no longer overwrites an existing .env.example
  • if the target project already has .env.example, Memorix now writes its template to .env.memorix-example instead
  • the follow-up prompt now references whichever template file was actually created

Validation:

  • added a focused test for template target selection
  • npm run lint passes

I will carry this into the next patch so Memorix stops stepping on project-owned env templates.

AVIDS2 avatar Apr 28 '26 13:04 AVIDS2