@0dai-dev/cli 3.3.2 → 3.3.3

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/bin/0dai.js +26 -8
  2. package/package.json +1 -1
package/bin/0dai.js CHANGED
@@ -38,10 +38,20 @@ const VERSION_CHECK_FILE = path.join(CONFIG_DIR, ".version_check");
38
38
  const PROJECTS_FILE = path.join(CONFIG_DIR, "projects.json");
39
39
 
40
40
  const MANIFEST_FILES = [
41
- "package.json", "go.mod", "pyproject.toml", "requirements.txt",
42
- "pubspec.yaml", "Cargo.toml", "next.config.js", "next.config.mjs",
43
- "next.config.ts", "tsconfig.json", "Makefile", "docker-compose.yml",
44
- "Dockerfile", "pom.xml", "build.gradle",
41
+ // Node ecosystem
42
+ "package.json", "tsconfig.json",
43
+ "next.config.js", "next.config.mjs", "next.config.ts",
44
+ "vite.config.js", "vite.config.ts", "vite.config.mjs",
45
+ "vue.config.js", "nuxt.config.js", "nuxt.config.ts",
46
+ "svelte.config.js", "astro.config.mjs", "astro.config.ts",
47
+ "remix.config.js", "angular.json",
48
+ // Other languages
49
+ "go.mod", "pyproject.toml", "requirements.txt", "setup.py",
50
+ "pubspec.yaml", "Cargo.toml", "pom.xml", "build.gradle",
51
+ "Gemfile", "composer.json",
52
+ // Build/deploy
53
+ "Makefile", "docker-compose.yml", "Dockerfile",
54
+ "pnpm-workspace.yaml", "lerna.json", "turbo.json", "nx.json",
45
55
  ];
46
56
 
47
57
  const PROBE_DIRS = [
@@ -589,11 +599,17 @@ async function cmdSync(target, args = []) {
589
599
 
590
600
  async function cmdDetect(target) {
591
601
  const OPTIONAL_CLIS = ["gemini", "aider", "opencode"];
592
- const { projectFiles } = collectMetadata(target);
593
- const result = await apiCall("/v1/detect", { files: projectFiles });
602
+ const { projectFiles, fileContents, clis: localClis } = collectMetadata(target);
603
+ // Send file contents AND local CLI inventory so server can do content-based detection
604
+ const result = await apiCall("/v1/detect", {
605
+ project_files: projectFiles,
606
+ file_contents: fileContents,
607
+ available_clis: localClis,
608
+ });
594
609
  if (result.error) { log(`error: ${result.error}`); return; }
595
610
  console.log(`stack: ${result.stack || "?"}`);
596
- const clis = result.available_clis || [];
611
+ // Use local CLIs if server didn't return any (server can't detect locally installed binaries)
612
+ const clis = (result.available_clis && result.available_clis.length && result.available_clis[0]) ? result.available_clis : localClis;
597
613
  if (clis.length) {
598
614
  console.log(`clis: ${clis.join(", ")}`);
599
615
  } else {
@@ -1609,7 +1625,9 @@ async function cmdRedeem(code) {
1609
1625
  async function cmdAuthStatus() {
1610
1626
  try {
1611
1627
  const auth = JSON.parse(fs.readFileSync(AUTH_FILE, "utf8"));
1612
- log(`${auth.email} (${auth.plan} plan)`);
1628
+ // Backwards compat: old auth.json used `user`, new uses `email`
1629
+ const email = auth.email || auth.user || "unknown";
1630
+ log(`${email} (${auth.plan || "free"} plan)`);
1613
1631
  // Get usage from API
1614
1632
  const status = await apiCall("/v1/auth/status");
1615
1633
  if (status.usage_today) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0dai-dev/cli",
3
- "version": "3.3.2",
3
+ "version": "3.3.3",
4
4
  "description": "One config layer for 5 AI agent CLIs — Claude Code, Codex, OpenCode, Gemini, Aider",
5
5
  "bin": {
6
6
  "0dai": "./bin/0dai.js"