@devness/useai-cli 0.3.6 → 0.3.7

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 (3) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.js +35 -6
  3. package/package.json +11 -12
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 useai.dev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.js CHANGED
@@ -400,6 +400,12 @@ import { dirname, join as join2 } from "path";
400
400
  import { homedir as homedir2 } from "os";
401
401
  import { parse as parseToml, stringify as stringifyToml } from "smol-toml";
402
402
  import { parse as parseYaml, stringify as stringifyYaml } from "yaml";
403
+ var USEAI_INSTRUCTIONS_TEXT = [
404
+ "## UseAI Session Tracking",
405
+ "- At the START of every conversation, call `useai_session_start` with the appropriate task_type.",
406
+ "- For LONG sessions (15+ min), call `useai_heartbeat` periodically.",
407
+ "- At the END of every conversation, call `useai_session_end` with languages used, files_touched_count, and milestones (generic descriptions only \u2014 no project names, file paths, or company names)."
408
+ ].join("\n");
403
409
  var MCP_ENTRY = {
404
410
  command: "npx",
405
411
  args: ["-y", "@devness/useai"]
@@ -671,7 +677,8 @@ function createTool(def) {
671
677
  remove: () => {
672
678
  handler.remove(def.configPath);
673
679
  if (def.instructions) removeInstructions(def.instructions);
674
- }
680
+ },
681
+ getManualHint: () => def.instructions ? null : def.manualHint ?? null
675
682
  };
676
683
  }
677
684
  var appSupport = join2(home, "Library", "Application Support");
@@ -710,7 +717,8 @@ var AI_TOOLS = [
710
717
  name: "Cursor",
711
718
  configFormat: "standard",
712
719
  configPath: join2(home, ".cursor", "mcp.json"),
713
- detect: () => existsSync4(join2(home, ".cursor"))
720
+ detect: () => existsSync4(join2(home, ".cursor")),
721
+ manualHint: "Open Cursor Settings \u2192 Rules \u2192 User Rules and paste the instructions below."
714
722
  }),
715
723
  createTool({
716
724
  id: "windsurf",
@@ -749,7 +757,8 @@ var AI_TOOLS = [
749
757
  name: "Zed",
750
758
  configFormat: "zed",
751
759
  configPath: join2(appSupport, "Zed", "settings.json"),
752
- detect: () => existsSync4(join2(appSupport, "Zed"))
760
+ detect: () => existsSync4(join2(appSupport, "Zed")),
761
+ manualHint: "Open Rules Library (\u2318\u2325L) \u2192 click + \u2192 paste the instructions below."
753
762
  }),
754
763
  createTool({
755
764
  id: "cline",
@@ -792,14 +801,16 @@ var AI_TOOLS = [
792
801
  name: "Amazon Q CLI",
793
802
  configFormat: "standard",
794
803
  configPath: join2(home, ".aws", "amazonq", "mcp.json"),
795
- detect: () => hasBinary("q") || existsSync4(join2(home, ".aws", "amazonq"))
804
+ detect: () => hasBinary("q") || existsSync4(join2(home, ".aws", "amazonq")),
805
+ manualHint: "Create .amazonq/rules/useai.md in your project root with the instructions below."
796
806
  }),
797
807
  createTool({
798
808
  id: "amazon-q-ide",
799
809
  name: "Amazon Q IDE",
800
810
  configFormat: "standard",
801
811
  configPath: join2(home, ".aws", "amazonq", "default.json"),
802
- detect: () => existsSync4(join2(home, ".amazonq")) || existsSync4(join2(home, ".aws", "amazonq"))
812
+ detect: () => existsSync4(join2(home, ".amazonq")) || existsSync4(join2(home, ".aws", "amazonq")),
813
+ manualHint: "Create .amazonq/rules/useai.md in your project root with the instructions below."
803
814
  }),
804
815
  createTool({
805
816
  id: "codex",
@@ -830,7 +841,8 @@ var AI_TOOLS = [
830
841
  name: "Junie",
831
842
  configFormat: "standard",
832
843
  configPath: join2(home, ".junie", "mcp", "mcp.json"),
833
- detect: () => existsSync4(join2(home, ".junie"))
844
+ detect: () => existsSync4(join2(home, ".junie")),
845
+ manualHint: "Add the instructions below to .junie/guidelines.md in your project root."
834
846
  })
835
847
  ];
836
848
 
@@ -839,6 +851,21 @@ function shortenPath(p) {
839
851
  const home2 = process.env["HOME"] ?? "";
840
852
  return home2 && p.startsWith(home2) ? p.replace(home2, "~") : p;
841
853
  }
854
+ function showManualHints(installedTools) {
855
+ const hints = installedTools.map((t) => ({ name: t.name, hint: t.getManualHint() })).filter((h) => h.hint !== null);
856
+ if (hints.length === 0) return;
857
+ console.log(chalk6.yellow(`
858
+ \u26A0 Manual setup needed for ${hints.length} tool${hints.length === 1 ? "" : "s"}:
859
+ `));
860
+ for (const { name, hint } of hints) {
861
+ console.log(` ${chalk6.bold(name)}: ${hint}`);
862
+ }
863
+ console.log(chalk6.dim("\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"));
864
+ for (const line of USEAI_INSTRUCTIONS_TEXT.split("\n")) {
865
+ console.log(chalk6.dim(" \u2502 ") + line);
866
+ }
867
+ console.log(chalk6.dim(" \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"));
868
+ }
842
869
  function showStatus(tools) {
843
870
  console.log(header("AI Tool MCP Status"));
844
871
  const rows = [];
@@ -878,6 +905,7 @@ async function installFlow(tools, autoYes, explicit) {
878
905
  console.log(error(`\u2717 ${tool.name.padEnd(18)} \u2014 ${err.message}`));
879
906
  }
880
907
  }
908
+ showManualHints(tools);
881
909
  console.log();
882
910
  return;
883
911
  }
@@ -943,6 +971,7 @@ async function installFlow(tools, autoYes, explicit) {
943
971
  } catch {
944
972
  }
945
973
  }
