@picahq/cli 1.5.0 → 1.7.0
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 +5 -1
- package/dist/index.js +27 -2
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -45,6 +45,8 @@ If you already have a config, `pica init` shows your current setup instead of st
|
|
|
45
45
|
Claude Desktop ● yes -
|
|
46
46
|
Cursor ○ no ○ no
|
|
47
47
|
Windsurf - -
|
|
48
|
+
Codex ● yes ○ no
|
|
49
|
+
Kiro ○ no ○ no
|
|
48
50
|
|
|
49
51
|
- = not detected on this machine
|
|
50
52
|
```
|
|
@@ -53,7 +55,7 @@ Then it offers targeted actions based on what's missing:
|
|
|
53
55
|
|
|
54
56
|
- **Update API key** -- validates the new key, then re-installs to every agent that currently has the MCP (preserving global/project scopes)
|
|
55
57
|
- **Install MCP to more agents** -- only shows detected agents missing the MCP
|
|
56
|
-
- **Install MCP for this project** -- creates `.mcp.json` / `.cursor/mcp.json` in cwd for agents that support project scope
|
|
58
|
+
- **Install MCP for this project** -- creates `.mcp.json` / `.cursor/mcp.json` / `.codex/config.toml` / `.kiro/settings/mcp.json` in cwd for agents that support project scope
|
|
57
59
|
- **Start fresh** -- full setup flow from scratch
|
|
58
60
|
|
|
59
61
|
Options that don't apply are hidden. If every detected agent already has the MCP globally, "Install MCP to more agents" won't appear.
|
|
@@ -128,6 +130,8 @@ All API calls route through Pica's passthrough proxy (`api.picaos.com/v1/passthr
|
|
|
128
130
|
| Claude Desktop | `~/Library/Application Support/Claude/claude_desktop_config.json` | n/a |
|
|
129
131
|
| Cursor | `~/.cursor/mcp.json` | `.cursor/mcp.json` |
|
|
130
132
|
| Windsurf | `~/.codeium/windsurf/mcp_config.json` | n/a |
|
|
133
|
+
| Codex | `~/.codex/config.toml` | `.codex/config.toml` |
|
|
134
|
+
| Kiro | `~/.kiro/settings/mcp.json` | `.kiro/settings/mcp.json` |
|
|
131
135
|
|
|
132
136
|
Global installs make the MCP available everywhere. Project installs create config files in your current directory that can be committed and shared with your team (each team member needs their own API key).
|
|
133
137
|
|
package/dist/index.js
CHANGED
|
@@ -46,6 +46,7 @@ function getApiKey() {
|
|
|
46
46
|
import fs2 from "fs";
|
|
47
47
|
import path2 from "path";
|
|
48
48
|
import os2 from "os";
|
|
49
|
+
import { parse as parseToml, stringify as stringifyToml } from "smol-toml";
|
|
49
50
|
function expandPath(p4) {
|
|
50
51
|
if (p4.startsWith("~/")) {
|
|
51
52
|
return path2.join(os2.homedir(), p4.slice(2));
|
|
@@ -120,6 +121,23 @@ var AGENTS = [
|
|
|
120
121
|
configPath: getWindsurfConfigPath(),
|
|
121
122
|
configKey: "mcpServers",
|
|
122
123
|
detectDir: getWindsurfDetectDir()
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: "codex",
|
|
127
|
+
name: "Codex",
|
|
128
|
+
configPath: "~/.codex/config.toml",
|
|
129
|
+
configKey: "mcp_servers",
|
|
130
|
+
detectDir: "~/.codex",
|
|
131
|
+
projectConfigPath: ".codex/config.toml",
|
|
132
|
+
configFormat: "toml"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: "kiro",
|
|
136
|
+
name: "Kiro",
|
|
137
|
+
configPath: "~/.kiro/settings/mcp.json",
|
|
138
|
+
configKey: "mcpServers",
|
|
139
|
+
detectDir: "~/.kiro",
|
|
140
|
+
projectConfigPath: ".kiro/settings/mcp.json"
|
|
123
141
|
}
|
|
124
142
|
];
|
|
125
143
|
function getAllAgents() {
|
|
@@ -141,6 +159,9 @@ function readAgentConfig(agent, scope = "global") {
|
|
|
141
159
|
}
|
|
142
160
|
try {
|
|
143
161
|
const content = fs2.readFileSync(configPath, "utf-8");
|
|
162
|
+
if (agent.configFormat === "toml") {
|
|
163
|
+
return parseToml(content);
|
|
164
|
+
}
|
|
144
165
|
return JSON.parse(content);
|
|
145
166
|
} catch {
|
|
146
167
|
return {};
|
|
@@ -152,7 +173,11 @@ function writeAgentConfig(agent, config, scope = "global") {
|
|
|
152
173
|
if (!fs2.existsSync(configDir)) {
|
|
153
174
|
fs2.mkdirSync(configDir, { recursive: true });
|
|
154
175
|
}
|
|
155
|
-
|
|
176
|
+
if (agent.configFormat === "toml") {
|
|
177
|
+
fs2.writeFileSync(configPath, stringifyToml(config));
|
|
178
|
+
} else {
|
|
179
|
+
fs2.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
180
|
+
}
|
|
156
181
|
}
|
|
157
182
|
function getMcpServerConfig(apiKey) {
|
|
158
183
|
return {
|
|
@@ -615,7 +640,7 @@ ${pc2.cyan(getApiKeyUrl())}`, "API Key");
|
|
|
615
640
|
{
|
|
616
641
|
value: "all",
|
|
617
642
|
label: "All agents",
|
|
618
|
-
hint:
|
|
643
|
+
hint: allAgents.map((a) => a.name).join(", ")
|
|
619
644
|
},
|
|
620
645
|
...allAgents.map((agent) => ({
|
|
621
646
|
value: agent.id,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@picahq/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "CLI for managing Pica",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"@clack/prompts": "^0.9.1",
|
|
21
21
|
"commander": "^13.1.0",
|
|
22
22
|
"open": "^10.1.0",
|
|
23
|
-
"picocolors": "^1.1.1"
|
|
23
|
+
"picocolors": "^1.1.1",
|
|
24
|
+
"smol-toml": "^1.6.0"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
27
|
"@types/node": "^22.13.1",
|