.env -> .env.local

This commit is contained in:
Michael Fan
2026-03-26 16:57:47 -04:00
parent 62d24d13e3
commit 9b034e7b46
4 changed files with 8 additions and 8 deletions
+5 -5
View File
@@ -36,7 +36,7 @@ pub(crate) fn start_command(
return Ok(existing_shell_api_key_message());
}
let dotenv_path = cwd.join(".env");
let dotenv_path = cwd.join(".env.local");
let start_hint = format!(
"Codex will save {OPENAI_API_KEY_ENV_VAR} to {path} and hot-apply it here when allowed.",
path = dotenv_path.display()
@@ -129,7 +129,7 @@ fn live_apply_api_key(
) -> LiveApplyOutcome {
if matches!(forced_login_method, Some(ForcedLoginMethod::Chatgpt)) {
return LiveApplyOutcome::Skipped(format!(
"Saved {OPENAI_API_KEY_ENV_VAR} to .env, but left this session unchanged because ChatGPT login is required here."
"Saved {OPENAI_API_KEY_ENV_VAR} to .env.local, but left this session unchanged because ChatGPT login is required here."
));
}
@@ -200,7 +200,7 @@ mod tests {
project_api_key: "sk-proj-123".to_string(),
access_token: "oauth-access-123".to_string(),
},
Path::new("/tmp/workspace/.env"),
Path::new("/tmp/workspace/.env.local"),
LiveApplyOutcome::Applied,
);
@@ -219,9 +219,9 @@ mod tests {
project_api_key: "sk-proj-123".to_string(),
access_token: "oauth-access-123".to_string(),
},
Path::new("/tmp/workspace/.env"),
Path::new("/tmp/workspace/.env.local"),
LiveApplyOutcome::Skipped(
"Saved OPENAI_API_KEY to .env, but left this session unchanged because ChatGPT login is required here."
"Saved OPENAI_API_KEY to .env.local, but left this session unchanged because ChatGPT login is required here."
.to_string(),
),
);
+1 -1
View File
@@ -83,7 +83,7 @@ impl SlashCommand {
// SlashCommand::Undo => "ask Codex to undo a turn",
SlashCommand::Quit | SlashCommand::Exit => "exit Codex",
SlashCommand::Diff => "show git diff (including untracked files)",
SlashCommand::ApiProvision => "provision an API key and save it to .env",
SlashCommand::ApiProvision => "provision an API key and save it to .env.local",
SlashCommand::Copy => "copy the latest Codex output to your clipboard",
SlashCommand::Mention => "mention a file",
SlashCommand::Skills => "use skills to improve how Codex performs specific tasks",
@@ -3,4 +3,4 @@ source: tui/src/api_provision.rs
assertion_line: 192
expression: render_cell(&cell)
---
• Provisioned an API key for Default Org / Default Project and saved OPENAI_API_KEY to /tmp/workspace/.env. Updated this session to use the newly provisioned API key without touching auth.json.
• Provisioned an API key for Default Org / Default Project and saved OPENAI_API_KEY to /tmp/workspace/.env.local. Updated this session to use the newly provisioned API key without touching auth.json.
@@ -3,4 +3,4 @@ source: tui/src/api_provision.rs
assertion_line: 214
expression: render_cell(&cell)
---
• Provisioned an API key for org-default / proj-default and saved OPENAI_API_KEY to /tmp/workspace/.env. Saved OPENAI_API_KEY to .env, but left this session unchanged because ChatGPT login is required here.
• Provisioned an API key for org-default / proj-default and saved OPENAI_API_KEY to /tmp/workspace/.env.local. Saved OPENAI_API_KEY to .env.local, but left this session unchanged because ChatGPT login is required here.