mimi-seed 0.2.10 → 0.2.11

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/dist/index.js +93 -46
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4,9 +4,9 @@ import {
4
4
  } from "./chunk-Q5YGYAFK.js";
5
5
 
6
6
  // src/index.ts
7
- import os6 from "os";
8
- import fs7 from "fs";
9
- import path7 from "path";
7
+ import os7 from "os";
8
+ import fs8 from "fs";
9
+ import path8 from "path";
10
10
  import kleur9 from "kleur";
11
11
  import open from "open";
12
12
 
@@ -255,6 +255,9 @@ async function getEffectiveConfig() {
255
255
  }
256
256
 
257
257
  // src/doctor.ts
258
+ import fs3 from "fs";
259
+ import os2 from "os";
260
+ import path3 from "path";
258
261
  import kleur from "kleur";
259
262
 
260
263
  // src/git.ts
@@ -335,6 +338,34 @@ async function cmdDoctor() {
335
338
  ok("Mimi Seed \uC11C\uBC84 \uC5F0\uACB0\uB428", `\uC571 ${lines.length}\uAC1C`);
336
339
  }
337
340
  }
341
+ section("\uB85C\uCEEC MCP \uC790\uACA9\uC99D\uBA85 (~/.mimi-seed)");
342
+ const credDir = path3.join(os2.homedir(), ".mimi-seed");
343
+ const hasFile = (name) => fs3.existsSync(path3.join(credDir, name));
344
+ const hasPrefix = (prefix) => {
345
+ try {
346
+ return fs3.readdirSync(credDir).some((f) => f.startsWith(prefix));
347
+ } catch {
348
+ return false;
349
+ }
350
+ };
351
+ const hasPlaySa = hasFile("play-service-account.json") || (() => {
352
+ try {
353
+ return fs3.readdirSync(path3.join(credDir, "play-service-accounts")).some((f) => f.endsWith(".json"));
354
+ } catch {
355
+ return false;
356
+ }
357
+ })();
358
+ const creds = [
359
+ ["Google OAuth (Firebase/AdMob/Play/Ads)", hasFile("tokens.json"), "mimi-seed auth login"],
360
+ ["App Store Connect", hasFile("appstore.json"), "mimi-seed auth appstore"],
361
+ ["Play \uC11C\uBE44\uC2A4 \uACC4\uC815 (\uC120\uD0DD \u2014 OAuth\uB85C\uB3C4 \uAC00\uB2A5)", hasPlaySa, "mimi-seed auth playstore"],
362
+ ["BigQuery \uC11C\uBE44\uC2A4 \uACC4\uC815", hasPrefix("bigquery"), "mimi-seed auth bigquery"]
363
+ ];
364
+ for (const [label, present, cmd] of creds) {
365
+ if (present) ok(label);
366
+ else warn(label, `\u2192 ${cmd}`);
367
+ }
368
+ process.stdout.write(kleur.dim(" OAuth \uD1A0\uD070 \uC2E0\uC120\uB3C4 \uD655\uC778: mimi-seed auth status\n"));
338
369
  section("\uB85C\uCEEC \uD658\uACBD");
339
370
  const nodeVer = process.version;
340
371
  const [, major] = nodeVer.match(/v(\d+)/) ?? [];
@@ -806,12 +837,12 @@ async function cmdReview(argv) {
806
837
 
807
838
  // src/auth.ts
808
839
  import { spawn } from "child_process";
809
- import fs3 from "fs";
810
- import os2 from "os";
811
- import path3 from "path";
840
+ import fs4 from "fs";
841
+ import os3 from "os";
842
+ import path4 from "path";
812
843
  import kleur5 from "kleur";
813
844
  var MCP_PKG = "@yoonion/mimi-seed-mcp";
814
- var MIMI_DIR = path3.join(os2.homedir(), ".mimi-seed");
845
+ var MIMI_DIR = path4.join(os3.homedir(), ".mimi-seed");
815
846
  function log(msg) {
816
847
  process.stdout.write(msg + "\n");
817
848
  }
@@ -855,11 +886,11 @@ async function runMcpBin(bin, extraArgs) {
855
886
  });
856
887
  }
857
888
  function fileExists(name) {
858
- return fs3.existsSync(path3.join(MIMI_DIR, name));
889
+ return fs4.existsSync(path4.join(MIMI_DIR, name));
859
890
  }
