@picahq/cli 1.5.0 → 1.6.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 CHANGED
@@ -45,6 +45,7 @@ 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
48
49
 
49
50
  - = not detected on this machine
50
51
  ```
@@ -53,7 +54,7 @@ Then it offers targeted actions based on what's missing:
53
54
 
54
55
  - **Update API key** -- validates the new key, then re-installs to every agent that currently has the MCP (preserving global/project scopes)
55
56
  - **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
57
+ - **Install MCP for this project** -- creates `.mcp.json` / `.cursor/mcp.json` / `.codex/config.toml` in cwd for agents that support project scope
57
58
  - **Start fresh** -- full setup flow from scratch
58
59
 
59
60
  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 +129,7 @@ All API calls route through Pica's passthrough proxy (`api.picaos.com/v1/passthr
128
129
  | Claude Desktop | `~/Library/Application Support/Claude/claude_desktop_config.json` | n/a |
129
130
  | Cursor | `~/.cursor/mcp.json` | `.cursor/mcp.json` |
130
131
  | Windsurf | `~/.codeium/windsurf/mcp_config.json` | n/a |
132
+ | Codex | `~/.codex/config.toml` | `.codex/config.toml` |
131
133
 
132
134
  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
135
 
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,15 @@ 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"
123
133
  }
124
134
  ];
125
135
  function getAllAgents() {
@@ -141,6 +151,9 @@ function readAgentConfig(agent, scope = "global") {
141
151
  }
142
152
  try {
143
153
  const content = fs2.readFileSync(configPath, "utf-8");
154
+ if (agent.configFormat === "toml") {
155
+ return parseToml(content);
156
+ }
144
157
  return JSON.parse(content);
145
158
  } catch {
146
159
  return {};
@@ -152,7 +165,11 @@ function writeAgentConfig(agent, config, scope = "global") {
152
165
  if (!fs2.existsSync(configDir)) {
153
166
  fs2.mkdirSync(configDir, { recursive: true });
154
167
  }
155
- fs2.writeFileSync(configPath, JSON.stringify(config, null, 2));
168
+ if (agent.configFormat === "toml") {
169
+ fs2.writeFileSync(configPath, stringifyToml(config));
170
+ } else {
171
+ fs2.writeFileSync(configPath, JSON.stringify(config, null, 2));
172
+ }
156
173
  }
157
174
  function getMcpServerConfig(apiKey) {
158
175
  return {
@@ -615,7 +632,7 @@ ${pc2.cyan(getApiKeyUrl())}`, "API Key");
615
632
  {
616
633
  value: "all",
617
634
  label: "All agents",
618
- hint: "Claude Code, Claude Desktop, Cursor, Windsurf"
635
+ hint: allAgents.map((a) => a.name).join(", ")
619
636
  },
620
637
  ...allAgents.map((agent) => ({
621
638
  value: agent.id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picahq/cli",
3
- "version": "1.5.0",
3
+ "version": "1.6.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",