Environment variables — CodeAgent Mobile Wiki
The CodeAgent Mobile Wiki

Every feature, explained — organized by the path you actually take: set up, launch a session, supervise the run, ship the PR.

Free

Environment variables

View, add, edit, and delete the project's .env from the app, then restart the preview.

01 · OPENMasked
Session settings
  • Environment Variables
02 · EDITEditing
.env rows
  • View, add, edit, delete
03 · SAVESaved
Safely saved
  • Confirm if a preview is running
04 · RESTARTRestarted
Preview picks it up
  • Only if one was already running

No more SSH-ing in to edit a .env file by hand. From a session's settings, open Environment Variables to see every variable in the project's .env, add new ones, edit existing values, or delete rows — values are masked by default, with a per-row reveal when you need to check one. Save, and if a preview is already running, CodeAgent offers to restart it so the change takes effect immediately.

Masked by default

Existing values are hidden until you reveal them row by row — new rows you add start revealed so you can check what you typed.

Safe to save

Saving rewrites the .env file safely, so a crash or interrupted write can't leave it half-written.

Restart the preview

If a preview is running when you save, CodeAgent asks to restart it so the dev server picks up the new values.

No install needed

It only needs a connected session — Preview doesn't have to have run first.

  1. 1
    Open session settings

    From a session, open the kebab menu and tap Environment Variables.

  2. 2
    View or edit

    Reveal a masked value, edit it in place, add a new row, or delete one.

  3. 3
    Save

    If a preview is running, confirm the restart prompt — otherwise it's saved straight away.

  4. 4
    Preview restarts (if needed)

    The dev server restarts with the updated variables; a success toast confirms the save.

NOTE

Comments in the .env file are not preserved — saving rewrites the file from the variable list, so keep notes elsewhere.

FAQ

Related

Ready to try it?