860
891
  function anyFileStarting(prefix) {
861
892
  try {
862
- return fs3.readdirSync(MIMI_DIR).some((f) => f.startsWith(prefix));
893
+ return fs4.readdirSync(MIMI_DIR).some((f) => f.startsWith(prefix));
863
894
  } catch {
864
895
  return false;
865
896
  }
@@ -923,25 +954,25 @@ import kleur6 from "kleur";
923
954
  import * as readline from "readline";
924
955
 
925
956
  // src/ci-providers.ts
926
- import fs4 from "fs";
927
- import path4 from "path";
928
- import os3 from "os";
929
- var CI_CONFIG_PATH = path4.join(os3.homedir(), ".mimi-seed", "ci.json");
957
+ import fs5 from "fs";
958
+ import path5 from "path";
959
+ import os4 from "os";
960
+ var CI_CONFIG_PATH = path5.join(os4.homedir(), ".mimi-seed", "ci.json");
930
961
  function loadCiProviderConfig() {
931
962
  try {
932
- return JSON.parse(fs4.readFileSync(CI_CONFIG_PATH, "utf-8"));
963
+ return JSON.parse(fs5.readFileSync(CI_CONFIG_PATH, "utf-8"));
933
964
  } catch {
934
965
  return null;
935
966
  }
936
967
  }
937
968
  function saveCiProviderConfig(cfg) {
938
- const dir = path4.dirname(CI_CONFIG_PATH);
939
- if (!fs4.existsSync(dir)) {
940
- fs4.mkdirSync(dir, { recursive: true, mode: 448 });
969
+ const dir = path5.dirname(CI_CONFIG_PATH);
970
+ if (!fs5.existsSync(dir)) {
971
+ fs5.mkdirSync(dir, { recursive: true, mode: 448 });
941
972
  }
942
- fs4.writeFileSync(CI_CONFIG_PATH, JSON.stringify(cfg, null, 2));
973
+ fs5.writeFileSync(CI_CONFIG_PATH, JSON.stringify(cfg, null, 2));
943
974
  if (process.platform !== "win32") {
944
- fs4.chmodSync(CI_CONFIG_PATH, 384);
975
+ fs5.chmodSync(CI_CONFIG_PATH, 384);
945
976
  }
946
977
  }
947
978
  function ghBase(cfg) {
@@ -1442,17 +1473,17 @@ async function cmdDeploy(argv) {
1442
1473
 
1443
1474
  // src/mcp-restart.ts
1444
1475
  import { execSync as execSync2 } from "child_process";
1445
- import fs5 from "fs";
1446
- import os4 from "os";
1447
- import path5 from "path";
1476
+ import fs6 from "fs";
1477
+ import os5 from "os";
1478
+ import path6 from "path";
1448
1479
  import kleur7 from "kleur";
1449
1480
  function log3(msg) {
1450
1481
  process.stdout.write(msg + "\n");
1451
1482
  }
1452
1483
  function readClaudeJson() {
1453
- const p = path5.join(os4.homedir(), ".claude.json");
1484
+ const p = path6.join(os5.homedir(), ".claude.json");
1454
1485
  try {
1455
- return JSON.parse(fs5.readFileSync(p, "utf8"));
1486
+ return JSON.parse(fs6.readFileSync(p, "utf8"));
1456
1487
  } catch {
1457
1488
  return {};
1458
1489
  }
@@ -1468,7 +1499,7 @@ function findProcessMarker(cfg) {
1468
1499
  return meaningful.at(-1) ?? null;
1469
1500
  }
1470
1501
  function killByMarker(marker) {
1471
- const isWin = os4.platform() === "win32";
1502
+ const isWin = os5.platform() === "win32";
1472
1503
  if (isWin) {
1473
1504
  const escaped = marker.replace(/\\/g, "\\\\").replace(/'/g, "\\'");
1474
1505
  let pids = [];
@@ -1539,9 +1570,9 @@ async function cmdRestart(args) {
1539
1570
  }
1540
1571
 
1541
1572
  // src/mcp-config.ts
1542
- import fs6 from "fs/promises";
1543
- import path6 from "path";
1544
- import os5 from "os";
1573
+ import fs7 from "fs/promises";
1574
+ import path7 from "path";
1575
+ import os6 from "os";
1545
1576
  import kleur8 from "kleur";
1546
1577
  var SERVER_NAME = "mimi-seed";
1547
1578
  function tomlString(value) {
@@ -1581,17 +1612,17 @@ function printMcpSetup(cfg) {
1581
1612
  );
1582
1613
  }
1583
1614
  async function writeCodexMcpConfig(cfg) {
1584
- const configDir = path6.join(os5.homedir(), ".codex");
1585
- const configPath = path6.join(configDir, "config.toml");
1586
- await fs6.mkdir(configDir, { recursive: true });
1615
+ const configDir = path7.join(os6.homedir(), ".codex");
1616
+ const configPath = path7.join(configDir, "config.toml");
1617
+ await fs7.mkdir(configDir, { recursive: true });
1587
1618
  let current = "";
1588
1619
  try {
1589
- current = await fs6.readFile(configPath, "utf8");
1620
+ current = await fs7.readFile(configPath, "utf8");
1590
1621
  } catch {
1591
1622
  current = "";
1592
1623
  }
1593
1624
  const next = replaceTomlBlock(current, `mcp_servers.${SERVER_NAME}`, codexBlock(cfg));
1594
- await fs6.writeFile(configPath, next);
1625
+ await fs7.writeFile(configPath, next);
1595
1626
  return configPath;
1596
1627
  }
1597
1628
 
@@ -1601,7 +1632,8 @@ var DEFAULT_MCP_ENDPOINT = `${DEFAULT_WEB_BASE}/api/mcp`;
1601
1632
  function log4(msg) {
1602
1633
  process.stdout.write(msg + "\n");
1603
1634
  }
1604
- async function cmdInit() {
1635
+ async function cmdInit(args) {
1636
+ const local = args.includes("--local");
1605
1637
  const cwd = process.cwd();
1606
1638
  log4(kleur9.bold("Mimi Seed CLI \u2014 init"));
1607
1639
  log4(kleur9.dim(cwd));
@@ -1636,7 +1668,7 @@ async function cmdInit() {
1636
1668
  return;
1637
1669
  }
1638
1670
  log4("\u{1F510} \uBE0C\uB77C\uC6B0\uC800\uC5D0\uC11C \uB85C\uADF8\uC778 \uB300\uAE30...");
1639
- const hostName = os6.hostname().slice(0, 32);
1671
+ const hostName = os7.hostname().slice(0, 32);
1640
1672
  const name = `cli-${hostName}`;
1641
1673
  const { port, promise } = await awaitHandshake(5 * 60 * 1e3);
1642
1674
  const callback = `http://127.0.0.1:${port}/cb`;
@@ -1702,16 +1734,16 @@ async function cmdInit() {
1702
1734
  "- `/mimi-seed:health` \u2014 \uC5F0\uACB0 \uC0C1\uD0DC \uBE60\uB978 \uD655\uC778",
1703
1735
  "- `/mimi-seed:review-inbox` \u2014 \uBBF8\uB2F5\uBCC0 \uB9AC\uBDF0 \uB2F5\uBCC0"
1704
1736
  ].join("\n");
1705
- const claudeDir = path7.join(cwd, ".claude");
1706
- const claudeAgentPath = path7.join(claudeDir, "mimi-seed.md");
1707
- if (!fs7.existsSync(claudeAgentPath)) {
1708
- fs7.mkdirSync(claudeDir, { recursive: true });
1709
- fs7.writeFileSync(claudeAgentPath, agentMd, { mode: 420 });
1737
+ const claudeDir = path8.join(cwd, ".claude");
1738
+ const claudeAgentPath = path8.join(claudeDir, "mimi-seed.md");
1739
+ if (!fs8.existsSync(claudeAgentPath)) {
1740
+ fs8.mkdirSync(claudeDir, { recursive: true });
1741
+ fs8.writeFileSync(claudeAgentPath, agentMd, { mode: 420 });
1710
1742
  log4(kleur9.dim(` Claude \uC5D0\uC774\uC804\uD2B8 \uC124\uC815: .claude/mimi-seed.md`));
1711
1743
  }
1712
- const codexAgentPath = path7.join(cwd, "AGENTS.md");
1713
- if (!fs7.existsSync(codexAgentPath)) {
1714
- fs7.writeFileSync(codexAgentPath, agentMd, { mode: 420 });
1744
+ const codexAgentPath = path8.join(cwd, "AGENTS.md");
1745
+ if (!fs8.existsSync(codexAgentPath)) {
1746
+ fs8.writeFileSync(codexAgentPath, agentMd, { mode: 420 });
1715
1747
  log4(kleur9.dim(` Codex \uC5D0\uC774\uC804\uD2B8 \uC124\uC815: AGENTS.md`));
1716
1748
  }
1717
1749
  log4(kleur9.bold("\u2713 \uC900\uBE44 \uC644\uB8CC."));
@@ -1724,6 +1756,18 @@ async function cmdInit() {
1724
1756
  log4(`\uB300\uC2DC\uBCF4\uB4DC: ${kleur9.underline(DEFAULT_WEB_BASE + "/apps")}`);
1725
1757
  log4("");
1726
1758
  printMcpSetup(cfg);
1759
+ if (local) {
1760
+ log4("");
1761
+ log4(kleur9.bold("\u2500\u2500 \uB85C\uCEEC MCP \uCD94\uAC00 \uC124\uC815 (--local) \u2500\u2500"));
1762
+ log4(kleur9.dim("\uC6D0\uACA9 MCP(16 tool, PAT)\uB294 \uC704\uC5D0\uC11C \uB05D. \uB85C\uCEEC MCP\uB294 Google OAuth\uB85C 110+ tool\uC744 \uC9C1\uC811 \uC2E4\uD589\uD569\uB2C8\uB2E4."));
1763
+ log4("");
1764
+ log4("1) Google \uB85C\uADF8\uC778 (Firebase / AdMob / Play / Ads):");
1765
+ await cmdAuth(["login"]);
1766
+ log4("");
1767
+ log4("2) \uB85C\uCEEC MCP \uC11C\uBC84 \uB4F1\uB85D (\uC6D0\uACA9 'mimi-seed' \uC640 \uBCC4\uAC1C):");
1768
+ log4(kleur9.cyan(" claude mcp add mimi-seed-local -- npx -y @yoonion/mimi-seed-mcp"));
1769
+ log4(kleur9.dim(' Codex: ~/.codex/config.toml \uC5D0 [mcp_servers.mimi-seed-local] command="npx", args=["-y","@yoonion/mimi-seed-mcp"]'));
1770
+ }
1727
1771
  }
1728
1772
  async function cmdStatus() {
1729
1773
  const cfg = await getEffectiveConfig();
@@ -1788,8 +1832,11 @@ http_headers = { Authorization = "Bearer ${cfg.prefix}..." }`);
1788
1832
  var CMD_USAGE = {
1789
1833
  init: `${kleur9.bold("mimi-seed init")} \u2014 \uD604\uC7AC \uD504\uB85C\uC81D\uD2B8\uB97C Mimi Seed\uC5D0 \uC5F0\uACB0
1790
1834
 
1791
- \uC571 \uC790\uB3D9 \uAC10\uC9C0(Expo/Gradle/Info.plist/pbxproj) \u2192 \uBE0C\uB77C\uC6B0\uC800 PAT \uBC1C\uAE09 \u2192 \uC571 \uB4F1\uB85D
1792
- + .claude/mimi-seed.md, AGENTS.md \uC0DD\uC131. \uC635\uC158 \uC5C6\uC74C.`,
1835
+ \uC571 \uC790\uB3D9 \uAC10\uC9C0(Expo/Gradle/Info.plist/pbxproj) \u2192 \uBE0C\uB77C\uC6B0\uC800 PAT \uBC1C\uAE09(\uC6D0\uACA9 MCP) \u2192 \uC571 \uB4F1\uB85D
1836
+ + .claude/mimi-seed.md, AGENTS.md \uC0DD\uC131.
1837
+
1838
+ \uC635\uC158:
1839
+ --local \uCD94\uAC00\uB85C Google OAuth \uB85C\uADF8\uC778 + \uB85C\uCEEC 110+ tool MCP \uB4F1\uB85D \uC548\uB0B4`,
1793
1840
  status: `${kleur9.bold("mimi-seed status")} \u2014 \uC5F0\uACB0 \uC0C1\uD0DC + \uB4F1\uB85D \uC571 \uBAA9\uB85D. \uC635\uC158 \uC5C6\uC74C.`,
1794
1841
  doctor: `${kleur9.bold("mimi-seed doctor")} \u2014 \uD658\uACBD \uC9C4\uB2E8 (\uD1A0\uD070\xB7Node\xB7Git\xB7\uD504\uB85C\uC81D\uD2B8\xB7CI). \uC635\uC158 \uC5C6\uC74C.`,
1795
1842
  logout: `${kleur9.bold("mimi-seed logout")} \u2014 \uB85C\uCEEC \uC124\uC815(config.json) \uC0AD\uC81C. \uC635\uC158 \uC5C6\uC74C.`,
@@ -1885,7 +1932,7 @@ async function main() {
1885
1932
  try {
1886
1933
  switch (cmd) {
1887
1934
  case "init":
1888
- await cmdInit();
1935
+ await cmdInit(restArgs);
1889
1936
  break;
1890
1937
  case "status":
1891
1938
  await cmdStatus();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mimi-seed",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "Mimi Seed CLI — Claude Code와 Codex에서 앱 출시 운영을 관리합니다.",
5
5
  "bin": {
6
6
  "mimi-seed": "dist/index.js"