triflux 2.0.1 → 2.0.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/setup.mjs +27 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triflux",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "CLI-first multi-model orchestrator for Claude Code — route tasks to Codex, Gemini, and Claude",
5
5
  "type": "module",
6
6
  "bin": {
package/scripts/setup.mjs CHANGED
@@ -151,6 +151,33 @@ for (const name of staleFiles) {
151
151
  }
152
152
  }
153
153
 
154
+ // ── Windows bash PATH 자동 설정 ──
155
+ // Codex/Gemini가 cmd에는 있지만 bash에서 못 찾는 문제 해결
156
+
157
+ if (process.platform === "win32") {
158
+ const npmBin = join(process.env.APPDATA || "", "npm");
159
+ if (existsSync(npmBin)) {
160
+ const bashrcPath = join(homedir(), ".bashrc");
161
+ const pathExport = 'export PATH="$PATH:$APPDATA/npm"';
162
+ let needsUpdate = true;
163
+
164
+ if (existsSync(bashrcPath)) {
165
+ const content = readFileSync(bashrcPath, "utf8");
166
+ if (content.includes("APPDATA/npm") || content.includes("APPDATA\\npm")) {
167
+ needsUpdate = false;
168
+ }
169
+ }
170
+
171
+ if (needsUpdate) {
172
+ const line = `\n# triflux: Codex/Gemini CLI를 bash에서 사용하기 위한 PATH 설정\n${pathExport}\n`;
173
+ try {
174
+ writeFileSync(bashrcPath, (existsSync(bashrcPath) ? readFileSync(bashrcPath, "utf8") : "") + line, "utf8");
175
+ synced++;
176
+ } catch {}
177
+ }
178
+ }
179
+ }
180
+
154
181
  // ── MCP 인벤토리 백그라운드 갱신 ──
155
182
 
156
183
  import { spawn } from "child_process";