@taejung3852/project-scaffold 0.1.0 → 0.1.1
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/lib/agents.js +41 -13
- package/package.json +4 -1
package/lib/agents.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import process from "node:process";
|
|
4
|
-
import readline from "node:readline/promises";
|
|
5
4
|
import {
|
|
6
5
|
agentRegistry,
|
|
7
6
|
detectAgents,
|
|
@@ -11,6 +10,11 @@ import {
|
|
|
11
10
|
supportedAgentIds,
|
|
12
11
|
uniqueProjectSkillDirs,
|
|
13
12
|
} from "./agents-registry.js";
|
|
13
|
+
import {
|
|
14
|
+
multiselect,
|
|
15
|
+
isCancel,
|
|
16
|
+
cancel,
|
|
17
|
+
} from "@clack/prompts";
|
|
14
18
|
|
|
15
19
|
export const supportedAgents = supportedAgentIds;
|
|
16
20
|
|
|
@@ -117,29 +121,53 @@ export function registryLines() {
|
|
|
117
121
|
return lines;
|
|
118
122
|
}
|
|
119
123
|
|
|
120
|
-
export async function chooseAgents(
|
|
121
|
-
|
|
124
|
+
export async function chooseAgents(
|
|
125
|
+
values,
|
|
126
|
+
yes = false,
|
|
127
|
+
target = process.cwd(),
|
|
128
|
+
) {
|
|
129
|
+
if (values.length > 0) {
|
|
130
|
+
return normalizeAgents(values);
|
|
131
|
+
}
|
|
122
132
|
|
|
123
133
|
const detected = detectAgents({ target });
|
|
124
134
|
const defaults = detected.length > 0 ? detected : ["universal"];
|
|
125
|
-
|
|
135
|
+
|
|
136
|
+
if (yes || !process.stdin.isTTY) {
|
|
137
|
+
return defaults;
|
|
138
|
+
}
|
|
126
139
|
|
|
127
140
|
if (detected.length > 0) {
|
|
128
141
|
console.log(`\n감지된 에이전트: ${detected.join(", ")}`);
|
|
129
142
|
} else {
|
|
130
143
|
console.log("\n자동 감지된 에이전트가 없습니다.");
|
|
131
|
-
console.log("추천: claude-code, codex, cursor, gemini-cli, github-copilot, opencode, windsurf, universal");
|
|
132
144
|
}
|
|
133
|
-
console.log("쉼표로 복수 선택할 수 있습니다. 전체 목록은 'list', 모두 설치는 'all'입니다.");
|
|
134
145
|
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
146
|
+
const orderedAgents = [
|
|
147
|
+
...defaults,
|
|
148
|
+
...supportedAgentIds.filter(
|
|
149
|
+
(agent) => !defaults.includes(agent),
|
|
150
|
+
),
|
|
151
|
+
];
|
|
152
|
+
|
|
153
|
+
const selected = await multiselect({
|
|
154
|
+
message: "설치할 에이전트를 선택하세요",
|
|
155
|
+
options: orderedAgents.map((agent) => ({
|
|
156
|
+
value: agent,
|
|
157
|
+
label: agent,
|
|
158
|
+
hint: detected.includes(agent) ? "감지됨" : undefined,
|
|
159
|
+
})),
|
|
160
|
+
initialValues: defaults,
|
|
161
|
+
required: true,
|
|
162
|
+
maxItems: 10,
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
if (isCancel(selected)) {
|
|
166
|
+
cancel("설치를 취소했습니다.");
|
|
167
|
+
process.exit(0);
|
|
140
168
|
}
|
|
141
|
-
|
|
142
|
-
return normalizeAgents(
|
|
169
|
+
|
|
170
|
+
return normalizeAgents(selected);
|
|
143
171
|
}
|
|
144
172
|
|
|
145
173
|
export function configureAgents({ target, agents, force = false, managedFiles = new Set() }) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taejung3852/project-scaffold",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "LLM Wiki-based project context scaffold for AI coding agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -29,5 +29,8 @@
|
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|
|
31
31
|
"url": "git+https://github.com/taejung3852/project-scaffold.git"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@clack/prompts": "^1.7.0"
|
|
32
35
|
}
|
|
33
36
|
}
|