From 603def0c7ad19cd2f1955e17120d0ddebdc7043a Mon Sep 17 00:00:00 2001 From: Dan Lewis Date: Thu, 17 Apr 2025 12:29:57 -0800 Subject: [PATCH] docs: mention dotenv support in Quickstart (#262) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a note in Quickstart that you can drop your API key into a `.env` file (since dotenv support was introduced in 40266be #122). ✅ Ran `npm test && npm run lint && npm run typecheck` locally I have read the CLA Document and I hereby sign the CLA Signed-off-by: Dan Lewis --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index abb505a1..7b3f1325 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,13 @@ Next, set your OpenAI API key as an environment variable: 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`). + > **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`). + > + > **Tip:** You can also place your API key into a `.env` file at the root of your project: + > ```env + > OPENAI_API_KEY=your-api-key-here + > ``` + > The CLI will automatically load variables from `.env` (via `dotenv/config`). Run interactively: