palato 0.1.2 → 0.1.4
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/package.json +1 -1
- package/src/agents/figma.js +24 -0
- package/src/agents/paper.js +24 -0
package/package.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import os from 'os';
|
|
4
|
+
|
|
5
|
+
export async function wireFigma() {
|
|
6
|
+
const configPath = path.join(os.homedir(), '.claude', 'settings.json');
|
|
7
|
+
await fs.ensureDir(path.dirname(configPath));
|
|
8
|
+
|
|
9
|
+
let config = {};
|
|
10
|
+
try {
|
|
11
|
+
config = await fs.readJson(configPath);
|
|
12
|
+
} catch {}
|
|
13
|
+
|
|
14
|
+
if (!config.mcpServers) config.mcpServers = {};
|
|
15
|
+
|
|
16
|
+
if (!config.mcpServers['figma']) {
|
|
17
|
+
config.mcpServers['figma'] = {
|
|
18
|
+
command: 'npx',
|
|
19
|
+
args: ['-y', 'figma-developer-mcp', '--figma-api-key=REPLACE_WITH_YOUR_FIGMA_API_KEY'],
|
|
20
|
+
note: 'Get your Figma API key at figma.com/settings → Personal access tokens',
|
|
21
|
+
};
|
|
22
|
+
await fs.writeJson(configPath, config, { spaces: 2 });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import os from 'os';
|
|
4
|
+
|
|
5
|
+
export async function wirePaper() {
|
|
6
|
+
const configPath = path.join(os.homedir(), '.claude', 'settings.json');
|
|
7
|
+
await fs.ensureDir(path.dirname(configPath));
|
|
8
|
+
|
|
9
|
+
let config = {};
|
|
10
|
+
try {
|
|
11
|
+
config = await fs.readJson(configPath);
|
|
12
|
+
} catch {}
|
|
13
|
+
|
|
14
|
+
if (!config.mcpServers) config.mcpServers = {};
|
|
15
|
+
|
|
16
|
+
if (!config.mcpServers['paper']) {
|
|
17
|
+
config.mcpServers['paper'] = {
|
|
18
|
+
type: 'url',
|
|
19
|
+
url: 'REPLACE_WITH_YOUR_PAPER_MCP_URL',
|
|
20
|
+
note: 'Open Paper desktop → Settings → MCP to find your URL',
|
|
21
|
+
};
|
|
22
|
+
await fs.writeJson(configPath, config, { spaces: 2 });
|
|
23
|
+
}
|
|
24
|
+
}
|