@vezham/icons-mcp 1.0.5 → 1.0.6
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 +11 -11
- package/dist/README.md +11 -11
- package/dist/cli/index.js +4 -4
- package/dist/core/codegen.js +4 -4
- package/dist/data/icon-index.json +1 -1
- package/dist/package.json +3 -3
- package/dist/server/index.js +5 -5
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# vezham-icons-mcp
|
|
2
2
|
|
|
3
|
-
MCP server and CLI for searching, previewing, and applying
|
|
3
|
+
MCP server and CLI for searching, previewing, and applying Vezham icons. Works fully offline with a prebuilt search index.
|
|
4
4
|
|
|
5
5
|
## MCP Server
|
|
6
6
|
|
|
@@ -9,9 +9,9 @@ Add to your MCP client config:
|
|
|
9
9
|
```json
|
|
10
10
|
{
|
|
11
11
|
"mcpServers": {
|
|
12
|
-
"
|
|
12
|
+
"vezham": {
|
|
13
13
|
"command": "npx",
|
|
14
|
-
"args": ["
|
|
14
|
+
"args": ["@vezham/icons-mcp"]
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -22,9 +22,9 @@ Or point directly at the local binary after building:
|
|
|
22
22
|
```json
|
|
23
23
|
{
|
|
24
24
|
"mcpServers": {
|
|
25
|
-
"
|
|
25
|
+
"vezham": {
|
|
26
26
|
"command": "node",
|
|
27
|
-
"args": ["/path/to/
|
|
27
|
+
"args": ["/path/to/vezham/packages/icons-mcp/bin/run.cjs"]
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -42,10 +42,10 @@ Or point directly at the local binary after building:
|
|
|
42
42
|
## CLI
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
npx
|
|
46
|
-
npx
|
|
47
|
-
npx
|
|
48
|
-
npx
|
|
45
|
+
npx @vezham/icons-mcp search "shopping cart"
|
|
46
|
+
npx @vezham/icons-mcp view heart --weight Filled
|
|
47
|
+
npx @vezham/icons-mcp apply heart --framework react --size 32 --color "#ef4444"
|
|
48
|
+
npx @vezham/icons-mcp categories
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
### File write mode
|
|
@@ -53,7 +53,7 @@ npx reicon-mcp categories
|
|
|
53
53
|
For scripted insertion, replace a marker string in a target file:
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
|
-
npx
|
|
56
|
+
npx @vezham/icons-mcp apply heart --framework react --file src/App.tsx --marker "{/* ICON */}"
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
The marker must exist exactly once. The command exits non-zero if the marker is not found.
|
package/dist/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# vezham-icons-mcp
|
|
2
2
|
|
|
3
|
-
MCP server and CLI for searching, previewing, and applying
|
|
3
|
+
MCP server and CLI for searching, previewing, and applying Vezham icons. Works fully offline with a prebuilt search index.
|
|
4
4
|
|
|
5
5
|
## MCP Server
|
|
6
6
|
|
|
@@ -9,9 +9,9 @@ Add to your MCP client config:
|
|
|
9
9
|
```json
|
|
10
10
|
{
|
|
11
11
|
"mcpServers": {
|
|
12
|
-
"
|
|
12
|
+
"vezham": {
|
|
13
13
|
"command": "npx",
|
|
14
|
-
"args": ["
|
|
14
|
+
"args": ["@vezham/icons-mcp"]
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -22,9 +22,9 @@ Or point directly at the local binary after building:
|
|
|
22
22
|
```json
|
|
23
23
|
{
|
|
24
24
|
"mcpServers": {
|
|
25
|
-
"
|
|
25
|
+
"vezham": {
|
|
26
26
|
"command": "node",
|
|
27
|
-
"args": ["/path/to/
|
|
27
|
+
"args": ["/path/to/vezham/packages/icons-mcp/bin/run.cjs"]
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -42,10 +42,10 @@ Or point directly at the local binary after building:
|
|
|
42
42
|
## CLI
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
npx
|
|
46
|
-
npx
|
|
47
|
-
npx
|
|
48
|
-
npx
|
|
45
|
+
npx @vezham/icons-mcp search "shopping cart"
|
|
46
|
+
npx @vezham/icons-mcp view heart --weight Filled
|
|
47
|
+
npx @vezham/icons-mcp apply heart --framework react --size 32 --color "#ef4444"
|
|
48
|
+
npx @vezham/icons-mcp categories
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
### File write mode
|
|
@@ -53,7 +53,7 @@ npx reicon-mcp categories
|
|
|
53
53
|
For scripted insertion, replace a marker string in a target file:
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
|
-
npx
|
|
56
|
+
npx @vezham/icons-mcp apply heart --framework react --file src/App.tsx --marker "{/* ICON */}"
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
The marker must exist exactly once. The command exits non-zero if the marker is not found.
|
package/dist/cli/index.js
CHANGED
|
@@ -58,14 +58,14 @@ export async function run(argv) {
|
|
|
58
58
|
const { positional, flags } = parseArgs(argv);
|
|
59
59
|
const command = positional[0];
|
|
60
60
|
if (!command) {
|
|
61
|
-
console.error('Usage:
|
|
61
|
+
console.error('Usage: vezham-icons-mcp <search|view|apply|categories> [args]');
|
|
62
62
|
process.exit(1);
|
|
63
63
|
}
|
|
64
64
|
switch (command) {
|
|
65
65
|
case 'search': {
|
|
66
66
|
const query = positional.slice(1).join(' ');
|
|
67
67
|
if (!query) {
|
|
68
|
-
console.error('Usage:
|
|
68
|
+
console.error('Usage: vezham-icons-mcp search <query>');
|
|
69
69
|
process.exit(1);
|
|
70
70
|
}
|
|
71
71
|
const result = handleSearchIcons({
|
|
@@ -81,7 +81,7 @@ export async function run(argv) {
|
|
|
81
81
|
case 'view': {
|
|
82
82
|
const name = positional[1];
|
|
83
83
|
if (!name) {
|
|
84
|
-
console.error('Usage:
|
|
84
|
+
console.error('Usage: vezham-icons-mcp view <name> --weight Outline|Filled');
|
|
85
85
|
process.exit(1);
|
|
86
86
|
}
|
|
87
87
|
const weight = flags.weight || 'Outline';
|
|
@@ -94,7 +94,7 @@ export async function run(argv) {
|
|
|
94
94
|
case 'apply': {
|
|
95
95
|
const name = positional[1];
|
|
96
96
|
if (!name) {
|
|
97
|
-
console.error('Usage:
|
|
97
|
+
console.error('Usage: vezham-icons-mcp apply <name> --framework react|react-native|vue|svelte|html|svg [--weight Outline|Filled] [--size 24] [--color #hex] [--file path] [--marker "{/* ICON */}"]');
|
|
98
98
|
process.exit(1);
|
|
99
99
|
}
|
|
100
100
|
const framework = flags.framework || 'react';
|
package/dist/core/codegen.js
CHANGED
|
@@ -38,7 +38,7 @@ export function generateCode(icon, input) {
|
|
|
38
38
|
const colorAttr = (framework) => hasColor ? colorProp(color, framework) : '';
|
|
39
39
|
switch (input.framework) {
|
|
40
40
|
case 'react': {
|
|
41
|
-
const importStatement = `import { ${component} } from '
|
|
41
|
+
const importStatement = `import { ${component} } from '@vezham/icons-react';`;
|
|
42
42
|
const props = [
|
|
43
43
|
sizeProp(size, 'react'),
|
|
44
44
|
colorAttr('react'),
|
|
@@ -48,7 +48,7 @@ export function generateCode(icon, input) {
|
|
|
48
48
|
return { importStatement, docsSnippet };
|
|
49
49
|
}
|
|
50
50
|
case 'react-native': {
|
|
51
|
-
const importStatement = `import { ${component} } from '
|
|
51
|
+
const importStatement = `import { ${component} } from '@vezham/icons-react-native';`;
|
|
52
52
|
const props = [
|
|
53
53
|
sizeProp(size, 'react-native'),
|
|
54
54
|
colorAttr('react-native'),
|
|
@@ -58,7 +58,7 @@ export function generateCode(icon, input) {
|
|
|
58
58
|
return { importStatement, docsSnippet };
|
|
59
59
|
}
|
|
60
60
|
case 'vue': {
|
|
61
|
-
const importStatement = `import { ${component} } from '
|
|
61
|
+
const importStatement = `import { ${component} } from '@vezham/icons-vue';`;
|
|
62
62
|
const props = [
|
|
63
63
|
sizeProp(size, 'vue'),
|
|
64
64
|
colorAttr('vue'),
|
|
@@ -68,7 +68,7 @@ export function generateCode(icon, input) {
|
|
|
68
68
|
return { importStatement, docsSnippet };
|
|
69
69
|
}
|
|
70
70
|
case 'svelte': {
|
|
71
|
-
const importStatement = `import { ${component} } from '
|
|
71
|
+
const importStatement = `import { ${component} } from '@vezham/icons-svelte';`;
|
|
72
72
|
const props = [
|
|
73
73
|
sizeProp(size, 'svelte'),
|
|
74
74
|
colorAttr('svelte'),
|