@botmem/cli 0.35.1 → 0.35.3
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.
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
interface CliCommandDefinition {
|
|
2
|
+
id: string;
|
|
3
|
+
cli?: {
|
|
4
|
+
name: string;
|
|
5
|
+
summary: string;
|
|
6
|
+
usage: string[];
|
|
7
|
+
options?: Array<{
|
|
8
|
+
flag: string;
|
|
9
|
+
description: string;
|
|
10
|
+
}>;
|
|
11
|
+
examples?: string[];
|
|
12
|
+
};
|
|
13
|
+
}
|
|
2
14
|
export declare function renderCliHelp(commandId: string): string | null;
|
|
3
15
|
export declare function registryCliHelp(commandId: string, fallback: string): string;
|
|
4
|
-
export declare function getRegisteredCommand(commandId: string):
|
|
16
|
+
export declare function getRegisteredCommand(commandId: string): CliCommandDefinition | undefined;
|
|
17
|
+
export {};
|
package/dist/command-registry.js
CHANGED
|
@@ -3,7 +3,90 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.renderCliHelp = renderCliHelp;
|
|
4
4
|
exports.registryCliHelp = registryCliHelp;
|
|
5
5
|
exports.getRegisteredCommand = getRegisteredCommand;
|
|
6
|
-
const
|
|
6
|
+
const CLI_COMMANDS = [
|
|
7
|
+
{
|
|
8
|
+
id: 'search',
|
|
9
|
+
cli: {
|
|
10
|
+
name: 'search',
|
|
11
|
+
summary: 'Search memories semantically',
|
|
12
|
+
usage: ['botmem search <query> [options]'],
|
|
13
|
+
options: [
|
|
14
|
+
{
|
|
15
|
+
flag: '--source <type>',
|
|
16
|
+
description: 'Filter by source (email, message, photo, location)',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
flag: '--connector <type>',
|
|
20
|
+
description: 'Filter by connector (gmail, slack, whatsapp, imessage, locations)',
|
|
21
|
+
},
|
|
22
|
+
{ flag: '--contact <id>', description: 'Filter by contact UUID' },
|
|
23
|
+
{ flag: '--from-me, --me', description: 'Only return messages authored by you' },
|
|
24
|
+
{ flag: '--memory-bank <id>', description: 'Filter by memory bank ID' },
|
|
25
|
+
{ flag: '--limit <n>', description: 'Max results (default: 20)' },
|
|
26
|
+
{ flag: '--debug', description: 'Include search planner and lane diagnostics' },
|
|
27
|
+
{ flag: '--json', description: 'Output raw JSON' },
|
|
28
|
+
],
|
|
29
|
+
examples: [
|
|
30
|
+
'botmem search "dinner plans"',
|
|
31
|
+
'botmem search "meeting" --connector gmail --limit 5',
|
|
32
|
+
'botmem search "photos from dubai" --source photo --json',
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: 'timeline',
|
|
38
|
+
cli: {
|
|
39
|
+
name: 'timeline',
|
|
40
|
+
summary: 'Query memories by time range',
|
|
41
|
+
usage: ['botmem timeline [options]'],
|
|
42
|
+
options: [
|
|
43
|
+
{ flag: '--from <date>', description: 'Start date (ISO 8601, e.g. 2025-01-01)' },
|
|
44
|
+
{ flag: '--to <date>', description: 'End date (ISO 8601, e.g. 2025-01-31)' },
|
|
45
|
+
{ flag: '--query <text>', description: 'Filter by text content' },
|
|
46
|
+
{ flag: '--connector <type>', description: 'Filter by connector' },
|
|
47
|
+
{ flag: '--source <type>', description: 'Filter by source type' },
|
|
48
|
+
{ flag: '--from-me, --me', description: 'Only return messages authored by you' },
|
|
49
|
+
{ flag: '--limit <n>', description: 'Max results (default: 50)' },
|
|
50
|
+
{ flag: '--json', description: 'Output raw JSON' },
|
|
51
|
+
],
|
|
52
|
+
examples: [
|
|
53
|
+
'botmem timeline --from 2025-01-01 --to 2025-01-31',
|
|
54
|
+
'botmem timeline --from 2025-06-01 --query "meeting"',
|
|
55
|
+
'botmem timeline --connector gmail --limit 20',
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 'memories',
|
|
61
|
+
cli: {
|
|
62
|
+
name: 'memories',
|
|
63
|
+
summary: 'List recent memories',
|
|
64
|
+
usage: ['botmem memories [options]'],
|
|
65
|
+
options: [
|
|
66
|
+
{ flag: '--limit <n>', description: 'Max results (default: 50)' },
|
|
67
|
+
{ flag: '--offset <n>', description: 'Skip first N results' },
|
|
68
|
+
{
|
|
69
|
+
flag: '--source <type>',
|
|
70
|
+
description: 'Filter by source (email, message, photo, location)',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
flag: '--connector <type>',
|
|
74
|
+
description: 'Filter by connector (gmail, slack, whatsapp, imessage, locations)',
|
|
75
|
+
},
|
|
76
|
+
{ flag: '--json', description: 'Output raw JSON' },
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: 'stats',
|
|
82
|
+
cli: {
|
|
83
|
+
name: 'stats',
|
|
84
|
+
summary: 'Memory count breakdown',
|
|
85
|
+
usage: ['botmem stats [--json]'],
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
];
|
|
89
|
+
const CLI_COMMANDS_BY_ID = Object.fromEntries(CLI_COMMANDS.map((command) => [command.id, command]));
|
|
7
90
|
function plainBold(s) {
|
|
8
91
|
return `\x1b[1m${s}\x1b[0m`;
|
|
9
92
|
}
|
|
@@ -11,7 +94,7 @@ function padRight(value, width) {
|
|
|
11
94
|
return value + ' '.repeat(Math.max(1, width - value.length));
|
|
12
95
|
}
|
|
13
96
|
function renderCliHelp(commandId) {
|
|
14
|
-
const command =
|
|
97
|
+
const command = CLI_COMMANDS_BY_ID[commandId]?.cli;
|
|
15
98
|
if (!command)
|
|
16
99
|
return null;
|
|
17
100
|
const lines = [
|
|
@@ -39,6 +122,6 @@ function registryCliHelp(commandId, fallback) {
|
|
|
39
122
|
return renderCliHelp(commandId) ?? fallback;
|
|
40
123
|
}
|
|
41
124
|
function getRegisteredCommand(commandId) {
|
|
42
|
-
return
|
|
125
|
+
return CLI_COMMANDS_BY_ID[commandId];
|
|
43
126
|
}
|
|
44
127
|
//# sourceMappingURL=command-registry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-registry.js","sourceRoot":"","sources":["../src/command-registry.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"command-registry.js","sourceRoot":"","sources":["../src/command-registry.ts"],"names":[],"mappings":";;AA2GA,sCA2BC;AAED,0CAEC;AAED,oDAEC;AAnID,MAAM,YAAY,GAAG;IACnB;QACE,EAAE,EAAE,QAAQ;QACZ,GAAG,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,8BAA8B;YACvC,KAAK,EAAE,CAAC,iCAAiC,CAAC;YAC1C,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,iBAAiB;oBACvB,WAAW,EAAE,oDAAoD;iBAClE;gBACD;oBACE,IAAI,EAAE,oBAAoB;oBAC1B,WAAW,EAAE,mEAAmE;iBACjF;gBACD,EAAE,IAAI,EAAE,gBAAgB,EAAE,WAAW,EAAE,wBAAwB,EAAE;gBACjE,EAAE,IAAI,EAAE,iBAAiB,EAAE,WAAW,EAAE,sCAAsC,EAAE;gBAChF,EAAE,IAAI,EAAE,oBAAoB,EAAE,WAAW,EAAE,0BAA0B,EAAE;gBACvE,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,2BAA2B,EAAE;gBACjE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,6CAA6C,EAAE;gBAC/E,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,iBAAiB,EAAE;aACnD;YACD,QAAQ,EAAE;gBACR,8BAA8B;gBAC9B,qDAAqD;gBACrD,yDAAyD;aAC1D;SACF;KACF;IACD;QACE,EAAE,EAAE,UAAU;QACd,GAAG,EAAE;YACH,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,8BAA8B;YACvC,KAAK,EAAE,CAAC,2BAA2B,CAAC;YACpC,OAAO,EAAE;gBACP,EAAE,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,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C,IAAI,EAAE,KAAK,CAAC,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;IAED,IAAI,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;QAC7B,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;QAC7B,KAAK,MAAM,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;YACvC,KAAK,CAAC,IAAI,CAAC,OAAO,OAAO,EAAE,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;AACjC,CAAC;AAED,SAAgB,eAAe,CAAC,SAAiB,EAAE,QAAgB;IACjE,OAAO,aAAa,CAAC,SAAS,CAAC,IAAI,QAAQ,CAAC;AAC9C,CAAC;AAED,SAAgB,oBAAoB,CAAC,SAAiB;IACpD,OAAO,kBAAkB,CAAC,SAAS,CAAC,CAAC;AACvC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botmem/cli",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.3",
|
|
4
4
|
"description": "CLI for Botmem — query and manage your personal memory system",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
"typescript": "catalog:"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@botmem/shared": "workspace:*",
|
|
44
43
|
"@toon-format/toon": "^2.1.0"
|
|
45
44
|
}
|
|
46
45
|
}
|