Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

add explanation on how to add OPENAI_API_KEY to docs (#28)

Hugob84075aa64b7
diff --git a/README.md b/README.md
index 1a8c246010..b82e79c1ea 100644
--- a/README.md
+++ b/README.md
@@ -47,6 +47,14 @@ Install globally:
npm install -g @openai/codex
```
+Next, set your OpenAI API key as an environment variable:
+
+```bash
+export OPENAI_API_KEY="your-api-key-here"
+```
+
+> **Note:** This command sets the key only for your current terminal session. To make it permanent, add the `export` line to your shell's configuration file (e.g., `~/.zshrc`).
+
Run interactively:
```shell