incremnt 0.1.16 → 0.1.17
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.
- package/README.md +3 -3
- package/package.json +2 -2
- package/src/lib.js +20 -1
package/README.md
CHANGED
|
@@ -7,10 +7,10 @@ Command-line tool and MCP server for querying your [incremnt](https://incremnt.a
|
|
|
7
7
|
```bash
|
|
8
8
|
npm install -g incremnt
|
|
9
9
|
incremnt login
|
|
10
|
-
incremnt mcp install # registers with Claude Desktop and
|
|
10
|
+
incremnt mcp install # registers with Claude Desktop, Claude Code, and Codex CLI
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
This gives you two commands: `incremnt` (CLI) and `incremnt-mcp` (MCP server). The `mcp install` step auto-registers the MCP server — restart
|
|
13
|
+
This gives you two commands: `incremnt` (CLI) and `incremnt-mcp` (MCP server). The `mcp install` step auto-registers the MCP server with Claude Desktop, Claude Code, and Codex CLI — restart your AI assistant for it to take effect.
|
|
14
14
|
|
|
15
15
|
## CLI
|
|
16
16
|
|
|
@@ -72,7 +72,7 @@ If `--input` is omitted, the CLI checks `INCREMNT_SNAPSHOT`, then `ONEMORE_SNAPS
|
|
|
72
72
|
|
|
73
73
|
The package includes an [MCP](https://modelcontextprotocol.io) server that exposes the same read queries and program proposal commands as tools for AI assistants like Claude.
|
|
74
74
|
|
|
75
|
-
Run `incremnt mcp install` to auto-register the server with Claude Desktop
|
|
75
|
+
Run `incremnt mcp install` to auto-register the server with Claude Desktop, Claude Code, and Codex CLI (see [Setup](#setup) above).
|
|
76
76
|
|
|
77
77
|
To register manually instead, add to your Claude Code project config (`.mcp.json`):
|
|
78
78
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "incremnt",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"description": "Command-line tool for querying your incremnt strength training data",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"scripts": {
|
|
15
15
|
"test": "node --test",
|
|
16
16
|
"dev:sync-fixture": "node ./scripts/dev-sync-fixture-server.js",
|
|
17
|
-
"postinstall": "node -e \"process.stdout.write('\\n incremnt MCP server installed.\\n Run: incremnt mcp install\\n to register it with Claude.\\n\\n')\""
|
|
17
|
+
"postinstall": "node -e \"process.stdout.write('\\n incremnt MCP server installed.\\n Run: incremnt mcp install\\n to register it with Claude and Codex.\\n\\n')\""
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
package/src/lib.js
CHANGED
|
@@ -167,7 +167,26 @@ export async function runCli(argv, stdout, stderr) {
|
|
|
167
167
|
await fs.writeFile(cliPath, JSON.stringify(cliConfig, null, 2) + '\n');
|
|
168
168
|
installed.push(` Claude Code: ${cliPath}`);
|
|
169
169
|
|
|
170
|
-
|
|
170
|
+
// Codex CLI
|
|
171
|
+
const codexPath = path.join(os.homedir(), '.codex', 'config.toml');
|
|
172
|
+
try {
|
|
173
|
+
let codexConfig = '';
|
|
174
|
+
try {
|
|
175
|
+
codexConfig = await fs.readFile(codexPath, 'utf8');
|
|
176
|
+
} catch { /* file doesn't exist yet */ }
|
|
177
|
+
const block = `[mcp_servers.incremnt]\ncommand = "${mcpBin}"\n`;
|
|
178
|
+
if (!codexConfig.includes('[mcp_servers.incremnt]')) {
|
|
179
|
+
await fs.mkdir(path.dirname(codexPath), { recursive: true });
|
|
180
|
+
await fs.writeFile(codexPath, codexConfig + (codexConfig && !codexConfig.endsWith('\n') ? '\n' : '') + block);
|
|
181
|
+
installed.push(` Codex CLI: ${codexPath}`);
|
|
182
|
+
} else {
|
|
183
|
+
installed.push(` Codex CLI: ${codexPath} (already registered)`);
|
|
184
|
+
}
|
|
185
|
+
} catch (error) {
|
|
186
|
+
installed.push(` Codex CLI: skipped (${error.message})`);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
stdout.write(`Registered incremnt MCP server in:\n${installed.join('\n')}\n\nRestart Claude/Codex for the changes to take effect.\n`);
|
|
171
190
|
return 0;
|
|
172
191
|
} catch (error) {
|
|
173
192
|
stderr.write(`${error.message}\n`);
|