@qoder-ai/qodercli 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -15
- package/bundle/builtin/agent-creator/SKILL.md +327 -0
- package/bundle/builtin/hook-config/SKILL.md +480 -0
- package/bundle/builtin/mcp-config/SKILL.md +155 -0
- package/bundle/builtin/skill-creator/SKILL.md +294 -0
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js +101 -0
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.d.ts +7 -0
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js +9 -0
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.d.ts +48 -0
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js +323 -0
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.d.ts +36 -0
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js +7 -0
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +34 -0
- package/bundle/policies/sandbox-default.toml +19 -0
- package/bundle/qodercli.js +5120 -0
- package/bundle/sandbox-macos-permissive-open.sb +27 -0
- package/bundle/sandbox-macos-permissive-proxied.sb +37 -0
- package/bundle/sandbox-macos-restrictive-open.sb +96 -0
- package/bundle/sandbox-macos-restrictive-proxied.sb +98 -0
- package/bundle/sandbox-macos-strict-open.sb +131 -0
- package/bundle/sandbox-macos-strict-proxied.sb +133 -0
- package/package.json +25 -81
- package/bin/qodercli +0 -47
- package/scripts/install.js +0 -670
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Qoder CLI
|
|
2
2
|
|
|
3
|
-
Qoder CLI 是Qoder品牌下的 CLI
|
|
3
|
+
Qoder CLI 是Qoder品牌下的 CLI
|
|
4
|
+
AI 编程助手,将强大的 AI 编程能力直接带入你的终端。
|
|
4
5
|
|
|
5
6
|
## 🚀 Why Qoder CLI?
|
|
6
7
|
|
|
@@ -101,11 +102,10 @@ qodercli
|
|
|
101
102
|
|
|
102
103
|
## 🔐 认证配置
|
|
103
104
|
|
|
104
|
-
Qoder CLI
|
|
105
|
+
Qoder CLI 使用自有认证体系,支持以下认证方式:
|
|
105
106
|
|
|
106
107
|
### 方式一:浏览器登录(推荐)
|
|
107
108
|
|
|
108
|
-
|
|
109
109
|
```sh
|
|
110
110
|
qodercli
|
|
111
111
|
# 首次运行自动打开浏览器引导登录
|
|
@@ -117,9 +117,10 @@ qodercli
|
|
|
117
117
|
qodercli login
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
后台每 30 分钟自动刷新 token
|
|
120
|
+
后台每 30 分钟自动刷新 token,无需手动干预
|
|
121
121
|
|
|
122
|
-
> 如果环境不支持自动打开浏览器,设置 `NO_BROWSER=1`
|
|
122
|
+
> 如果环境不支持自动打开浏览器,设置 `NO_BROWSER=1`
|
|
123
|
+
> 后 CLI 会打印 URL 供手动访问。
|
|
123
124
|
|
|
124
125
|
### 方式二:Personal Access Token (PAT)
|
|
125
126
|
|
|
@@ -132,23 +133,21 @@ qodercli
|
|
|
132
133
|
|
|
133
134
|
PAT 可在 Qoder 账号设置页 (`https://qoder.com/account/integrations`) 创建和管理。
|
|
134
135
|
|
|
135
|
-
|
|
136
136
|
### 认证相关环境变量
|
|
137
137
|
|
|
138
|
-
| 环境变量
|
|
139
|
-
|
|
138
|
+
| 环境变量 | 说明 |
|
|
139
|
+
| ----------------------------- | --------------------------------- |
|
|
140
140
|
| `QODER_PERSONAL_ACCESS_TOKEN` | PAT 令牌,设置后自动使用 PAT 认证 |
|
|
141
|
-
| `QODER_CONFIG_DIR`
|
|
142
|
-
| `NO_BROWSER`
|
|
143
|
-
|
|
141
|
+
| `QODER_CONFIG_DIR` | 自定义配置目录(默认 `~/.qoder`) |
|
|
142
|
+
| `NO_BROWSER` | 设置后禁止自动打开浏览器 |
|
|
144
143
|
|
|
145
144
|
### 会话内命令
|
|
146
145
|
|
|
147
|
-
| 命令
|
|
148
|
-
|
|
149
|
-
| `/login` 或 `/signin`
|
|
146
|
+
| 命令 | 说明 |
|
|
147
|
+
| ----------------------- | ------------------ |
|
|
148
|
+
| `/login` 或 `/signin` | 在会话中执行登录 |
|
|
150
149
|
| `/logout` 或 `/signout` | 退出登录(需确认) |
|
|
151
150
|
|
|
152
151
|
## 🔌 MCP 扩展
|
|
153
152
|
|
|
154
|
-
在配置文件中添加 MCP 服务器,扩展 CLI 的能力
|
|
153
|
+
在配置文件中添加 MCP 服务器,扩展 CLI 的能力
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-creator
|
|
3
|
+
description:
|
|
4
|
+
Guide for creating custom agents. Use when users want to create a new agent
|
|
5
|
+
that runs in an isolated context with custom system prompts and
|
|
6
|
+
specific tool access.
|
|
7
|
+
allowed-tools: Edit, Write
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Creating Custom Agents for Qoder CLI
|
|
11
|
+
|
|
12
|
+
This skill guides you through creating custom agents. Agents are
|
|
13
|
+
specialized AI assistants that run in isolated contexts with custom system
|
|
14
|
+
prompts, specific tool access, and independent permissions.
|
|
15
|
+
|
|
16
|
+
## When to Use Agents
|
|
17
|
+
|
|
18
|
+
Use agents when you need:
|
|
19
|
+
|
|
20
|
+
- **Context isolation** for long research or exploration tasks
|
|
21
|
+
- **Parallel execution** of multiple independent workstreams
|
|
22
|
+
- **Specialized expertise** with custom prompts for specific domains
|
|
23
|
+
- **Reusable configurations** across projects
|
|
24
|
+
|
|
25
|
+
**When NOT to use agents:**
|
|
26
|
+
|
|
27
|
+
- Simple, single-purpose tasks (use skills instead)
|
|
28
|
+
- Tasks requiring frequent back-and-forth with the user
|
|
29
|
+
- Quick, targeted changes
|
|
30
|
+
|
|
31
|
+
## Agent Locations
|
|
32
|
+
|
|
33
|
+
| Location | Scope | Priority |
|
|
34
|
+
| -------------------------------- | ----------------- | -------- |
|
|
35
|
+
| `<project>/${QODER_CONFIG_DIR}/agents/` | Current project | Higher |
|
|
36
|
+
| `~/${QODER_CONFIG_DIR}/agents/` | All your projects | Lower |
|
|
37
|
+
|
|
38
|
+
**Project agents** (`${QODER_CONFIG_DIR}/agents/`): Ideal for codebase-specific
|
|
39
|
+
agents. Check into version control to share with your team.
|
|
40
|
+
|
|
41
|
+
**User agents** (`~/${QODER_CONFIG_DIR}/agents/`): Personal agents available across
|
|
42
|
+
all your projects.
|
|
43
|
+
|
|
44
|
+
## Agent File Format
|
|
45
|
+
|
|
46
|
+
Each agent is a Markdown file with YAML frontmatter:
|
|
47
|
+
|
|
48
|
+
```markdown
|
|
49
|
+
---
|
|
50
|
+
name: agent-name
|
|
51
|
+
description: When to use this agent. Be specific!
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
You are a [role]. When invoked:
|
|
55
|
+
|
|
56
|
+
1. [First step]
|
|
57
|
+
2. [Second step]
|
|
58
|
+
3. [Output format]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Required Fields
|
|
62
|
+
|
|
63
|
+
| Field | Description |
|
|
64
|
+
| ------------- | -------------------------------------------------------------------------- |
|
|
65
|
+
| `name` | Unique identifier (lowercase letters and hyphens only) |
|
|
66
|
+
| `description` | When to delegate to this agent (be specific). Including trigger scenarios. |
|
|
67
|
+
|
|
68
|
+
## Writing Effective Descriptions
|
|
69
|
+
|
|
70
|
+
The description is **critical**. Include "use proactively" to encourage
|
|
71
|
+
automatic delegation - Qoder CLI uses it to decide when to delegate.
|
|
72
|
+
|
|
73
|
+
```yaml
|
|
74
|
+
# Bad - Too vague
|
|
75
|
+
description: Helps with code
|
|
76
|
+
|
|
77
|
+
# Good - Specific and actionable
|
|
78
|
+
description: Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code.
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Optional Fields
|
|
82
|
+
|
|
83
|
+
| Field | Description |
|
|
84
|
+
| ---------------- | ----------------------------------------------------------------------------------- |
|
|
85
|
+
| `tools` | Tools the agent can use (string or array) |
|
|
86
|
+
| `disallowedTools`| Tools to explicitly deny (string or array) |
|
|
87
|
+
| `model` | Model to use: `inherit` (default), `sonnet`, `opus`, `haiku` |
|
|
88
|
+
| `color` | Display color: `red`, `blue`, `green`, `yellow`, `purple`, `orange`, `pink`, `cyan` |
|
|
89
|
+
| `displayName` | Human-friendly display name |
|
|
90
|
+
| `maxTurns` | Maximum conversation turns (positive integer) |
|
|
91
|
+
| `timeoutMins` | Timeout in minutes (positive integer) |
|
|
92
|
+
| `effort` | Thinking effort: `low`, `medium`, `high`, `max` |
|
|
93
|
+
| `skills` | Skills the agent can use (string or array) |
|
|
94
|
+
|
|
95
|
+
#### Tools
|
|
96
|
+
|
|
97
|
+
Specify which tools the agent has access to. This limits the agent's
|
|
98
|
+
capabilities for security and focus.
|
|
99
|
+
|
|
100
|
+
```yaml
|
|
101
|
+
# Read-only access
|
|
102
|
+
tools: Read, Grep, Glob
|
|
103
|
+
|
|
104
|
+
# Full development access
|
|
105
|
+
tools: Bash, Read, Write, Edit, Glob, Grep
|
|
106
|
+
|
|
107
|
+
# Web research capabilities
|
|
108
|
+
tools: Read, WebSearch, WebFetch
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Available Tools:**
|
|
112
|
+
|
|
113
|
+
- `Bash` - Execute shell commands
|
|
114
|
+
- `Read` - Read file contents
|
|
115
|
+
- `Write` - Create new files
|
|
116
|
+
- `Edit` - Modify existing files
|
|
117
|
+
- `Glob` - Find files by pattern
|
|
118
|
+
- `Grep` - Search file contents
|
|
119
|
+
- `WebSearch` - Search the web
|
|
120
|
+
- `WebFetch` - Fetch web page content
|
|
121
|
+
|
|
122
|
+
If not specified, the agent inherits default tool access.
|
|
123
|
+
|
|
124
|
+
## Agent Creation Workflow
|
|
125
|
+
|
|
126
|
+
### Step 1: Decide the Scope
|
|
127
|
+
|
|
128
|
+
If not sure where to create the agent, ask the user with two options:
|
|
129
|
+
|
|
130
|
+
- **Project-level** (`.agents/`): For team-shared, codebase-specific agents
|
|
131
|
+
- **User-level** (`~/.agents/`): For personal agents across all projects
|
|
132
|
+
|
|
133
|
+
### Step 2: Gather Requirements
|
|
134
|
+
|
|
135
|
+
Understand what the agent should do:
|
|
136
|
+
|
|
137
|
+
- What specific task or domain?
|
|
138
|
+
- What tools does it need?
|
|
139
|
+
- Should it be read-only or have write access?
|
|
140
|
+
- Any special constraints or workflows?
|
|
141
|
+
|
|
142
|
+
### Step 3: Create the File
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
# For project-level
|
|
146
|
+
mkdir -p ${QODER_CONFIG_DIR}/agents
|
|
147
|
+
touch ${QODER_CONFIG_DIR}/agents/agent-name.md
|
|
148
|
+
|
|
149
|
+
# For user-level
|
|
150
|
+
mkdir -p ~/${QODER_CONFIG_DIR}/agents
|
|
151
|
+
touch ~/${QODER_CONFIG_DIR}/agents/agent-name.md
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Step 4: Write Configuration
|
|
155
|
+
|
|
156
|
+
Create the markdown file with:
|
|
157
|
+
|
|
158
|
+
1. YAML frontmatter with required fields
|
|
159
|
+
2. System prompt in the body
|
|
160
|
+
|
|
161
|
+
### Step 5: Verify
|
|
162
|
+
|
|
163
|
+
- Check file location is correct
|
|
164
|
+
- Verify YAML syntax is valid
|
|
165
|
+
- Confirm the description clearly describes when to use it
|
|
166
|
+
- Tell the user: run `/agents reload` to make the new agent available in the
|
|
167
|
+
current session. They can then invoke it with:
|
|
168
|
+
|
|
169
|
+
```
|
|
170
|
+
@agent-name [task description]
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Best Practices
|
|
174
|
+
|
|
175
|
+
1. **Design focused agents** - Each should excel at one specific task
|
|
176
|
+
2. **Write detailed descriptions** - Be detailed and specific so Qoder CLI knows
|
|
177
|
+
when to delegate
|
|
178
|
+
3. **Limit tool access** - Grant only necessary permissions for security and
|
|
179
|
+
focus
|
|
180
|
+
4. **Keep prompts concise** - Long, rambling prompts dilute focus
|
|
181
|
+
|
|
182
|
+
## Anti-Patterns to Avoid
|
|
183
|
+
|
|
184
|
+
- **Vague descriptions** - "Use for general tasks" gives no signal
|
|
185
|
+
- **Overly long prompts** - A 2000-word prompt doesn't make it smarter
|
|
186
|
+
|
|
187
|
+
## Examples
|
|
188
|
+
|
|
189
|
+
### Verifier
|
|
190
|
+
|
|
191
|
+
```markdown
|
|
192
|
+
---
|
|
193
|
+
name: verifier
|
|
194
|
+
description:
|
|
195
|
+
Validates completed work. Use after tasks are marked done to confirm
|
|
196
|
+
implementations are functional.
|
|
197
|
+
color: yellow
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
You are a skeptical validator. Your job is to verify that work claimed as
|
|
201
|
+
complete actually works.
|
|
202
|
+
|
|
203
|
+
When invoked:
|
|
204
|
+
|
|
205
|
+
1. Identify what was claimed to be completed
|
|
206
|
+
2. Check that the implementation exists and is functional
|
|
207
|
+
3. Run relevant tests or verification steps
|
|
208
|
+
4. Look for edge cases that may have been missed
|
|
209
|
+
|
|
210
|
+
Be thorough and skeptical. Report:
|
|
211
|
+
|
|
212
|
+
- What was verified and passed
|
|
213
|
+
- What was claimed but incomplete or broken
|
|
214
|
+
- Specific issues that need to be addressed
|
|
215
|
+
|
|
216
|
+
Do not accept claims at face value. Test everything.
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Debugger
|
|
220
|
+
|
|
221
|
+
```markdown
|
|
222
|
+
---
|
|
223
|
+
name: debugger
|
|
224
|
+
description:
|
|
225
|
+
Debugging specialist for errors and test failures. Use when encountering
|
|
226
|
+
issues.
|
|
227
|
+
color: red
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
You are an expert debugger specializing in root cause analysis.
|
|
231
|
+
|
|
232
|
+
When invoked:
|
|
233
|
+
|
|
234
|
+
1. Capture error message and stack trace
|
|
235
|
+
2. Identify reproduction steps
|
|
236
|
+
3. Isolate the failure location
|
|
237
|
+
4. Implement minimal fix
|
|
238
|
+
5. Verify solution works
|
|
239
|
+
|
|
240
|
+
For each issue, provide:
|
|
241
|
+
|
|
242
|
+
- Root cause explanation
|
|
243
|
+
- Evidence supporting the diagnosis
|
|
244
|
+
- Specific code fix
|
|
245
|
+
- Testing approach
|
|
246
|
+
|
|
247
|
+
Focus on fixing the underlying issue, not symptoms.
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### Data Scientist
|
|
251
|
+
|
|
252
|
+
```markdown
|
|
253
|
+
---
|
|
254
|
+
name: data-scientist
|
|
255
|
+
description:
|
|
256
|
+
Data analysis expert for SQL queries, BigQuery operations, and data insights.
|
|
257
|
+
Use proactively for data analysis tasks and queries.
|
|
258
|
+
tools: Bash, Read, Write
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
You are a data scientist specializing in SQL and BigQuery analysis.
|
|
262
|
+
|
|
263
|
+
When invoked:
|
|
264
|
+
|
|
265
|
+
1. Understand the data analysis requirement
|
|
266
|
+
2. Write efficient SQL queries
|
|
267
|
+
3. Use BigQuery command line tools (bq) when appropriate
|
|
268
|
+
4. Analyze and summarize results
|
|
269
|
+
5. Present findings clearly
|
|
270
|
+
|
|
271
|
+
Key practices:
|
|
272
|
+
|
|
273
|
+
- Write optimized SQL queries with proper filters
|
|
274
|
+
- Use appropriate aggregations and joins
|
|
275
|
+
- Include comments explaining complex logic
|
|
276
|
+
- Format results for readability
|
|
277
|
+
- Provide data-driven recommendations
|
|
278
|
+
|
|
279
|
+
For each analysis:
|
|
280
|
+
|
|
281
|
+
- Explain the query approach
|
|
282
|
+
- Document any assumptions
|
|
283
|
+
- Highlight key findings
|
|
284
|
+
- Suggest next steps based on data
|
|
285
|
+
|
|
286
|
+
Always ensure queries are efficient and cost-effective.
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### Security Auditor
|
|
290
|
+
|
|
291
|
+
```markdown
|
|
292
|
+
---
|
|
293
|
+
name: security-auditor
|
|
294
|
+
description:
|
|
295
|
+
Security specialist. Use when implementing auth, payments, or handling
|
|
296
|
+
sensitive data. Proactively audit security-sensitive code.
|
|
297
|
+
tools: Read, Grep, Glob
|
|
298
|
+
color: red
|
|
299
|
+
model: sonnet
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
You are a security expert auditing code for vulnerabilities.
|
|
303
|
+
|
|
304
|
+
When invoked:
|
|
305
|
+
|
|
306
|
+
1. Identify security-sensitive code paths
|
|
307
|
+
2. Check for common vulnerabilities (injection, XSS, auth bypass)
|
|
308
|
+
3. Verify secrets are not hardcoded
|
|
309
|
+
4. Review input validation and sanitization
|
|
310
|
+
|
|
311
|
+
Report findings by severity:
|
|
312
|
+
|
|
313
|
+
- Critical (must fix before deploy)
|
|
314
|
+
- High (fix soon)
|
|
315
|
+
- Medium (address when possible)
|
|
316
|
+
|
|
317
|
+
Security checklist:
|
|
318
|
+
|
|
319
|
+
- SQL injection prevention
|
|
320
|
+
- XSS protection
|
|
321
|
+
- CSRF tokens
|
|
322
|
+
- Authentication bypass risks
|
|
323
|
+
- Authorization checks
|
|
324
|
+
- Secret management
|
|
325
|
+
- Input validation
|
|
326
|
+
- Output encoding
|
|
327
|
+
```
|