From 351e94cdb1eb41009d4f94c7b2fd14586118c953 Mon Sep 17 00:00:00 2001 From: "Aryan Singh K." <70511529+aryansk@users.noreply.github.com> Date: Fri, 14 Aug 2026 23:07:05 +0530 Subject: [PATCH] docs: point setup instructions at ~/.gcode/.env The README and CONTRIBUTING told users to copy .env.example to a project-root .env, but GCode only loads keys from ~/.gcode/.env (gcode/setup.py load_env). Align the Setup section, the Quick Setup commands, and the .env.example header comment with the path the app actually reads. The missing-key error already points at ~/.gcode/.env. Fixes #52. --- .env.example | 1 + CONTRIBUTING.md | 5 +++-- README.md | 10 +++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 225b588..76c4c1d 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,3 @@ # OpenRouter API key (https://openrouter.ai/keys). OPENAI_API_KEY also accepted. +# Copy this file to ~/.gcode/.env, then edit the key value. OPENROUTER_API_KEY=sk-or-your-openrouter-key-here diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 179aee8..773c79d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,11 +8,12 @@ git clone https://github.com/shauryagangrade/GCode.git cd GCode pip install -e . -cp .env.example .env +mkdir -p ~/.gcode && cp .env.example ~/.gcode/.env gcode ``` -You will need an OpenRouter API key. Copy the `.env.example` file, name it `.env`, and fill in your `OPENROUTER_API_KEY`. +You will need an OpenRouter API key. Copy the `.env.example` file to +`~/.gcode/.env` and fill in your `OPENROUTER_API_KEY`. --- diff --git a/README.md b/README.md index 4a972dd..907536a 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,15 @@ pip install -e . ## Setup -Copy `.env.example` to `.env` and add your OpenRouter API key: +GCode reads your API key from `~/.gcode/.env` (not a project-root `.env`). +Create it from the template and add your OpenRouter API key: + +```bash +mkdir -p ~/.gcode +cp .env.example ~/.gcode/.env +``` + +Then edit `~/.gcode/.env`: ``` OPENROUTER_API_KEY=sk-or-...