@lineandstone/icons-mcp 0.0.0-stage → 0.1.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/LICENSE ADDED
@@ -0,0 +1,32 @@
1
+ This package contains two kinds of material under two licences.
2
+
3
+ 1. Code (bin/, scripts/, test/): MIT License
4
+
5
+ Copyright (c) 2026 LINE & STONE (Pin Huang)
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
24
+
25
+ 2. Icons and icon data (data/): NOT MIT.
26
+ - The 100 free icons in data/free.json are licensed under LICENSE-ICONS-FREE.txt
27
+ (free for personal and commercial projects, credit required, no resale or
28
+ redistribution as icons, no logos, no AI training).
29
+ - data/index.json lists names, categories and keywords of the full set so
30
+ your assistant can find icons; it contains no paid icon artwork.
31
+ - Paid icons are never included in this package. When you point LS_ICONS_DIR
32
+ at your own LINE & STONE download, they stay under the licence you bought.
@@ -0,0 +1,43 @@
1
+ LINE & STONE Icons - Free License
2
+ Version 1.0 - effective 2026-11-28
3
+
4
+ This license is between you and Pin Huang, an independent designer based in Shanghai, China,
5
+ trading as LINE & STONE ("we"). It covers the 100 icons in this free download ("the Icons").
6
+ By downloading or using the Icons you accept these terms.
7
+
8
+ 1. What you can do
9
+ - Use the Icons in unlimited personal and commercial projects: websites, apps, software,
10
+ presentations, documents, print, video and merchandise, as long as the Icons are not the
11
+ main design of the product.
12
+ - Modify, recolor, resize and combine them, and use them in work you make for clients.
13
+ - Ship them inside your compiled or bundled software, and include the specific icons your
14
+ project uses in its public source code.
15
+
16
+ 2. Attribution (required)
17
+ Credit LINE & STONE where your project lists credits, or in its about page, footer, README or
18
+ documentation: "Icons by LINE & STONE - lineandstoneco.com". A link is appreciated.
19
+ Buying any paid LINE & STONE Icons license removes this requirement.
20
+
21
+ 3. What you cannot do
22
+ - Resell, share, sublicense or redistribute the Icons as icons, on their own or as part of an
23
+ icon pack, icon font, component library, design system or asset collection, free or paid,
24
+ original or modified. Link to lineandstoneco.com instead.
25
+ - Use the Icons, or anything made mainly from them, in a logo, trademark or brand mark.
26
+ - Use the Icons to train, fine-tune or evaluate machine-learning models, or include them in
27
+ datasets. (Using an AI assistant to build your own project is not training.)
28
+ - Remove this license from the download.
29
+
30
+ 4. Ownership
31
+ We keep all rights in the Icons. You receive a license to use them, not ownership.
32
+
33
+ 5. Ending the license
34
+ If you break these terms, the license ends automatically and you must stop using the Icons
35
+ in new work. Work you finished while you followed these terms may stay in use.
36
+
37
+ 6. No warranty
38
+ The Icons are provided "as is", without warranties of any kind. To the extent the law allows,
39
+ we are not liable for any loss arising from their use. Nothing here limits rights you have
40
+ under the consumer law that applies to you.
41
+
42
+ 7. Contact
43
+ lineandstoneco@gmail.com - https://lineandstoneco.com/license/
package/README.md CHANGED
@@ -1,3 +1,86 @@
1
- # Temporary Holding Version
1
+ # LINE & STONE Icons — MCP server
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Let your AI coding assistant find the right icon by meaning and insert a real one — no hand-drawn SVG, no guessing names.
4
+
5
+ Ask *"add a pause button to each agent card"* and your assistant searches LINE & STONE, picks `agent-pause`, and pastes the SVG (or `<LsAgentPause />` if you use our React / Vue package).
6
+
7
+ - **Line icons on one 24 px grid**, round caps and joins, in **1, 1.25 and 1.5 px** strokes.
8
+ - **Search by meaning**: names, natural English titles and keywords for every icon.
9
+ - **100 free icons** work right away, no account, no API key.
10
+ - **The full set** (1,877 icons in 17 categories, including AI & Agents and Oriental Living) unlocks from the download you already bought — locally, offline.
11
+ - Works with Cursor, Claude Code, Claude Desktop, VS Code (Copilot agent mode), Windsurf and any MCP client.
12
+
13
+ Requires Node.js 18 or later.
14
+
15
+ ## Install
16
+
17
+ ### Claude Code
18
+ ```bash
19
+ claude mcp add lineandstone-icons -- npx -y @lineandstone/icons-mcp
20
+ ```
21
+
22
+ ### Cursor
23
+ `.cursor/mcp.json` in your project (or `~/.cursor/mcp.json` for all projects):
24
+ ```json
25
+ {
26
+ "mcpServers": {
27
+ "lineandstone-icons": { "command": "npx", "args": ["-y", "@lineandstone/icons-mcp"] }
28
+ }
29
+ }
30
+ ```
31
+
32
+ ### VS Code (Copilot agent mode)
33
+ `.vscode/mcp.json`:
34
+ ```json
35
+ {
36
+ "servers": {
37
+ "lineandstone-icons": { "type": "stdio", "command": "npx", "args": ["-y", "@lineandstone/icons-mcp"] }
38
+ }
39
+ }
40
+ ```
41
+
42
+ ### Claude Desktop / Windsurf / others
43
+ Add the same `command` and `args` to the client's MCP configuration (`claude_desktop_config.json`, `~/.codeium/windsurf/mcp_config.json`, …).
44
+
45
+ ## Unlock the full set (buyers)
46
+
47
+ Unzip your LINE & STONE download (any tier — Basic, Pro or Team / Dev) and point `LS_ICONS_DIR` at the folder:
48
+
49
+ ```json
50
+ {
51
+ "mcpServers": {
52
+ "lineandstone-icons": {
53
+ "command": "npx",
54
+ "args": ["-y", "@lineandstone/icons-mcp"],
55
+ "env": { "LS_ICONS_DIR": "/Users/you/Downloads/lineandstone-icons-team-v1.1.0" }
56
+ }
57
+ }
58
+ }
59
+ ```
60
+ Claude Code: `claude mcp add lineandstone-icons -e LS_ICONS_DIR=/path/to/download -- npx -y @lineandstone/icons-mcp`
61
+
62
+ Windows paths work too, e.g. `C:\\Users\\you\\Downloads\\lineandstone-icons-team-v1.1.0`.
63
+
64
+ Icons are read from your own disk. Nothing is uploaded, and the tool never contacts our servers.
65
+
66
+ Check your setup: `LS_ICONS_DIR=/path/to/download npx -y @lineandstone/icons-mcp --check`
67
+
68
+ **Team / Dev:** if `@lineandstone/icons-react` or `@lineandstone/icons-vue` is in your project's `package.json`, the tool returns component code (`<LsAgentPause size={20} strokeWidth={1} />`) instead of inline SVG.
69
+
70
+ ## What your assistant can do
71
+
72
+ | Tool | What it does |
73
+ |---|---|
74
+ | `search_icons` | Find icons by meaning ("checkout basket", "low battery", "stop the agent"); shows whether each is free, licensed or locked |
75
+ | `get_icon` | Return one icon as SVG (1 / 1.25 / 1.5 px, any size) or React / Vue usage |
76
+ | `list_categories` | List categories and how many icons you can use |
77
+
78
+ Locked icons return a preview and a link instead of artwork, so your assistant won't fake one.
79
+
80
+ ## Licences
81
+
82
+ - **Code**: MIT (see `LICENSE`).
83
+ - **Free icons**: free for personal and commercial projects, **credit required** — add `Icons by LINE & STONE - lineandstoneco.com` to your README or credits. No resale or redistribution as icons, no logos, no AI training. Full terms: `LICENSE-ICONS-FREE.txt`.
84
+ - **Paid icons**: never shipped in this package; they stay under the licence you bought. Get the full set at [lineandstoneco.com](https://lineandstoneco.com/pricing/?utm_source=github&utm_medium=readme&utm_campaign=icons-mcp).
85
+
86
+ LINE & STONE — From stone to work. · lineandstoneco@gmail.com
package/bin/server.js ADDED
@@ -0,0 +1,180 @@
1
+ #!/usr/bin/env node
2
+ // LINE & STONE Icons — MCP server (stdio). No dependencies.
3
+ // Free: the 100 free icons in 1 / 1.25 / 1.5 px. Full set: point LS_ICONS_DIR at your unzipped LINE & STONE download.
4
+ // Code: MIT. Icons: free icons under LICENSE-ICONS-FREE.txt; paid icons under your own purchase licence.
5
+ import { readFileSync, existsSync, readdirSync, statSync } from 'node:fs';
6
+ import { join, dirname, resolve } from 'node:path';
7
+ import { fileURLToPath } from 'node:url';
8
+ import { homedir } from 'node:os';
9
+
10
+ const HERE = dirname(fileURLToPath(import.meta.url));
11
+ const PKG = JSON.parse(readFileSync(join(HERE, '..', 'package.json'), 'utf8'));
12
+ const INDEX = JSON.parse(readFileSync(join(HERE, '..', 'data', 'index.json'), 'utf8'));
13
+ const FREE = JSON.parse(readFileSync(join(HERE, '..', 'data', 'free.json'), 'utf8'));
14
+ const SITE = 'https://lineandstoneco.com';
15
+ const UTM = 'utm_source=mcp&utm_medium=tool&utm_campaign=icons-mcp';
16
+ const WEIGHTS = ['1', '1.25', '1.5'];
17
+ const CREDIT = 'Icons by LINE & STONE - lineandstoneco.com';
18
+ const CATS = Object.fromEntries(INDEX.categories.map((c) => [c.id, c.name]));
19
+ const ICONS = INDEX.icons.slice();
20
+ const BY = new Map(ICONS.map((i) => [i.n, i]));
21
+
22
+ // ---------- full set from the buyer's own download (LS_ICONS_DIR) ----------
23
+ function findSvgRoot(dir) {
24
+ if (!dir) return null;
25
+ const d = resolve(dir.replace(/^~(?=$|[\\/])/, homedir()));
26
+ const cands = [d, join(d, '..')];
27
+ try { for (const x of readdirSync(d)) cands.push(join(d, x)); } catch { return null; }
28
+ for (const c of cands) { try { if (statSync(join(c, 'svg', '1px')).isDirectory()) return join(c, 'svg'); } catch {} }
29
+ return null;
30
+ }
31
+ const SVG_ROOT = findSvgRoot(process.env.LS_ICONS_DIR);
32
+ const OWNED = new Map(); // name -> category folder
33
+ if (SVG_ROOT) {
34
+ for (const cat of readdirSync(join(SVG_ROOT, '1px'))) {
35
+ let files = []; try { files = readdirSync(join(SVG_ROOT, '1px', cat)); } catch { continue; }
36
+ for (const f of files) if (f.endsWith('.svg')) {
37
+ const n = f.slice(0, -4); OWNED.set(n, cat);
38
+ if (!BY.has(n)) { const i = { n, t: n.split('-').map((w) => w[0].toUpperCase() + w.slice(1)).join(' '), c: cat, k: [], comp: 'Ls' + n.split('-').map((w) => w[0].toUpperCase() + w.slice(1)).join(''), f: false }; ICONS.push(i); BY.set(n, i); }
39
+ }
40
+ }
41
+ }
42
+ const status = (i) => (i.f ? 'free' : OWNED.has(i.n) ? 'licensed' : 'locked');
43
+
44
+ // Team / Dev component packages installed in the current project?
45
+ function componentPkg() {
46
+ try {
47
+ const p = JSON.parse(readFileSync(join(process.cwd(), 'package.json'), 'utf8'));
48
+ const deps = { ...p.dependencies, ...p.devDependencies };
49
+ if (deps['@lineandstone/icons-react']) return 'react';
50
+ if (deps['@lineandstone/icons-vue']) return 'vue';
51
+ } catch {}
52
+ return null;
53
+ }
54
+
55
+ // ---------- search ----------
56
+ const STOP = new Set(['a', 'an', 'the', 'for', 'of', 'to', 'in', 'on', 'and', 'or', 'with', 'icon', 'icons', 'button', 'my', 'our', 'that', 'this', 'add', 'use', 'show']);
57
+ const stem = (w) => w.replace(/(ing|ers|er|es|ed|s)$/, '') || w;
58
+ const toks = (s) => String(s || '').toLowerCase().replace(/[^a-z0-9\s-]/g, ' ').split(/[\s-]+/).filter(Boolean);
59
+ function score(i, q, qt) {
60
+ if (i.n === q.replace(/\s+/g, '-')) return 1000;
61
+ const name = toks(i.n), title = toks(i.t), kws = i.k.map((k) => k.toLowerCase());
62
+ const kwt = kws.flatMap(toks), all = new Set([...name, ...title, ...kwt].map(stem));
63
+ let s = 0;
64
+ if (kws.includes(q)) s += 60;
65
+ if (i.t.toLowerCase() === q) s += 80;
66
+ for (const t of qt) {
67
+ const st = stem(t);
68
+ if (name.includes(t)) s += 12; else if (name.map(stem).includes(st)) s += 10;
69
+ if (title.map(stem).includes(st)) s += 6;
70
+ if (all.has(st)) s += 6; else if ([...all].some((w) => w.length > 3 && (w.startsWith(st) || st.startsWith(w)))) s += 2;
71
+ if (toks(CATS[i.c] || i.c).includes(t)) s += 1;
72
+ }
73
+ const hit = qt.filter((t) => all.has(stem(t))).length;
74
+ if (qt.length > 1 && hit === qt.length) s += 15;
75
+ return s;
76
+ }
77
+ function search({ query = '', category, limit = 10 }) {
78
+ const q = String(query).toLowerCase().trim();
79
+ const qt = toks(q).filter((t) => !STOP.has(t));
80
+ const lim = Math.max(1, Math.min(50, Number(limit) || 10));
81
+ let pool = ICONS;
82
+ if (category) { const c = String(category).toLowerCase(); pool = pool.filter((i) => i.c === c || (CATS[i.c] || '').toLowerCase() === c); }
83
+ const res = (qt.length ? pool.map((i) => [score(i, q, qt), i]).filter((x) => x[0] > 0) : pool.map((i) => [0, i]))
84
+ .sort((a, b) => b[0] - a[0] || (status(a[1]) === 'locked') - (status(b[1]) === 'locked') || a[1].n.localeCompare(b[1].n))
85
+ .slice(0, lim);
86
+ return { query, count: res.length,
87
+ note: SVG_ROOT ? 'Full set unlocked from LS_ICONS_DIR.' : 'Free icons can be inserted now. "locked" icons are part of the paid set; set LS_ICONS_DIR to your download to unlock them.',
88
+ results: res.map(([, i]) => ({ name: i.n, title: i.t, category: CATS[i.c] || i.c, keywords: i.k.slice(0, 8), status: status(i), component: i.comp })) };
89
+ }
90
+
91
+ // ---------- get icon ----------
92
+ function readSvg(i, w) {
93
+ if (i.f && FREE[i.n]) return FREE[i.n][w];
94
+ if (!OWNED.has(i.n)) return null;
95
+ try { return readFileSync(join(SVG_ROOT, w + 'px', OWNED.get(i.n), i.n + '.svg'), 'utf8').trim(); } catch { return null; }
96
+ }
97
+ const sized = (svg, size) => svg.replace(/<svg\b([^>]*)>/, (m, a) => '<svg' + a.replace(/\s(width|height)="[^"]*"/g, '') + ` width="${size}" height="${size}">`);
98
+ function getIcon({ name, strokeWidth = 1, format, size = 24 }) {
99
+ const n = String(name || '').trim().toLowerCase().replace(/\s+/g, '-');
100
+ const i = BY.get(n);
101
+ if (!i) {
102
+ const alt = search({ query: name, limit: 5 }).results.map((r) => r.name);
103
+ return { error: `No icon named "${name}".`, suggestions: alt, hint: 'Use search_icons to find the right name.' };
104
+ }
105
+ const w = String(strokeWidth === 'auto' ? 1 : strokeWidth);
106
+ if (!WEIGHTS.includes(w)) return { error: 'strokeWidth must be 1, 1.25 or 1.5.' };
107
+ const st = status(i);
108
+ const page = `${SITE}/icons/${i.c}/${i.n}/?${UTM}`;
109
+ if (st === 'locked') return { name: i.n, title: i.t, status: 'locked', message: `"${i.t}" is part of the LINE & STONE paid set, so it can't be inserted yet. Do not draw a substitute; use a free icon or ask the user.`, preview: page, buy: `${SITE}/pricing/?${UTM}`, unlock: 'Already bought it? Set LS_ICONS_DIR to the unzipped download folder and restart the tool.' };
110
+ const comp = format === 'react' || format === 'vue' ? format : format === 'svg' ? null : componentPkg();
111
+ const out = { name: i.n, title: i.t, category: CATS[i.c] || i.c, status: st, strokeWidth: Number(w) };
112
+ if (comp) {
113
+ out.format = comp;
114
+ out.import = `import { ${i.comp} } from '@lineandstone/icons-${comp}'`;
115
+ out.usage = comp === 'react' ? `<${i.comp} size={${size}} strokeWidth={${w}} />` : `<${i.comp} :size="${size}" :stroke-width="${w}" />`;
116
+ out.note = 'Requires the LINE & STONE Team / Dev package installed in this project. For an icon-only button, add an aria-label.';
117
+ } else {
118
+ const svg = readSvg(i, w);
119
+ if (!svg) return { error: `Could not read "${i.n}" from LS_ICONS_DIR.` };
120
+ out.format = 'svg'; out.svg = sized(svg, size);
121
+ out.note = 'Inline as-is; color follows currentColor. Keep one stroke weight per screen. For an icon-only button, add an aria-label.';
122
+ }
123
+ if (st === 'free') out.credit = `Free icon. Credit required, e.g. in your README or credits: "${CREDIT}". License: ${SITE}/license/#free`;
124
+ return out;
125
+ }
126
+
127
+ // ---------- MCP plumbing (JSON-RPC 2.0 over stdio, one message per line) ----------
128
+ const TOOLS = [
129
+ { name: 'search_icons', description: 'Search LINE & STONE line icons by meaning (e.g. "pause the agent", "checkout basket", "low battery"). Returns names, titles, categories and whether each icon is free, licensed or locked. Always search before inserting an icon; never draw your own SVG.',
130
+ inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'What the icon is for, in plain words' }, category: { type: 'string', description: 'Optional category id or name, e.g. ai-and-agents' }, limit: { type: 'number', description: '1–50, default 10' } }, required: ['query'] } },
131
+ { name: 'get_icon', description: 'Get one LINE & STONE icon ready to paste: inline SVG, or a React / Vue component usage if the Team / Dev package is installed. Locked icons return a preview and buy link instead; do not substitute a hand-drawn icon.',
132
+ inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Icon name from search_icons, e.g. agent-pause' }, strokeWidth: { type: 'number', enum: [1, 1.25, 1.5], description: 'Default 1. Keep one weight per screen.' }, format: { type: 'string', enum: ['svg', 'react', 'vue'], description: 'Default: component if @lineandstone/icons-react or -vue is in package.json, else svg' }, size: { type: 'number', description: 'Pixel size, default 24' } }, required: ['name'] } },
133
+ { name: 'list_categories', description: 'List the LINE & STONE icon categories with counts and how many icons are usable right now.', inputSchema: { type: 'object', properties: {} } },
134
+ ];
135
+ const INSTRUCTIONS = 'LINE & STONE line icons (24 px grid; 1, 1.25 and 1.5 px strokes; round caps). When the UI needs an icon: call search_icons with what the icon is for, then get_icon. Use only icons this tool returns; never draw or invent SVG icons. Keep one stroke weight per screen. Add aria-label to icon-only buttons. Free icons need a credit line in the project README.';
136
+ const SUPPORTED = ['2025-06-18', '2025-03-26', '2024-11-05'];
137
+
138
+ function call(name, args = {}) {
139
+ if (name === 'search_icons') return search(args);
140
+ if (name === 'get_icon') return getIcon(args);
141
+ if (name === 'list_categories') return { version: INDEX.version, unlocked: !!SVG_ROOT, categories: INDEX.categories.map((c) => ({ id: c.id, name: c.name, count: c.count, usable: ICONS.filter((i) => i.c === c.id && status(i) !== 'locked').length })) };
142
+ throw Object.assign(new Error('Unknown tool: ' + name), { code: -32602 });
143
+ }
144
+ function handle(msg) {
145
+ const { id, method, params = {} } = msg;
146
+ if (id === undefined || id === null) return null; // notification
147
+ try {
148
+ if (method === 'initialize') {
149
+ const v = SUPPORTED.includes(params.protocolVersion) ? params.protocolVersion : SUPPORTED[0];
150
+ return { jsonrpc: '2.0', id, result: { protocolVersion: v, capabilities: { tools: { listChanged: false } }, serverInfo: { name: 'lineandstone-icons', title: 'LINE & STONE Icons', version: PKG.version }, instructions: INSTRUCTIONS } };
151
+ }
152
+ if (method === 'ping') return { jsonrpc: '2.0', id, result: {} };
153
+ if (method === 'tools/list') return { jsonrpc: '2.0', id, result: { tools: TOOLS } };
154
+ if (method === 'tools/call') {
155
+ const r = call(params.name, params.arguments || {});
156
+ return { jsonrpc: '2.0', id, result: { content: [{ type: 'text', text: JSON.stringify(r, null, 2) }], structuredContent: r, isError: !!r.error } };
157
+ }
158
+ return { jsonrpc: '2.0', id, error: { code: -32601, message: 'Method not found: ' + method } };
159
+ } catch (e) { return { jsonrpc: '2.0', id, error: { code: e.code || -32603, message: e.message } }; }
160
+ }
161
+
162
+ if (process.argv.includes('--version')) { console.log(PKG.version); process.exit(0); }
163
+ if (process.argv.includes('--check')) { // quick self-check for the install guide
164
+ console.log(`LINE & STONE Icons MCP ${PKG.version} · data ${INDEX.version} · ${ICONS.length} icons · free ${Object.keys(FREE).length}`);
165
+ console.log(SVG_ROOT ? `Full set unlocked: ${OWNED.size} icons from ${SVG_ROOT}` : process.env.LS_ICONS_DIR ? `LS_ICONS_DIR set but no svg/1px folder found in ${process.env.LS_ICONS_DIR}` : 'Free mode (LS_ICONS_DIR not set)');
166
+ process.exit(0);
167
+ }
168
+ let buf = '';
169
+ process.stdin.setEncoding('utf8');
170
+ process.stdin.on('data', (chunk) => {
171
+ buf += chunk; let nl;
172
+ while ((nl = buf.indexOf('\n')) >= 0) {
173
+ const line = buf.slice(0, nl).trim(); buf = buf.slice(nl + 1);
174
+ if (!line) continue;
175
+ let msg; try { msg = JSON.parse(line); } catch { process.stdout.write(JSON.stringify({ jsonrpc: '2.0', id: null, error: { code: -32700, message: 'Parse error' } }) + '\n'); continue; }
176
+ const out = Array.isArray(msg) ? msg.map(handle).filter(Boolean) : handle(msg);
177
+ if (out && (!Array.isArray(out) || out.length)) process.stdout.write(JSON.stringify(out) + '\n');
178
+ }
179
+ });
180
+ process.stdin.on('end', () => process.exit(0));