Skip to content

Guarded .env.local write-back + structured project editor - #2

Merged
terminalis merged 1 commit into
mainfrom
write-env-local-and-editor
Jun 13, 2026
Merged

Guarded .env.local write-back + structured project editor#2
terminalis merged 1 commit into
mainfrom
write-env-local-and-editor

Conversation

@terminalis

Copy link
Copy Markdown
Owner

What

This branch adds two app capabilities and finishes with a site/brand polish.

Guarded write-back to .env*.local (src-tauri, ui)

Hand values back out to a .env*.local file the user explicitly chooses — merge into an existing file or write fresh — or scaffold one from a .env.example. The write is guarded: it only ever targets a .env*.local (never a committed example file). New backend modules envfile.rs and envpath.rs handle parsing and path validation; surfaced through commands.rs / api.js.

Build or edit a project by hand (ui)

A structured editor to create or edit a project key by key — with or without an .env file — including KEY=value rows with an export toggle, comments, and seeding from a .env.example. Nothing is written to disk unless the user chooses to. Includes selftest.js and mock.js coverage.

Docs + site

  • README.md and index.html document the .env.local write, scaffold, and editor.
  • Refreshed the gallery screenshots and alt text. Two shots changed identity: screenshot 03 is now the "New project by hand" dialog (was Settings) and 04 is now Settings (was "Export a copy"). Alt text and captions were rewritten to match; 01/02 were unchanged. All four remain 1122×751.
  • Replaced the demo-screenshot OG image with a purpose-built 1200×630 brand card at brand/og-image.png, generated by a new tools/make-og.ps1 (a sibling of tools/make-icon.ps1, same System.Drawing approach + vault-dark palette + key-bar/masked-dots motif). og:image / twitter:image repointed, dimensions updated to 1200×630, and og:image:alt rewritten. demo.png stays in use by the README and the JSON-LD screenshot list.

Notes for reviewers

  • The write-back invariant is the security-sensitive part: confirm it can only target .env*.local and never an example/committed file. See envpath.rs and the write path in commands.rs.
  • brand/ is git-tracked and served at the GitHub Pages root, so https://envarsa.dev/brand/og-image.png resolves once deployed.
  • Regenerate the OG card any time with powershell -File tools\make-og.ps1.

🤖 Generated with Claude Code

Re-captured the four gallery screenshots. Two of them changed identity:
03 is now the "New project by hand" dialog (was Settings/Protection) and
04 is now Settings (was "Export a copy"). Rewrote their alt text and
captions to match; 01 and 02 were unchanged and left as-is. All four are
still 1122x751, so the hardcoded width/height stay correct.

Replaced the demo-screenshot Open Graph image with a purpose-built
1200x630 brand card (brand/og-image.png), generated by tools/make-og.ps1
— a sibling of tools/make-icon.ps1 using the same System.Drawing approach,
vault-dark palette, and key-bar/masked-dots motif. Repointed og:image and
twitter:image, updated og:image:width/height to 1200/630, and rewrote
og:image:alt to describe the card. demo.png stays in use by the README
and the JSON-LD screenshot list.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@terminalis
terminalis merged commit 1084823 into main Jun 13, 2026
@terminalis
terminalis deleted the write-env-local-and-editor branch June 13, 2026 10:56
@terminalis
terminalis restored the write-env-local-and-editor branch June 13, 2026 11:05
@terminalis
terminalis deleted the write-env-local-and-editor branch June 13, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant