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-...