-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
113 lines (81 loc) · 3.49 KB
/
.env.example
File metadata and controls
113 lines (81 loc) · 3.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# CodeRocket CLI 环境变量配置示例
# 复制此文件为 .env 并填入实际值
# 标注说明:[必填] = 必须配置,[选填] = 可选配置
# ==================== GitLab 配置 ====================
# [必填] GitLab Personal Access Token
# 在 GitLab 中生成:Settings > Access Tokens > Personal Access Tokens
# 需要的权限:api, read_repository, write_repository
GITLAB_PERSONAL_ACCESS_TOKEN=your_gitlab_token_here
# [选填] GitLab API URL(默认为 https://gitlab.com/api/v4)
# 如果使用私有 GitLab 实例,请修改此 URL
GITLAB_API_URL=https://gitlab.com/api/v4
# ==================== AI 服务配置 ====================
# [选填] 选择使用的AI服务(默认: gemini)
# 支持的服务:gemini, opencode, claudecode
AI_SERVICE=gemini
# [选填] 代码审查时机(默认: post-commit)
# 支持的时机:pre-commit(提交前审查), post-commit(提交后审查)
REVIEW_TIMING=post-commit
# [选填] AI服务调用超时时间,单位:秒(默认: 30)
AI_TIMEOUT=30
# [选填] AI服务重试次数(默认: 3)
AI_MAX_RETRIES=3
# ==================== Gemini 配置 ====================
# [必填] Gemini API Key(如果使用Gemini服务)
# 获取地址:https://aistudio.google.com/app/apikey
GEMINI_API_KEY=your_gemini_api_key_here
# [选填] Gemini 模型(默认: gemini-pro)
GEMINI_MODEL=gemini-pro
# ==================== OpenCode 配置 ====================
# [必填] OpenCode API Key(如果使用OpenCode服务)
OPENCODE_API_KEY=your_opencode_api_key_here
# [选填] OpenCode API URL(默认: https://api.opencode.com/v1)
OPENCODE_API_URL=https://api.opencode.com/v1
# [选填] OpenCode 模型(默认: opencode-pro)
OPENCODE_MODEL=opencode-pro
# ==================== ClaudeCode 配置 ====================
# [必填] ClaudeCode API Key(如果使用ClaudeCode服务)
CLAUDECODE_API_KEY=your_claudecode_api_key_here
# [选填] ClaudeCode API URL(默认: https://api.claudecode.com/v1)
CLAUDECODE_API_URL=https://api.claudecode.com/v1
# [选填] ClaudeCode 模型(默认: claude-3-sonnet)
CLAUDECODE_MODEL=claude-3-sonnet
# ==================== 其他配置 ====================
# [选填] 审查报告输出目录(默认: ./review_logs)
REVIEW_LOGS_DIR=./review_logs
# [选填] 启用调试模式(默认: false)
DEBUG=false
# ==================== 配置示例 ====================
# 示例1:使用Gemini服务
# AI_SERVICE=gemini
# GEMINI_API_KEY=your_actual_gemini_key
# GITLAB_PERSONAL_ACCESS_TOKEN=glpat-xxxxxxxxxxxxxxxxxxxx
# 示例2:使用OpenCode服务
# AI_SERVICE=opencode
# OPENCODE_API_KEY=your_actual_opencode_key
# GITLAB_PERSONAL_ACCESS_TOKEN=glpat-xxxxxxxxxxxxxxxxxxxx
# 示例3:使用私有GitLab实例
# GITLAB_API_URL=https://gitlab.yeepay.com/api/v4
# GITLAB_PERSONAL_ACCESS_TOKEN=glpat-xxxxxxxxxxxxxxxxxxxx
# AI 服务配置
# 选择使用的AI服务:gemini, opencode, claudecode
AI_SERVICE=gemini
# Gemini 配置
GEMINI_API_KEY=your_gemini_api_key_here
GEMINI_MODEL=gemini-pro
# OpenCode 配置
OPENCODE_API_KEY=your_opencode_api_key_here
OPENCODE_API_URL=https://api.opencode.com/v1
OPENCODE_MODEL=opencode-pro
# ClaudeCode 配置
CLAUDECODE_API_KEY=your_claudecode_api_key_here
CLAUDECODE_API_URL=https://api.claudecode.com/v1
CLAUDECODE_MODEL=claude-3-sonnet
# AI 服务通用配置
AI_TIMEOUT=30
AI_MAX_RETRIES=3
# 示例:
# GITLAB_PERSONAL_ACCESS_TOKEN=glpat-xxxxxxxxxxxxxxxxxxxx
# GITLAB_API_URL=https://gitlab.yeepay.com/api/v4
# AI_SERVICE=gemini
# GEMINI_API_KEY=your_actual_gemini_key