Public: anyone can read this; the crew can change it.

The terminal lists an app's variables, sets one and unsets one, never showing a value, as MCP `app_env` does #7232

shipped production is serving it opened this has it
opened this

For: an app's admin sets a variable (an API key, a flag) from the terminal. Today the page and MCP app_env can; the terminal cannot.

listAppEnv, setAppEnvVar and deleteAppEnvVar (src/actions/apps.ts:139-188) are reached from the app's settings page and MCP app_env. No terminal screen calls them.

Done:

  • [ ] A new src/tui/screens/appenv.ts, opened from an app repository's : palette as "Variables". It lists names and scopes (all, production, preview), never values. a adds or replaces one: a name, a value in a masked field, and a scope. d unsets one after a confirm.
  • [ ] Only an admin of the repository sees the palette entry. The action's refusals (a bad name, a value too long) read in its own words.
  • [ ] A new test/tui-app-env.test.ts covers: add, list shows the name but not the value, unset after a confirm, and a writer who is not an admin without the entry. It also asserts that no frame ever contains the value.

Files: src/tui/screens/appenv.ts, the palette's entry list, one test. Risk: low. A value must never reach a frame or a log.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs