@bigknoxy/exa-cli 0.1.1
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 +21 -0
- package/README.md +250 -0
- package/dist/commands/code.d.ts +23 -0
- package/dist/commands/code.d.ts.map +1 -0
- package/dist/commands/code.js +55 -0
- package/dist/commands/code.js.map +1 -0
- package/dist/commands/company.d.ts +26 -0
- package/dist/commands/company.d.ts.map +1 -0
- package/dist/commands/company.js +58 -0
- package/dist/commands/company.js.map +1 -0
- package/dist/commands/completion.d.ts +13 -0
- package/dist/commands/completion.d.ts.map +1 -0
- package/dist/commands/completion.js +423 -0
- package/dist/commands/completion.js.map +1 -0
- package/dist/commands/config.d.ts +23 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +119 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/crawl.d.ts +23 -0
- package/dist/commands/crawl.d.ts.map +1 -0
- package/dist/commands/crawl.js +55 -0
- package/dist/commands/crawl.js.map +1 -0
- package/dist/commands/index.d.ts +10 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +10 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/people.d.ts +26 -0
- package/dist/commands/people.d.ts.map +1 -0
- package/dist/commands/people.js +58 -0
- package/dist/commands/people.js.map +1 -0
- package/dist/commands/research.d.ts +6 -0
- package/dist/commands/research.d.ts.map +1 -0
- package/dist/commands/research.js +191 -0
- package/dist/commands/research.js.map +1 -0
- package/dist/commands/search-advanced.d.ts +64 -0
- package/dist/commands/search-advanced.d.ts.map +1 -0
- package/dist/commands/search-advanced.js +137 -0
- package/dist/commands/search-advanced.js.map +1 -0
- package/dist/commands/search.d.ts +36 -0
- package/dist/commands/search.d.ts.map +1 -0
- package/dist/commands/search.js +74 -0
- package/dist/commands/search.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +23 -0
- package/dist/lib/config.d.ts +29 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +62 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/mcp-client.d.ts +15 -0
- package/dist/lib/mcp-client.d.ts.map +1 -0
- package/dist/lib/mcp-client.js +103 -0
- package/dist/lib/mcp-client.js.map +1 -0
- package/dist/lib/output.d.ts +13 -0
- package/dist/lib/output.d.ts.map +1 -0
- package/dist/lib/output.js +167 -0
- package/dist/lib/output.js.map +1 -0
- package/dist/types.d.ts +76 -0
- package/dist/types.js +5 -0
- package/package.json +63 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { default as crawl } from './crawl.js';
|
|
2
|
+
export { default as code } from './code.js';
|
|
3
|
+
export { default as search } from './search.js';
|
|
4
|
+
export { default as people } from './people.js';
|
|
5
|
+
export { default as company } from './company.js';
|
|
6
|
+
export { default as searchAdvanced } from './search-advanced.js';
|
|
7
|
+
export { default as config } from './config.js';
|
|
8
|
+
export { default as research } from './research.js';
|
|
9
|
+
export { default as completion } from './completion.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { default as crawl } from './crawl.js';
|
|
2
|
+
export { default as code } from './code.js';
|
|
3
|
+
export { default as search } from './search.js';
|
|
4
|
+
export { default as people } from './people.js';
|
|
5
|
+
export { default as company } from './company.js';
|
|
6
|
+
export { default as searchAdvanced } from './search-advanced.js';
|
|
7
|
+
export { default as config } from './config.js';
|
|
8
|
+
export { default as research } from './research.js';
|
|
9
|
+
export { default as completion } from './completion.js';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* People search command - Wraps the MCP people_search_exa tool
|
|
3
|
+
*/
|
|
4
|
+
declare const _default: import("citty").CommandDef<{
|
|
5
|
+
query: {
|
|
6
|
+
type: "positional";
|
|
7
|
+
required: true;
|
|
8
|
+
description: string;
|
|
9
|
+
};
|
|
10
|
+
num: {
|
|
11
|
+
type: "string";
|
|
12
|
+
default: string;
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
format: {
|
|
16
|
+
type: "string";
|
|
17
|
+
default: string;
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
'api-key': {
|
|
21
|
+
type: "string";
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
}>;
|
|
25
|
+
export default _default;
|
|
26
|
+
//# sourceMappingURL=people.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"people.d.ts","sourceRoot":"","sources":["../../src/commands/people.ts"],"names":[],"mappings":"AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAUH,wBAmDE"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* People search command - Wraps the MCP people_search_exa tool
|
|
3
|
+
*/
|
|
4
|
+
import { defineCommand } from 'citty';
|
|
5
|
+
import { consola } from 'consola';
|
|
6
|
+
import { getMcpClient } from '../lib/mcp-client.js';
|
|
7
|
+
import { formatOutput } from '../lib/output.js';
|
|
8
|
+
const VALID_FORMATS = ['text', 'json', 'markdown'];
|
|
9
|
+
export default defineCommand({
|
|
10
|
+
meta: {
|
|
11
|
+
name: 'people',
|
|
12
|
+
description: 'Search for people and profiles',
|
|
13
|
+
},
|
|
14
|
+
args: {
|
|
15
|
+
query: {
|
|
16
|
+
type: 'positional',
|
|
17
|
+
required: true,
|
|
18
|
+
description: 'Search query for finding people',
|
|
19
|
+
},
|
|
20
|
+
num: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
default: '5',
|
|
23
|
+
description: 'Number of results',
|
|
24
|
+
},
|
|
25
|
+
format: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
default: 'text',
|
|
28
|
+
description: `Output format (${VALID_FORMATS.join(', ')})`,
|
|
29
|
+
},
|
|
30
|
+
'api-key': {
|
|
31
|
+
type: 'string',
|
|
32
|
+
description: 'Override API key',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
async run({ args }) {
|
|
36
|
+
const { query, num, format, 'api-key': apiKey } = args;
|
|
37
|
+
const numResults = parseInt(String(num), 10) || 5;
|
|
38
|
+
const outputFormat = VALID_FORMATS.includes(format) ? format : 'text';
|
|
39
|
+
const client = getMcpClient();
|
|
40
|
+
try {
|
|
41
|
+
await client.connect(apiKey);
|
|
42
|
+
const result = await client.callTool('people_search_exa', {
|
|
43
|
+
query,
|
|
44
|
+
numResults,
|
|
45
|
+
});
|
|
46
|
+
const output = formatOutput(result, outputFormat);
|
|
47
|
+
console.log(output);
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
consola.error('People search failed:', error instanceof Error ? error.message : 'Unknown error');
|
|
51
|
+
process.exit(1);
|
|
52
|
+
}
|
|
53
|
+
finally {
|
|
54
|
+
await client.close();
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=people.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"people.js","sourceRoot":"","sources":["../../src/commands/people.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAG/C,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAU,CAAA;AAE3D,eAAe,aAAa,CAAC;IAC3B,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,gCAAgC;KAC9C;IACD,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,IAAI,EAAE,YAAY;YAClB,QAAQ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AA;YAChG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACjB,CAAC;gBAAS,CAAC;YACT,MAAM,MAAM,CAAC,KAAK,EAAE,CAAA;QACtB,CAAC;IACH,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"research.d.ts","sourceRoot":"","sources":["../../src/commands/research.ts"],"names":[],"mappings":"AAAA;;GAEG;;AA8LH,wBASE"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Research command - Wraps the MCP deep_researcher_start and deep_researcher_check tools
|
|
3
|
+
*/
|
|
4
|
+
import { defineCommand } from 'citty';
|
|
5
|
+
import { consola } from 'consola';
|
|
6
|
+
import { getMcpClient } from '../lib/mcp-client.js';
|
|
7
|
+
import { formatOutput } from '../lib/output.js';
|
|
8
|
+
const VALID_MODELS = ['exa-research-fast', 'exa-research', 'exa-research-pro'];
|
|
9
|
+
const VALID_FORMATS = ['text', 'json', 'markdown'];
|
|
10
|
+
const startCommand = defineCommand({
|
|
11
|
+
meta: {
|
|
12
|
+
name: 'start',
|
|
13
|
+
description: 'Start a new deep research task',
|
|
14
|
+
},
|
|
15
|
+
args: {
|
|
16
|
+
instructions: {
|
|
17
|
+
type: 'positional',
|
|
18
|
+
required: true,
|
|
19
|
+
description: 'Research instructions/question',
|
|
20
|
+
},
|
|
21
|
+
model: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
default: 'exa-research-fast',
|
|
24
|
+
description: `Research model (${VALID_MODELS.join(', ')})`,
|
|
25
|
+
},
|
|
26
|
+
format: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
default: 'text',
|
|
29
|
+
description: `Output format (${VALID_FORMATS.join(', ')})`,
|
|
30
|
+
},
|
|
31
|
+
'api-key': {
|
|
32
|
+
type: 'string',
|
|
33
|
+
description: 'Override API key',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
async run({ args }) {
|
|
37
|
+
const { instructions, model, format, 'api-key': apiKey } = args;
|
|
38
|
+
const researchModel = VALID_MODELS.includes(model)
|
|
39
|
+
? model
|
|
40
|
+
: 'exa-research-fast';
|
|
41
|
+
const outputFormat = VALID_FORMATS.includes(format)
|
|
42
|
+
? format
|
|
43
|
+
: 'text';
|
|
44
|
+
const client = getMcpClient();
|
|
45
|
+
try {
|
|
46
|
+
await client.connect(apiKey);
|
|
47
|
+
const result = await client.callTool('deep_researcher_start', {
|
|
48
|
+
instructions,
|
|
49
|
+
model: researchModel,
|
|
50
|
+
});
|
|
51
|
+
const output = formatOutput(result, outputFormat);
|
|
52
|
+
// Try to extract the research ID from the result
|
|
53
|
+
let researchId = '';
|
|
54
|
+
if (result.content && result.content.length > 0) {
|
|
55
|
+
const content = result.content[0];
|
|
56
|
+
if (content.type === 'text') {
|
|
57
|
+
// Try to parse the ID from the text output
|
|
58
|
+
const idMatch = content.text?.match(/(?:research[_-]?id|id)[:\s]*["']?([a-zA-Z0-9-]+)["']?/i);
|
|
59
|
+
if (idMatch) {
|
|
60
|
+
researchId = idMatch[1];
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
// If we can't parse it, just show the raw output
|
|
64
|
+
console.log(output);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (researchId) {
|
|
70
|
+
consola.info(`Research started with ID: ${researchId}`);
|
|
71
|
+
console.log('\nRun the following command to check the status:');
|
|
72
|
+
console.log(` exa research check ${researchId}`);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
console.log(output);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
consola.error('Failed to start research:', error instanceof Error ? error.message : 'Unknown error');
|
|
80
|
+
process.exit(1);
|
|
81
|
+
}
|
|
82
|
+
finally {
|
|
83
|
+
await client.close();
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
const checkCommand = defineCommand({
|
|
88
|
+
meta: {
|
|
89
|
+
name: 'check',
|
|
90
|
+
description: 'Check the status of a deep research task',
|
|
91
|
+
},
|
|
92
|
+
args: {
|
|
93
|
+
id: {
|
|
94
|
+
type: 'positional',
|
|
95
|
+
required: true,
|
|
96
|
+
description: 'Research ID to check',
|
|
97
|
+
},
|
|
98
|
+
format: {
|
|
99
|
+
type: 'string',
|
|
100
|
+
default: 'text',
|
|
101
|
+
description: `Output format (${VALID_FORMATS.join(', ')})`,
|
|
102
|
+
},
|
|
103
|
+
'api-key': {
|
|
104
|
+
type: 'string',
|
|
105
|
+
description: 'Override API key',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
async run({ args }) {
|
|
109
|
+
const { id, format, 'api-key': apiKey } = args;
|
|
110
|
+
const outputFormat = VALID_FORMATS.includes(format)
|
|
111
|
+
? format
|
|
112
|
+
: 'text';
|
|
113
|
+
const client = getMcpClient();
|
|
114
|
+
try {
|
|
115
|
+
await client.connect(apiKey);
|
|
116
|
+
const result = await client.callTool('deep_researcher_check', {
|
|
117
|
+
researchId: id,
|
|
118
|
+
});
|
|
119
|
+
// Try to determine status from the result
|
|
120
|
+
let status = 'unknown';
|
|
121
|
+
if (result.content && result.content.length > 0) {
|
|
122
|
+
const content = result.content[0];
|
|
123
|
+
if (content.type === 'text' && content.text) {
|
|
124
|
+
const text = content.text.toLowerCase();
|
|
125
|
+
// Determine status from the output
|
|
126
|
+
if (text.includes('"status"') || text.includes("'status'")) {
|
|
127
|
+
// Try to extract status from JSON
|
|
128
|
+
const statusMatch = text.match(/"status"\s*:\s*"([^"]+)"/);
|
|
129
|
+
if (statusMatch) {
|
|
130
|
+
status = statusMatch[1];
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
else if (text.includes('completed') || text.includes('finished')) {
|
|
134
|
+
status = 'completed';
|
|
135
|
+
}
|
|
136
|
+
else if (text.includes('failed') || text.includes('error')) {
|
|
137
|
+
status = 'failed';
|
|
138
|
+
}
|
|
139
|
+
else if (text.includes('running') || text.includes('processing')) {
|
|
140
|
+
status = 'running';
|
|
141
|
+
}
|
|
142
|
+
else if (text.includes('pending') || text.includes('queued')) {
|
|
143
|
+
status = 'pending';
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
// Display status
|
|
148
|
+
const statusColors = {
|
|
149
|
+
pending: '\x1b[33m', // Yellow
|
|
150
|
+
running: '\x1b[36m', // Cyan
|
|
151
|
+
completed: '\x1b[32m', // Green
|
|
152
|
+
failed: '\x1b[31m', // Red
|
|
153
|
+
unknown: '\x1b[90m', // Gray
|
|
154
|
+
};
|
|
155
|
+
const reset = '\x1b[0m';
|
|
156
|
+
const color = statusColors[status] || statusColors.unknown;
|
|
157
|
+
console.log(`Status: ${color}${status.toUpperCase()}${reset}`);
|
|
158
|
+
console.log('');
|
|
159
|
+
// Show the full output
|
|
160
|
+
const output = formatOutput(result, outputFormat);
|
|
161
|
+
console.log(output);
|
|
162
|
+
if (status === 'completed') {
|
|
163
|
+
consola.success('Research completed!');
|
|
164
|
+
}
|
|
165
|
+
else if (status === 'failed') {
|
|
166
|
+
consola.error('Research failed!');
|
|
167
|
+
}
|
|
168
|
+
else if (status === 'running' || status === 'pending') {
|
|
169
|
+
consola.info('Research is still in progress. Check again later.');
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
catch (error) {
|
|
173
|
+
consola.error('Failed to check research:', error instanceof Error ? error.message : 'Unknown error');
|
|
174
|
+
process.exit(1);
|
|
175
|
+
}
|
|
176
|
+
finally {
|
|
177
|
+
await client.close();
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
});
|
|
181
|
+
export default defineCommand({
|
|
182
|
+
meta: {
|
|
183
|
+
name: 'research',
|
|
184
|
+
description: 'Deep research using Exa AI',
|
|
185
|
+
},
|
|
186
|
+
subCommands: {
|
|
187
|
+
start: startCommand,
|
|
188
|
+
check: checkCommand,
|
|
189
|
+
},
|
|
190
|
+
});
|
|
191
|
+
//# sourceMappingURL=research.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"research.js","sourceRoot":"","sources":["../../src/commands/research.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAG/C,MAAM,YAAY,GAAG,CAAC,mBAAmB,EAAE,cAAc,EAAE,kBAAkB,CAAU,CAAA;AACvF,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAU,CAAA;AAE3D,MAAM,YAAY,GAAG,aAAa,CAAC;IACjC,IAAI,EAAE;QACJ,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,gCAAgC;KAC9C;IACD,IAAI,EAAE;QACJ,YAAY,EAAE;YACZ,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,gCAAgC;SAC9C;QACD,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,mBAAmB;YAC5B,WAAW,EAAE,mBAAmB,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;SAC3D;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,kBAAkB,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;SAC3D;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,kBAAkB;SAChC;KACF;IACD,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE;QAChB,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;QAE/D,MAAM,aAAa,G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AAA;YACnE,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAA;YACpG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACjB,CAAC;gBAAS,CAAC;YACT,MAAM,MAAM,CAAC,KAAK,EAAE,CAAA;QACtB,CAAC;IACH,CAAC;CACF,CAAC,CAAA;AAEF,eAAe,aAAa,CAAC;IAC3B,IAAI,EAAE;QACJ,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,4BAA4B;KAC1C;IACD,WAAW,EAAE;QACX,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,YAAY;KACpB;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search Advanced command - Wraps the MCP web_search_advanced_exa tool
|
|
3
|
+
*/
|
|
4
|
+
declare const _default: import("citty").CommandDef<{
|
|
5
|
+
query: {
|
|
6
|
+
type: "positional";
|
|
7
|
+
required: true;
|
|
8
|
+
description: string;
|
|
9
|
+
};
|
|
10
|
+
num: {
|
|
11
|
+
type: "string";
|
|
12
|
+
default: string;
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
type: {
|
|
16
|
+
type: "string";
|
|
17
|
+
default: string;
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
category: {
|
|
21
|
+
type: "string";
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
'include-domains': {
|
|
25
|
+
type: "string";
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
'exclude-domains': {
|
|
29
|
+
type: "string";
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
'start-date': {
|
|
33
|
+
type: "string";
|
|
34
|
+
description: string;
|
|
35
|
+
};
|
|
36
|
+
'end-date': {
|
|
37
|
+
type: "string";
|
|
38
|
+
description: string;
|
|
39
|
+
};
|
|
40
|
+
highlights: {
|
|
41
|
+
type: "boolean";
|
|
42
|
+
description: string;
|
|
43
|
+
};
|
|
44
|
+
summary: {
|
|
45
|
+
type: "boolean";
|
|
46
|
+
description: string;
|
|
47
|
+
};
|
|
48
|
+
livecrawl: {
|
|
49
|
+
type: "string";
|
|
50
|
+
default: string;
|
|
51
|
+
description: string;
|
|
52
|
+
};
|
|
53
|
+
format: {
|
|
54
|
+
type: "string";
|
|
55
|
+
default: string;
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
'api-key': {
|
|
59
|
+
type: "string";
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
}>;
|
|
63
|
+
export default _default;
|
|
64
|
+
//# sourceMappingURL=search-advanced.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-advanced.d.ts","sourceRoot":"","sources":["../../src/commands/search-advanced.ts"],"names":[],"mappings":"AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaH,wBAwJE"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search Advanced command - Wraps the MCP web_search_advanced_exa tool
|
|
3
|
+
*/
|
|
4
|
+
import { defineCommand } from 'citty';
|
|
5
|
+
import { consola } from 'consola';
|
|
6
|
+
import { getMcpClient } from '../lib/mcp-client.js';
|
|
7
|
+
import { formatOutput } from '../lib/output.js';
|
|
8
|
+
const VALID_TYPES = ['auto', 'fast', 'neural'];
|
|
9
|
+
const VALID_LIVECRAWL = ['never', 'fallback', 'preferred', 'always'];
|
|
10
|
+
const VALID_FORMATS = ['text', 'json', 'markdown'];
|
|
11
|
+
const VALID_CATEGORIES = ['company', 'research paper', 'news', 'tweet', 'personal site', 'people', 'financial report'];
|
|
12
|
+
export default defineCommand({
|
|
13
|
+
meta: {
|
|
14
|
+
name: 'search-advanced',
|
|
15
|
+
description: 'Advanced web search with filters',
|
|
16
|
+
},
|
|
17
|
+
args: {
|
|
18
|
+
query: {
|
|
19
|
+
type: 'positional',
|
|
20
|
+
required: true,
|
|
21
|
+
description: 'Search query',
|
|
22
|
+
},
|
|
23
|
+
num: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
default: '10',
|
|
26
|
+
description: 'Number of results (max 100)',
|
|
27
|
+
},
|
|
28
|
+
type: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
default: 'auto',
|
|
31
|
+
description: `Search type (${VALID_TYPES.join(', ')})`,
|
|
32
|
+
},
|
|
33
|
+
category: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
description: `Category filter (${VALID_CATEGORIES.join(', ')})`,
|
|
36
|
+
},
|
|
37
|
+
'include-domains': {
|
|
38
|
+
type: 'string',
|
|
39
|
+
description: 'Comma-separated domains to include',
|
|
40
|
+
},
|
|
41
|
+
'exclude-domains': {
|
|
42
|
+
type: 'string',
|
|
43
|
+
description: 'Comma-separated domains to exclude',
|
|
44
|
+
},
|
|
45
|
+
'start-date': {
|
|
46
|
+
type: 'string',
|
|
47
|
+
description: 'Start published date (YYYY-MM-DD)',
|
|
48
|
+
},
|
|
49
|
+
'end-date': {
|
|
50
|
+
type: 'string',
|
|
51
|
+
description: 'End published date (YYYY-MM-DD)',
|
|
52
|
+
},
|
|
53
|
+
highlights: {
|
|
54
|
+
type: 'boolean',
|
|
55
|
+
description: 'Enable highlights',
|
|
56
|
+
},
|
|
57
|
+
summary: {
|
|
58
|
+
type: 'boolean',
|
|
59
|
+
description: 'Enable summaries',
|
|
60
|
+
},
|
|
61
|
+
livecrawl: {
|
|
62
|
+
type: 'string',
|
|
63
|
+
default: 'fallback',
|
|
64
|
+
description: `Live crawl mode (${VALID_LIVECRAWL.join(', ')})`,
|
|
65
|
+
},
|
|
66
|
+
format: {
|
|
67
|
+
type: 'string',
|
|
68
|
+
default: 'text',
|
|
69
|
+
description: `Output format (${VALID_FORMATS.join(', ')})`,
|
|
70
|
+
},
|
|
71
|
+
'api-key': {
|
|
72
|
+
type: 'string',
|
|
73
|
+
description: 'Override API key',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
async run({ args }) {
|
|
77
|
+
const { query, num, type, category, 'include-domains': includeDomains, 'exclude-domains': excludeDomains, 'start-date': startDate, 'end-date': endDate, highlights, summary, livecrawl, format, 'api-key': apiKey, } = args;
|
|
78
|
+
const numResults = Math.min(parseInt(String(num), 10) || 10, 100);
|
|
79
|
+
const searchType = VALID_TYPES.includes(type) ? type : 'auto';
|
|
80
|
+
const livecrawlMode = VALID_LIVECRAWL.includes(livecrawl) ? livecrawl : 'fallback';
|
|
81
|
+
const outputFormat = VALID_FORMATS.includes(format) ? format : 'text';
|
|
82
|
+
// Parse category if provided
|
|
83
|
+
const categoryValue = category && VALID_CATEGORIES.includes(category)
|
|
84
|
+
? category
|
|
85
|
+
: undefined;
|
|
86
|
+
// Parse include-domains and exclude-domains as arrays
|
|
87
|
+
const includeDomainsArray = includeDomains
|
|
88
|
+
? String(includeDomains).split(',').map(d => d.trim()).filter(Boolean)
|
|
89
|
+
: undefined;
|
|
90
|
+
const excludeDomainsArray = excludeDomains
|
|
91
|
+
? String(excludeDomains).split(',').map(d => d.trim()).filter(Boolean)
|
|
92
|
+
: undefined;
|
|
93
|
+
// Build args object, only including defined optional params
|
|
94
|
+
const toolArgs = {
|
|
95
|
+
query,
|
|
96
|
+
numResults,
|
|
97
|
+
type: searchType,
|
|
98
|
+
livecrawl: livecrawlMode,
|
|
99
|
+
};
|
|
100
|
+
if (categoryValue) {
|
|
101
|
+
toolArgs.category = categoryValue;
|
|
102
|
+
}
|
|
103
|
+
if (includeDomainsArray && includeDomainsArray.length > 0) {
|
|
104
|
+
toolArgs.includeDomains = includeDomainsArray;
|
|
105
|
+
}
|
|
106
|
+
if (excludeDomainsArray && excludeDomainsArray.length > 0) {
|
|
107
|
+
toolArgs.excludeDomains = excludeDomainsArray;
|
|
108
|
+
}
|
|
109
|
+
if (startDate) {
|
|
110
|
+
toolArgs.startPublishedDate = startDate;
|
|
111
|
+
}
|
|
112
|
+
if (endDate) {
|
|
113
|
+
toolArgs.endPublishedDate = endDate;
|
|
114
|
+
}
|
|
115
|
+
if (highlights) {
|
|
116
|
+
toolArgs.highlights = true;
|
|
117
|
+
}
|
|
118
|
+
if (summary) {
|
|
119
|
+
toolArgs.summary = true;
|
|
120
|
+
}
|
|
121
|
+
const client = getMcpClient();
|
|
122
|
+
try {
|
|
123
|
+
await client.connect(apiKey);
|
|
124
|
+
const result = await client.callTool('web_search_advanced_exa', toolArgs);
|
|
125
|
+
const output = formatOutput(result, outputFormat);
|
|
126
|
+
console.log(output);
|
|
127
|
+
}
|
|
128
|
+
catch (error) {
|
|
129
|
+
consola.error('Search failed:', error instanceof Error ? error.message : 'Unknown error');
|
|
130
|
+
process.exit(1);
|
|
131
|
+
}
|
|
132
|
+
finally {
|
|
133
|
+
await client.close();
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
//# sourceMappingURL=search-advanced.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-advanced.js","sourceRoot":"","sources":["../../src/commands/search-advanced.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAG/C,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAU,CAAA;AACvD,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,CAAU,CAAA;AAC7E,MAAM,aAAa,GAAG,CAAC,MAAM,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,EAAE,CAAC;YACZ,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAA;QACzB,CAAC;QAED,MAAM,MAAM,GAAG,YAAY,EAAE,CAAA;QAE7B,IAAI,CAAC;YACH,MAAM,MAAM,CAAC,OAAO,CAAC,MAA4B,CAAC,CAAA;YAElD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,yBAAyB,EAAE,QAAQ,CAAC,CAAA;YAEzE,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;YACjD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QACrB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAA;YACzF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACjB,CAAC;gBAAS,CAAC;YACT,MAAM,MAAM,CAAC,KAAK,EAAE,CAAA;QACtB,CAAC;IACH,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search command - Wraps the MCP web_search_exa tool
|
|
3
|
+
*/
|
|
4
|
+
declare const _default: import("citty").CommandDef<{
|
|
5
|
+
query: {
|
|
6
|
+
type: "positional";
|
|
7
|
+
required: true;
|
|
8
|
+
description: string;
|
|
9
|
+
};
|
|
10
|
+
num: {
|
|
11
|
+
type: "string";
|
|
12
|
+
default: string;
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
type: {
|
|
16
|
+
type: "string";
|
|
17
|
+
default: string;
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
livecrawl: {
|
|
21
|
+
type: "string";
|
|
22
|
+
default: string;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
format: {
|
|
26
|
+
type: "string";
|
|
27
|
+
default: string;
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
'api-key': {
|
|
31
|
+
type: "string";
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
}>;
|
|
35
|
+
export default _default;
|
|
36
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/commands/search.ts"],"names":[],"mappings":"AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYH,wBAiEE"}
|