From 19590766b9d9a05fb53e8671d53ce8b15454e0f9 Mon Sep 17 00:00:00 2001 From: pomelo-nwu Date: Fri, 12 Sep 2025 15:48:28 +0800 Subject: [PATCH] feat: update docs --- docs/cli/configuration.md | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/docs/cli/configuration.md b/docs/cli/configuration.md index 0c3a4ddd..c88aa7e4 100644 --- a/docs/cli/configuration.md +++ b/docs/cli/configuration.md @@ -23,11 +23,6 @@ Qwen Code uses `settings.json` files for persistent configuration. There are thr - **Project settings file:** - **Location:** `.qwen/settings.json` within your project's root directory. - **Scope:** Applies only when running Qwen Code from that specific project. Project settings override user settings. -- **System settings file:** - - **Location:** `/etc/qwen-code/settings.json` (Linux), `C:\ProgramData\qwen-code\settings.json` (Windows) or `/Library/Application Support/QwenCode/settings.json` (macOS). The path can be overridden using the `QWEN_CODE_SYSTEM_SETTINGS_PATH` environment variable. - - **Scope:** Applies to all Qwen Code sessions on the system, for all users. System settings override user and project settings. May be useful for system administrators at enterprises to have controls over users' Qwen Code setups. - -**Note on environment variables in settings:** String values within your `settings.json` files can reference environment variables using either `$VAR_NAME` or `${VAR_NAME}` syntax. These variables will be automatically resolved when the settings are loaded. For example, if you have an environment variable `MY_API_TOKEN`, you could use it in `settings.json` like this: `"apiKey": "$MY_API_TOKEN"`. ### The `.qwen` directory in your project @@ -369,35 +364,16 @@ The CLI automatically loads environment variables from an `.env` file. The loadi **Environment Variable Exclusion:** Some environment variables (like `DEBUG` and `DEBUG_MODE`) are automatically excluded from project `.env` files by default to prevent interference with the CLI behavior. Variables from `.qwen/.env` files are never excluded. You can customize this behavior using the `excludedProjectEnvVars` setting in your `settings.json` file. -- **`QWEN_API_KEY`**: - - Your API key for the Qwen API. +- **`OPENAI_API_KEY`**: - One of several available [authentication methods](./authentication.md). - Set this in your shell profile (e.g., `~/.bashrc`, `~/.zshrc`) or an `.env` file. -- **`QWEN_MODEL`**: - - Specifies the default Qwen model to use. +- **`OPENAI_BASE_URL`**: + - One of several available [authentication methods](./authentication.md). + - Set this in your shell profile (e.g., `~/.bashrc`, `~/.zshrc`) or an `.env` file. +- **`OPENAI_MODEL`**: + - Specifies the default OPENAI model to use. - Overrides the hardcoded default - - Example: `export QWEN_MODEL="qwen3-coder-plus"` -- **`GOOGLE_API_KEY`**: - - Your Google Cloud API key. - - Required for using Vertex AI in express mode. - - Ensure you have the necessary permissions. - - Example: `export GOOGLE_API_KEY="YOUR_GOOGLE_API_KEY"`. -- **`GOOGLE_CLOUD_PROJECT`**: - - Your Google Cloud Project ID. - - Required for using Code Assist or Vertex AI. - - If using Vertex AI, ensure you have the necessary permissions in this project. - - **Cloud Shell Note:** When running in a Cloud Shell environment, this variable defaults to a special project allocated for Cloud Shell users. If you have `GOOGLE_CLOUD_PROJECT` set in your global environment in Cloud Shell, it will be overridden by this default. To use a different project in Cloud Shell, you must define `GOOGLE_CLOUD_PROJECT` in a `.env` file. - - Example: `export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"`. -- **`GOOGLE_APPLICATION_CREDENTIALS`** (string): - - **Description:** The path to your Google Application Credentials JSON file. - - **Example:** `export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/credentials.json"` -- **`OTLP_GOOGLE_CLOUD_PROJECT`**: - - Your Google Cloud Project ID for Telemetry in Google Cloud - - Example: `export OTLP_GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"`. -- **`GOOGLE_CLOUD_LOCATION`**: - - Your Google Cloud Project Location (e.g., us-central1). - - Required for using Vertex AI in non express mode. - - Example: `export GOOGLE_CLOUD_LOCATION="YOUR_PROJECT_LOCATION"`. + - Example: `export OPENAI_MODEL="qwen3-coder-plus"` - **`QWEN_SANDBOX`**: - Alternative to the `sandbox` setting in `settings.json`. - Accepts `true`, `false`, `docker`, `podman`, or a custom command string.