@devness/useai 0.3.1 → 0.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 (3) hide show
  1. package/dist/index.js +29 -19
  2. package/package.json +12 -11
  3. package/LICENSE +0 -21
package/dist/index.js CHANGED
@@ -41,12 +41,13 @@ function writeJsonFile(path, data) {
41
41
  function isConfiguredStandard(configPath) {
42
42
  const config = readJsonFile(configPath);
43
43
  const servers = config["mcpServers"];
44
- return !!servers?.["useai"];
44
+ return !!servers?.["UseAI"] || !!servers?.["useai"];
45
45
  }
46
46
  function installStandard(configPath) {
47
47
  const config = readJsonFile(configPath);
48
48
  const servers = config["mcpServers"] ?? {};
49
- servers["useai"] = { ...MCP_ENTRY };
49
+ delete servers["useai"];
50
+ servers["UseAI"] = { ...MCP_ENTRY };
50
51
  config["mcpServers"] = servers;
51
52
  writeJsonFile(configPath, config);
52
53
  }
@@ -54,6 +55,7 @@ function removeStandard(configPath) {
54
55
  const config = readJsonFile(configPath);
55
56
  const servers = config["mcpServers"];
56
57
  if (servers) {
58
+ delete servers["UseAI"];
57
59
  delete servers["useai"];
58
60
  if (Object.keys(servers).length === 0) {
59
61
  delete config["mcpServers"];
@@ -64,12 +66,13 @@ function removeStandard(configPath) {
64
66
  function isConfiguredVscode(configPath) {
65
67
  const config = readJsonFile(configPath);
66
68
  const servers = config["servers"];
67
- return !!servers?.["useai"];
69
+ return !!servers?.["UseAI"] || !!servers?.["useai"];
68
70
  }
69
71
  function installVscode(configPath) {
70
72
  const config = readJsonFile(configPath);
71
73
  const servers = config["servers"] ?? {};
72
- servers["useai"] = { command: MCP_ENTRY.command, args: MCP_ENTRY.args };
74
+ delete servers["useai"];
75
+ servers["UseAI"] = { command: MCP_ENTRY.command, args: MCP_ENTRY.args };
73
76
  config["servers"] = servers;
74
77
  writeJsonFile(configPath, config);
75
78
  }
@@ -77,6 +80,7 @@ function removeVscode(configPath) {
77
80
  const config = readJsonFile(configPath);
78
81
  const servers = config["servers"];
79
82
  if (servers) {
83
+ delete servers["UseAI"];
80
84
  delete servers["useai"];
81
85
  if (Object.keys(servers).length === 0) {
82
86
  delete config["servers"];
@@ -87,12 +91,13 @@ function removeVscode(configPath) {
87
91
  function isConfiguredZed(configPath) {
88
92
  const config = readJsonFile(configPath);
89
93
  const servers = config["context_servers"];
90
- return !!servers?.["useai"];
94
+ return !!servers?.["UseAI"] || !!servers?.["useai"];
91
95
  }
92
96
  function installZed(configPath) {
93
97
  const config = readJsonFile(configPath);
94
98
  const servers = config["context_servers"] ?? {};
95
- servers["useai"] = {
99
+ delete servers["useai"];
100
+ servers["UseAI"] = {
96
101
  command: { path: MCP_ENTRY.command, args: MCP_ENTRY.args },
97
102
  settings: {}
98
103
  };
@@ -103,6 +108,7 @@ function removeZed(configPath) {
103
108
  const config = readJsonFile(configPath);
104
109
  const servers = config["context_servers"];
105
110
  if (servers) {
111
+ delete servers["UseAI"];
106
112
  delete servers["useai"];
107
113
  if (Object.keys(servers).length === 0) {
108
114
  delete config["context_servers"];
@@ -127,12 +133,13 @@ function writeTomlFile(path, data) {
127
133
  function isConfiguredToml(configPath) {
128
134
  const config = readTomlFile(configPath);
129
135
  const servers = config["mcp_servers"];
130
- return !!servers?.["useai"];
136
+ return !!servers?.["UseAI"] || !!servers?.["useai"];
131
137
  }
132
138
  function installToml(configPath) {
133
139
  const config = readTomlFile(configPath);
134
140
  const servers = config["mcp_servers"] ?? {};
135
- servers["useai"] = { command: MCP_ENTRY.command, args: MCP_ENTRY.args };
141
+ delete servers["useai"];
142
+ servers["UseAI"] = { command: MCP_ENTRY.command, args: MCP_ENTRY.args };
136
143
  config["mcp_servers"] = servers;
137
144
  writeTomlFile(configPath, config);
138
145
  }
@@ -140,6 +147,7 @@ function removeToml(configPath) {
140
147
  const config = readTomlFile(configPath);
141
148
  const servers = config["mcp_servers"];
142
149
  if (servers) {
150
+ delete servers["UseAI"];
143
151
  delete servers["useai"];
144
152
  if (Object.keys(servers).length === 0) {
145
153
  delete config["mcp_servers"];
@@ -164,13 +172,14 @@ function writeYamlFile(path, data) {
164
172
  function isConfiguredYaml(configPath) {
165
173
  const config = readYamlFile(configPath);
166
174
  const extensions = config["extensions"];
167
- return !!extensions?.["useai"];
175
+ return !!extensions?.["UseAI"] || !!extensions?.["useai"];
168
176
  }
169
177
  function installYaml(configPath) {
170
178
  const config = readYamlFile(configPath);
171
179
  const extensions = config["extensions"] ?? {};
172
- extensions["useai"] = {
173
- name: "useai",
180
+ delete extensions["useai"];
181
+ extensions["UseAI"] = {
182
+ name: "UseAI",
174
183
  cmd: MCP_ENTRY.command,
175
184
  args: MCP_ENTRY.args,
176
185
  enabled: true,
@@ -183,6 +192,7 @@ function removeYaml(configPath) {
183
192
  const config = readYamlFile(configPath);
184
193
  const extensions = config["extensions"];
185
194
  if (extensions) {
195
+ delete extensions["UseAI"];
186
196
  delete extensions["useai"];
187
197
  if (Object.keys(extensions).length === 0) {
188
198
  delete config["extensions"];
@@ -497,7 +507,7 @@ async function installFlow(tools, autoYes, explicit) {
497
507
  }
498
508
  }
499
509
  console.log(`
500
- Done! useai MCP server configured in ${chalk.bold(String(toInstall.length))} tool${toInstall.length === 1 ? "" : "s"}.
510
+ Done! UseAI MCP server configured in ${chalk.bold(String(toInstall.length))} tool${toInstall.length === 1 ? "" : "s"}.
501
511
  `);
502
512
  }
503
513
  async function removeFlow(tools, autoYes, explicit) {
@@ -540,18 +550,18 @@ async function removeFlow(tools, autoYes, explicit) {
540
550
  }
541
551
  });
542
552
  if (configured.length === 0) {
543
- console.log(dim("useai is not configured in any AI tools."));
553
+ console.log(dim("UseAI is not configured in any AI tools."));
544
554
  return;
545
555
  }
546
556
  console.log(`
547
- Found useai configured in ${chalk.bold(String(configured.length))} tool${configured.length === 1 ? "" : "s"}:
557
+ Found UseAI configured in ${chalk.bold(String(configured.length))} tool${configured.length === 1 ? "" : "s"}:
548
558
  `);
549
559
  let toRemove;
550
560
  if (autoYes) {
551
561
  toRemove = configured;
552
562
  } else {
553
563
  const selected = await checkbox({
554
- message: "Select tools to remove useai from:",
564
+ message: "Select tools to remove UseAI from:",
555
565
  choices: configured.map((t) => ({
556
566
  name: t.name,
557
567
  value: t.id,
@@ -576,20 +586,20 @@ async function removeFlow(tools, autoYes, explicit) {
576
586
  }
577
587
  }
578
588
  console.log(`
579
- Done! useai removed from ${chalk.bold(String(toRemove.length))} tool${toRemove.length === 1 ? "" : "s"}.
589
+ Done! UseAI removed from ${chalk.bold(String(toRemove.length))} tool${toRemove.length === 1 ? "" : "s"}.
580
590
  `);
581
591
  }
582
592
  function showHelp() {
583
593
  console.log(`
584
594
  ${chalk.bold("Usage:")} npx @devness/useai mcp [tools...] [options]
585
595
 
586
- Configure useai MCP server in your AI tools.
596
+ Configure UseAI MCP server in your AI tools.
587
597
 
588
598
  ${chalk.bold("Arguments:")}
589
599
  tools Specific tool names (e.g. codex cursor vscode)
590
600
 
591
601
  ${chalk.bold("Options:")}
592
- --remove Remove useai from configured tools
602
+ --remove Remove UseAI from configured tools
593
603
  --status Show configuration status without modifying
594
604
  -y, --yes Skip confirmation, auto-select all detected tools
595
605
  -h, --help Show this help message
@@ -949,7 +959,7 @@ function getMilestones() {
949
959
  return readJson(MILESTONES_FILE, []);
950
960
  }
951
961
  var server = new McpServer({
952
- name: "useai",
962
+ name: "UseAI",
953
963
  version: VERSION
954
964
  });
955
965
  server.tool(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devness/useai",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "Track your AI-assisted development workflow. MCP server that records usage metrics across all your AI tools.",
5
5
  "keywords": [
6
6
  "mcp",
@@ -28,6 +28,14 @@
28
28
  "README.md",
29
29
  "LICENSE"
30
30
  ],
31
+ "scripts": {
32
+ "build": "tsc -p tsconfig.build.json",
33
+ "dev": "tsc --watch",
34
+ "bundle": "tsup src/index.ts --format esm --target node18 --no-splitting",
35
+ "prepublishOnly": "pnpm run bundle",
36
+ "typecheck": "tsc --noEmit",
37
+ "clean": "rm -rf dist"
38
+ },
31
39
  "dependencies": {
32
40
  "@inquirer/prompts": "^8.2.1",
33
41
  "@modelcontextprotocol/sdk": "^1.12.1",
@@ -38,9 +46,9 @@
38
46
  },
39
47
  "devDependencies": {
40
48
  "@types/node": "^22.13.4",
49
+ "@useai/shared": "workspace:*",
41
50
  "tsup": "^8.0.0",
42
- "typescript": "^5.7.3",
43
- "@useai/shared": "0.2.0"
51
+ "typescript": "^5.7.3"
44
52
  },
45
53
  "repository": {
46
54
  "type": "git",
@@ -49,12 +57,5 @@
49
57
  "homepage": "https://useai.dev",
50
58
  "engines": {
51
59
  "node": ">=18"
52
- },
53
- "scripts": {
54
- "build": "tsc -p tsconfig.build.json",
55
- "dev": "tsc --watch",
56
- "bundle": "tsup src/index.ts --format esm --target node18 --no-splitting",
57
- "typecheck": "tsc --noEmit",
58
- "clean": "rm -rf dist"
59
60
  }
60
- }
61
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
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.