974
+ showManualHints([...toInstall, ...alreadyConfigured]);
946
975
  console.log(`
947
976
  Done! UseAI MCP server configured in ${chalk6.bold(String(toInstall.length))} tool${toInstall.length === 1 ? "" : "s"}.
948
977
  `);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devness/useai-cli",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "CLI tool for useai.dev — stats, sync, publish your AI development workflow",
5
5
  "author": "nabeelkausari",
6
6
  "license": "MIT",
@@ -14,14 +14,6 @@
14
14
  "README.md",
15
15
  "LICENSE"
16
16
  ],
17
- "scripts": {
18
- "build": "tsc -p tsconfig.build.json",
19
- "dev": "tsc --watch",
20
- "bundle": "tsup src/index.ts --format esm --target node18 --no-splitting",
21
- "prepublishOnly": "pnpm run bundle",
22
- "typecheck": "tsc --noEmit",
23
- "clean": "rm -rf dist"
24
- },
25
17
  "dependencies": {
26
18
  "@inquirer/prompts": "^8.2.1",
27
19
  "chalk": "^5.4.1",
@@ -31,9 +23,9 @@
31
23
  },
32
24
  "devDependencies": {
33
25
  "@types/node": "^22.13.4",
34
- "@useai/shared": "workspace:*",
35
26
  "tsup": "^8.0.0",
36
- "typescript": "^5.7.3"
27
+ "typescript": "^5.7.3",
28
+ "@useai/shared": "0.2.0"
37
29
  },
38
30
  "repository": {
39
31
  "type": "git",
@@ -42,5 +34,12 @@
42
34
  "homepage": "https://useai.dev",
43
35
  "engines": {
44
36
  "node": ">=18"
37
+ },
38
+ "scripts": {
39
+ "build": "tsc -p tsconfig.build.json",
40
+ "dev": "tsc --watch",
41
+ "bundle": "tsup src/index.ts --format esm --target node18 --no-splitting",
42
+ "typecheck": "tsc --noEmit",
43
+ "clean": "rm -rf dist"
45
44
  }
46
- }
45
+ }