Allow importing environment variables via file upload or paste - Codex Web

Resolved 💬 2 comments Opened Feb 21, 2026 by hlemonnier Closed May 10, 2026

Description

In Codex Web, adding secrets/environment variables one by one is tedious and error-prone. For projects with many variables (e.g., .env files), this becomes frustrating and slows setup significantly.

It would be much better to support bulk input, either by:

  • Drag & drop of a .env file
  • Uploading a file
  • Pasting raw environment variable text

Problem / Motivation

Many projects already define environment variables in a standard .env format, for example:

DATABASE_URL=postgres://...
REDIS_URL=redis://...
JWT_SECRET=superlongsecret
STRIPE_API_KEY=sk_live_...

Re-entering these manually in the UI:

  • Is time-consuming
  • Increases risk of typos
  • Discourages proper secret hygiene
  • Makes onboarding painful for larger projects

This is especially frustrating when migrating an existing project into Codex Web.

Expected Behavior

Users should be able to:

  • Upload a .env file
  • Drag & drop a file into the secrets UI
  • Or paste multiple lines of KEY=VALUE pairs

The system should:

  • Parse valid KEY=VALUE lines
  • Ignore comments (# comment)
  • Validate key format
  • Show a preview before saving
  • Prevent accidental overwrites (warn if a key already exists)

Acceptance Criteria

  • Multiple secrets can be added in one action
  • Standard .env format is supported
  • Invalid lines are clearly reported
  • Users can confirm before applying changes
  • Existing secrets are not silently overwritten

Nice-to-haves

  • Option to merge vs replace existing variables
  • Highlight duplicates before confirming
  • Basic format validation (e.g., invalid key names)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