Skip to content

Commit f47a251

Browse files
committed
docs: document environment variable configuration in installation guide
- Add documentation for configurable environment variables in install script, including their names, default values, and descriptions, with examples in English, Simplified Chinese, and Traditional Chinese - Minor wording improvements in installation instructions for Chinese documents Signed-off-by: appleboy <[email protected]>
1 parent bdb06c4 commit f47a251

File tree

3 files changed

+51
-3
lines changed

3 files changed

+51
-3
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ English | [繁體中文](./README.zh-tw.md) | [简体中文](./README.zh-cn.md)
1717
- [macOS](#macos)
1818
- [Windows](#windows)
1919
- [Using install script](#using-install-script)
20+
- [Configurable Environment Variables](#configurable-environment-variables)
2021
- [Pre-compiled Binaries](#pre-compiled-binaries)
2122
- [From Source](#from-source)
2223
- [Using vscode devcontainer](#using-vscode-devcontainer)
@@ -97,6 +98,21 @@ chmod +x install.sh
9798
./install.sh
9899
```
99100

101+
#### Configurable Environment Variables
102+
103+
| Variable Name | Default Value | Description |
104+
| ------------- | ------------------ | ---------------------------------- |
105+
| VERSION | 0.16.1 | The CodeGPT version to install |
106+
| INSTALL_DIR | $HOME/.codegpt/bin | Installation directory |
107+
| CURL_INSECURE | false | Skip SSL verification (true/false) |
108+
109+
Example usage:
110+
111+
```sh
112+
# Install a specific version to a custom directory
113+
VERSION=0.15.0 INSTALL_DIR=/opt/codegpt ./install.sh
114+
```
115+
100116
The script will:
101117

102118
1. Detect your OS and architecture

README.zh-cn.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- [功能](#功能)
1616
- [安装](#安装)
1717
- [使用安装脚本](#使用安装脚本)
18+
- [可配置的环境变量](#可配置的环境变量)
1819
- [从源码安装](#从源码安装)
1920
- [使用 VSCode Devcontainer](#使用-vscode-devcontainer)
2021
- [配置](#配置)
@@ -75,17 +76,32 @@ choco install codegpt
7576
### 使用安装脚本
7677

7778
```sh
78-
# 下载并执行安装脚本
79+
# 下载并运行安装脚本
7980
bash < <(curl -sSL https://raw.githubusercontent.com/appleboy/CodeGPT/main/install.sh)
8081
```
8182

82-
或手动下载后执行
83+
或手动下载并运行
8384

8485
```sh
8586
chmod +x install.sh
8687
./install.sh
8788
```
8889

90+
#### 可配置的环境变量
91+
92+
| 变量名 | 默认值 | 说明 |
93+
| ------------- | ------------------ | ------------------------------ |
94+
| VERSION | 0.16.1 | 要安装的 CodeGPT 版本 |
95+
| INSTALL_DIR | $HOME/.codegpt/bin | 安装目录 |
96+
| CURL_INSECURE | false | 是否跳过 SSL 验证 (true/false) |
97+
98+
使用示例:
99+
100+
```sh
101+
# 安装指定版本到自定义目录
102+
VERSION=0.15.0 INSTALL_DIR=/opt/codegpt ./install.sh
103+
```
104+
89105
该脚本会:
90106

91107
1. 检测您的操作系统和架构

README.zh-tw.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- [macOS](#macos)
1818
- [Windows](#windows)
1919
- [使用安裝腳本](#使用安裝腳本)
20+
- [可設定的環境變數](#可設定的環境變數)
2021
- [預編譯二進制文件](#預編譯二進制文件)
2122
- [從源碼安裝](#從源碼安裝)
2223
- [使用 VSCode Devcontainer](#使用-vscode-devcontainer)
@@ -90,13 +91,28 @@ choco install codegpt
9091
bash < <(curl -sSL https://raw.githubusercontent.com/appleboy/CodeGPT/main/install.sh)
9192
```
9293

93-
或手動下載後執行
94+
或手動下載並執行
9495

9596
```sh
9697
chmod +x install.sh
9798
./install.sh
9899
```
99100

101+
#### 可設定的環境變數
102+
103+
| 變數名稱 | 預設值 | 說明 |
104+
| ------------- | ------------------ | ------------------------------ |
105+
| VERSION | 0.16.1 | 要安裝的 CodeGPT 版本 |
106+
| INSTALL_DIR | $HOME/.codegpt/bin | 安裝目錄 |
107+
| CURL_INSECURE | false | 是否跳過 SSL 驗證 (true/false) |
108+
109+
使用範例:
110+
111+
```sh
112+
# 安裝特定版本到自訂目錄
113+
VERSION=0.15.0 INSTALL_DIR=/opt/codegpt ./install.sh
114+
```
115+
100116
此腳本會:
101117

102118
1. 偵測您的作業系統與架構

0 commit comments

Comments
 (0)