Skip to content

Commit 8caa57c

Browse files
committed
docs: revamp and clarify installation and usage documentation
- Refactor and expand installation instructions with clearer separation between automated script and manual binary methods - Revise and reorganize sections for greater consistency and clarity across English and Chinese README versions - Improve headings, formatting, and example commands for easier understanding - Remove duplicate and outdated instructions related to binary installation and usage output - Update naming and section titles for VSCode Devcontainer setup - Enhance wording for instructions regarding third-party API services to be more precise Signed-off-by: appleboy <[email protected]>
1 parent e98d904 commit 8caa57c

File tree

3 files changed

+119
-66
lines changed

3 files changed

+119
-66
lines changed

README.md

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ A CLI tool written in [Go](https://go.dev) that generates git commit messages or
2121
- [Installation](#installation)
2222
- [macOS](#macos)
2323
- [Windows](#windows)
24-
- [Using install script](#using-install-script)
24+
- [Install via Script or Binary](#install-via-script-or-binary)
25+
- [**A. Automated Install (Recommended)**](#a-automated-install-recommended)
26+
- [**B. Manual Install (Advanced)**](#b-manual-install-advanced)
2527
- [Configurable Environment Variables](#configurable-environment-variables)
26-
- [Pre-compiled Binaries](#pre-compiled-binaries)
2728
- [From Source](#from-source)
28-
- [Using vscode devcontainer](#using-vscode-devcontainer)
29+
- [Using VSCode Devcontainer](#using-vscode-devcontainer)
2930
- [Configuration](#configuration)
3031
- [How to Customize the Default Prompt Folder](#how-to-customize-the-default-prompt-folder)
3132
- [How to Change to Azure OpenAI Service](#how-to-change-to-azure-openai-service)
@@ -87,20 +88,47 @@ Install via [Chocolatey](https://chocolatey.org/install):
8788
choco install codegpt
8889
```
8990

90-
### Using install script
91+
### Install via Script or Binary
92+
93+
For most systems, you can use an install script **or** manually download a pre-compiled binary.
94+
95+
#### **A. Automated Install (Recommended)**
96+
97+
Run the install script to automatically download and set up the latest release:
9198

9299
```sh
93-
# Download and run the install script
94100
bash < <(curl -sSL https://raw.githubusercontent.com/appleboy/CodeGPT/main/install.sh)
95101
```
96102

97103
Or download and run manually:
98104

99105
```sh
106+
curl -LO https://raw.githubusercontent.com/appleboy/CodeGPT/main/install.sh
100107
chmod +x install.sh
101108
./install.sh
102109
```
103110

111+
#### **B. Manual Install (Advanced)**
112+
113+
1. Download the latest pre-compiled binary from the [release page](https://github.com/appleboy/CodeGPT/releases).
114+
2. Change permissions:
115+
116+
```sh
117+
chmod 755 codegpt
118+
```
119+
120+
3. Move the binary to your system bin directory:
121+
122+
```sh
123+
mv codegpt /usr/local/bin/
124+
```
125+
126+
4. Confirm installation:
127+
128+
```sh
129+
codegpt version
130+
```
131+
104132
#### Configurable Environment Variables
105133

106134
| Variable Name | Default Value | Description |
@@ -112,7 +140,7 @@ chmod +x install.sh
112140
Example usage:
113141

114142
```sh
115-
# Install a specific version to a custom directory
143+
# Install a specific version to a custom directory:
116144
VERSION=1.1.0 INSTALL_DIR=/opt/codegpt ./install.sh
117145
```
118146

@@ -122,19 +150,6 @@ The script will:
122150
2. Download the latest binary
123151
3. Add the binary to your PATH
124152

125-
### Pre-compiled Binaries
126-
127-
Download the pre-compiled binaries from the [release page](https://github.com/appleboy/CodeGPT/releases). Change the binary permissions to `755` and copy the binary to the system bin directory. Use the `codegpt` command as shown below:
128-
129-
```sh
130-
$ codegpt version
131-
Version: 1.1.0
132-
Git Commit: 899396a
133-
Build Time: 2025-05-16T15:52:38Z
134-
Go Version: 1.24.3
135-
OS/Arch: darwin/arm64
136-
```
137-
138153
### From Source
139154

140155
Install from source code:
@@ -143,10 +158,9 @@ Install from source code:
143158
go install github.com/appleboy/CodeGPT/cmd/codegpt@latest
144159
```
145160

146-
### Using vscode devcontainer
161+
### Using VSCode Devcontainer
147162

148-
Add the [feature](https://github.com/kvokka/features/tree/main/src/codegpt) to
149-
your devcontainer.json:
163+
Add the [feature](https://github.com/kvokka/features/tree/main/src/codegpt) to your `devcontainer.json`:
150164

151165
```json
152166
"features": {
@@ -324,7 +338,7 @@ See the model list from the [Anthropic API documentation][103].
324338

325339
### How to Change to [Groq][30] API Service
326340

327-
Get the `API key` from the Groq API Service, please visit [here][31]. Update the `base_url` and `api_key` in your config file.
341+
Get the `API key` from the Groq API Service by visiting the [Groq API Service][31]. Update the `base_url` and `api_key` in your config file.
328342

329343
```sh
330344
codegpt config set openai.provider openai
@@ -344,7 +358,7 @@ GroqCloud currently supports the [following models][32]:
344358

345359
### How to Change to Ollama API Service
346360

347-
We can use the Llama3 model from the [Ollama][41] API Service, please visit [here][40]. Update the `base_url` in your config file.
361+
We can use the Llama3 model from the [Ollama][41] API Service; please visit the [Ollama API Models documentation][40]. Update the `base_url` in your config file.
348362

349363
[40]: https://github.com/ollama/ollama/blob/main/docs/openai.md#models
350364
[41]: https://github.com/ollama/ollama

README.zh-cn.md

Lines changed: 43 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@
1919
- [目录](#目录)
2020
- [功能](#功能)
2121
- [安装](#安装)
22-
- [使用安装脚本](#使用安装脚本)
22+
- [macOS](#macos)
23+
- [Windows](#windows)
24+
- [脚本与二进制安装](#脚本与二进制安装)
25+
- [**A. 自动化安装(推荐)**](#a-自动化安装推荐)
26+
- [**B. 手动安装(进阶)**](#b-手动安装进阶)
2327
- [可配置的环境变量](#可配置的环境变量)
2428
- [从源码安装](#从源码安装)
25-
- [使用 VSCode Devcontainer](#使用-vscode-devcontainer)
29+
- [VSCode Devcontainer](#vscode-devcontainer)
2630
- [配置](#配置)
2731
- [如何自定义默认提示文件夹](#如何自定义默认提示文件夹)
2832
- [如何切换到 Azure OpenAI 服务](#如何切换到-azure-openai-服务)
@@ -63,33 +67,64 @@
6367

6468
## 安装
6569

66-
在 macOS 上通过 [Homebrew](http://brew.sh/) 安装
70+
### macOS
71+
72+
通过 [Homebrew](http://brew.sh/) 安装:
6773

6874
```sh
6975
brew tap appleboy/tap
7076
brew install codegpt
7177
```
7278

73-
在 Windows 上通过 [Chocolatey](https://chocolatey.org/install) 安装
79+
### Windows
80+
81+
通过 [Chocolatey](https://chocolatey.org/install) 安装:
7482

7583
```sh
7684
choco install codegpt
7785
```
7886

79-
### 使用安装脚本
87+
### 脚本与二进制安装
88+
89+
大多数系统推荐使用自动化脚本安装(推荐),也可手动下载二进制文件。
90+
91+
#### **A. 自动化安装(推荐)**
92+
93+
执行脚本,自动下载安装最新版:
8094

8195
```sh
82-
# 下载并运行安装脚本
8396
bash < <(curl -sSL https://raw.githubusercontent.com/appleboy/CodeGPT/main/install.sh)
8497
```
8598

86-
或手动下载并运行
99+
或手动下载脚本后执行
87100

88101
```sh
102+
curl -LO https://raw.githubusercontent.com/appleboy/CodeGPT/main/install.sh
89103
chmod +x install.sh
90104
./install.sh
91105
```
92106

107+
#### **B. 手动安装(进阶)**
108+
109+
1.[发布页面](https://github.com/appleboy/CodeGPT/releases) 下载最新二进制文件。
110+
2. 修改权限:
111+
112+
```sh
113+
chmod 755 codegpt
114+
```
115+
116+
3. 移动到 bin 目录:
117+
118+
```sh
119+
mv codegpt /usr/local/bin/
120+
```
121+
122+
4. 验证安装:
123+
124+
```sh
125+
codegpt version
126+
```
127+
93128
#### 可配置的环境变量
94129

95130
| 变量名 | 默认值 | 说明 |
@@ -111,17 +146,6 @@ VERSION=1.1.0 INSTALL_DIR=/opt/codegpt ./install.sh
111146
2. 下载最新版二进制文件
112147
3. 将程序加入您的 PATH
113148

114-
可以从 [发布页面](https://github.com/appleboy/CodeGPT/releases) 下载预编译的二进制文件。将二进制文件权限更改为 `755` 并将其复制到系统 bin 目录。使用如下所示的 `codegpt` 命令。
115-
116-
```sh
117-
$ codegpt version
118-
Version: 1.1.0
119-
Git Commit: 899396a
120-
Build Time: 2025-05-16T15:52:38Z
121-
Go Version: 1.24.3
122-
OS/Arch: darwin/arm64
123-
```
124-
125149
### 从源码安装
126150

127151
从源码安装:
@@ -130,7 +154,7 @@ OS/Arch: darwin/arm64
130154
go install github.com/appleboy/CodeGPT/cmd/codegpt@latest
131155
```
132156

133-
### 使用 VSCode Devcontainer
157+
### VSCode Devcontainer
134158

135159
在 devcontainer.json 中添加 [feature](https://github.com/kvokka/features/tree/main/src/codegpt)
136160

README.zh-tw.md

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@
2121
- [安裝](#安裝)
2222
- [macOS](#macos)
2323
- [Windows](#windows)
24-
- [使用安裝腳本](#使用安裝腳本)
24+
- [腳本與二進位安裝](#腳本與二進位安裝)
25+
- [**A. 自動安裝(推薦)**](#a-自動安裝推薦)
26+
- [**B. 手動安裝(進階)**](#b-手動安裝進階)
2527
- [可設定的環境變數](#可設定的環境變數)
26-
- [預編譯二進制文件](#預編譯二進制文件)
2728
- [從源碼安裝](#從源碼安裝)
28-
- [使用 VSCode Devcontainer](#使用-vscode-devcontainer)
29+
- [VSCode Devcontainer](#vscode-devcontainer)
2930
- [配置](#配置)
3031
- [如何自定義默認提示文件夾](#如何自定義默認提示文件夾)
3132
- [如何切換到 Azure OpenAI 服務](#如何切換到-azure-openai-服務)
@@ -72,7 +73,7 @@
7273

7374
### macOS
7475

75-
通過 [Homebrew](http://brew.sh/) 安裝:
76+
透過 [Homebrew](http://brew.sh/) 安裝:
7677

7778
```sh
7879
brew tap appleboy/tap
@@ -81,26 +82,53 @@ brew install codegpt
8182

8283
### Windows
8384

84-
通過 [Chocolatey](https://chocolatey.org/install) 安裝:
85+
透過 [Chocolatey](https://chocolatey.org/install) 安裝:
8586

8687
```sh
8788
choco install codegpt
8889
```
8990

90-
### 使用安裝腳本
91+
### 腳本與二進位安裝
92+
93+
大多數系統推薦使用安裝腳本自動安裝(推薦),亦可手動下載執行檔。
94+
95+
#### **A. 自動安裝(推薦)**
96+
97+
執行腳本,自動下載與安裝最新版:
9198

9299
```sh
93-
# 下載並執行安裝腳本
94100
bash < <(curl -sSL https://raw.githubusercontent.com/appleboy/CodeGPT/main/install.sh)
95101
```
96102

97-
或手動下載並執行
103+
或手動下載腳本再執行
98104

99105
```sh
106+
curl -LO https://raw.githubusercontent.com/appleboy/CodeGPT/main/install.sh
100107
chmod +x install.sh
101108
./install.sh
102109
```
103110

111+
#### **B. 手動安裝(進階)**
112+
113+
1.[release 頁面](https://github.com/appleboy/CodeGPT/releases) 下載最新二進位檔案。
114+
2. 更改權限:
115+
116+
```sh
117+
chmod 755 codegpt
118+
```
119+
120+
3. 移動到 bin 目錄:
121+
122+
```sh
123+
mv codegpt /usr/local/bin/
124+
```
125+
126+
4. 驗證安裝:
127+
128+
```sh
129+
codegpt version
130+
```
131+
104132
#### 可設定的環境變數
105133

106134
| 變數名稱 | 預設值 | 說明 |
@@ -122,19 +150,6 @@ VERSION=1.1.0 INSTALL_DIR=/opt/codegpt ./install.sh
122150
2. 下載最新版二進位檔案
123151
3. 將程式加入您的 PATH
124152

125-
### 預編譯二進制文件
126-
127-
[release 頁面](https://github.com/appleboy/CodeGPT/releases) 下載預編譯的二進制文件。將二進制文件的權限更改為 `755`,並將二進制文件複製到系統 bin 目錄。使用如下所示的 `codegpt` 命令:
128-
129-
```sh
130-
$ codegpt version
131-
Version: 1.1.0
132-
Git Commit: 899396a
133-
Build Time: 2025-05-16T15:52:38Z
134-
Go Version: 1.24.3
135-
OS/Arch: darwin/arm64
136-
```
137-
138153
### 從源碼安裝
139154

140155
從源碼安裝:
@@ -143,9 +158,9 @@ OS/Arch: darwin/arm64
143158
go install github.com/appleboy/CodeGPT/cmd/codegpt@latest
144159
```
145160

146-
### 使用 VSCode Devcontainer
161+
### VSCode Devcontainer
147162

148-
devcontainer.json 中添加 [feature](https://github.com/kvokka/features/tree/main/src/codegpt)
163+
devcontainer.json 中新增 [feature](https://github.com/kvokka/features/tree/main/src/codegpt)
149164

150165
```json
151166
"features": {

0 commit comments

Comments
 (0)