@lanonasis/cli 3.6.4 → 3.6.5
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/dist/commands/api-keys.d.ts +1 -2
- package/dist/commands/api-keys.js +78 -73
- package/dist/commands/auth.js +167 -160
- package/dist/commands/completion.js +39 -31
- package/dist/commands/config.js +201 -162
- package/dist/commands/enhanced-memory.js +17 -11
- package/dist/commands/guide.js +88 -79
- package/dist/commands/init.js +20 -14
- package/dist/commands/mcp.js +173 -142
- package/dist/commands/memory.js +83 -77
- package/dist/commands/organization.js +21 -15
- package/dist/commands/topics.js +58 -52
- package/dist/core/achievements.js +26 -19
- package/dist/core/architecture.js +59 -42
- package/dist/core/dashboard.js +81 -71
- package/dist/core/error-handler.js +39 -30
- package/dist/core/power-mode.js +53 -46
- package/dist/core/progress.js +44 -35
- package/dist/core/welcome.js +64 -56
- package/dist/enhanced-cli.js +58 -49
- package/dist/index-simple.js +112 -74
- package/dist/index.js +68 -63
- package/dist/mcp/access-control.js +17 -13
- package/dist/mcp/client/enhanced-client.js +23 -16
- package/dist/mcp/enhanced-server.js +14 -10
- package/dist/mcp/logger.js +6 -2
- package/dist/mcp/memory-state.js +17 -13
- package/dist/mcp/schemas/tool-schemas.d.ts +28 -28
- package/dist/mcp/schemas/tool-schemas.js +126 -122
- package/dist/mcp/server/lanonasis-server.js +51 -44
- package/dist/mcp/transports/transport-manager.js +25 -18
- package/dist/mcp/vector-store.js +10 -6
- package/dist/mcp-server.js +21 -17
- package/dist/utils/api.js +30 -21
- package/dist/utils/config.js +59 -13
- package/dist/utils/formatting.js +14 -6
- package/dist/utils/mcp-client.js +132 -77
- package/package.json +17 -93
- package/dist/completions/bash-completion.sh +0 -88
- package/dist/completions/fish-completion.fish +0 -132
- package/dist/completions/zsh-completion.zsh +0 -196
package/dist/commands/memory.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.memoryCommands = memoryCommands;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
9
|
+
const ora_1 = __importDefault(require("ora"));
|
|
10
|
+
const table_1 = require("table");
|
|
11
|
+
const word_wrap_1 = __importDefault(require("word-wrap"));
|
|
12
|
+
const date_fns_1 = require("date-fns");
|
|
13
|
+
const api_js_1 = require("../utils/api.js");
|
|
14
|
+
const formatting_js_1 = require("../utils/formatting.js");
|
|
15
|
+
function memoryCommands(program) {
|
|
10
16
|
// Create memory
|
|
11
17
|
program
|
|
12
18
|
.command('create')
|
|
@@ -22,7 +28,7 @@ export function memoryCommands(program) {
|
|
|
22
28
|
try {
|
|
23
29
|
let { title, content, type, tags, topicId, interactive } = options;
|
|
24
30
|
if (interactive || (!title || !content)) {
|
|
25
|
-
const answers = await
|
|
31
|
+
const answers = await inquirer_1.default.prompt([
|
|
26
32
|
{
|
|
27
33
|
type: 'input',
|
|
28
34
|
name: 'title',
|
|
@@ -56,7 +62,7 @@ export function memoryCommands(program) {
|
|
|
56
62
|
type = answers.type;
|
|
57
63
|
tags = answers.tags;
|
|
58
64
|
}
|
|
59
|
-
const spinner =
|
|
65
|
+
const spinner = (0, ora_1.default)('Creating memory...').start();
|
|
60
66
|
const memoryData = {
|
|
61
67
|
title,
|
|
62
68
|
content,
|
|
@@ -68,11 +74,11 @@ export function memoryCommands(program) {
|
|
|
68
74
|
if (topicId) {
|
|
69
75
|
memoryData.topic_id = topicId;
|
|
70
76
|
}
|
|
71
|
-
const memory = await apiClient.createMemory(memoryData);
|
|
77
|
+
const memory = await api_js_1.apiClient.createMemory(memoryData);
|
|
72
78
|
spinner.succeed('Memory created successfully');
|
|
73
79
|
console.log();
|
|
74
|
-
console.log(
|
|
75
|
-
console.log(` ID: ${
|
|
80
|
+
console.log(chalk_1.default.green('✓ Memory created:'));
|
|
81
|
+
console.log(` ID: ${chalk_1.default.cyan(memory.id)}`);
|
|
76
82
|
console.log(` Title: ${memory.title}`);
|
|
77
83
|
console.log(` Type: ${memory.memory_type}`);
|
|
78
84
|
if (memory.tags && memory.tags.length > 0) {
|
|
@@ -81,7 +87,7 @@ export function memoryCommands(program) {
|
|
|
81
87
|
}
|
|
82
88
|
catch (error) {
|
|
83
89
|
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
84
|
-
console.error(
|
|
90
|
+
console.error(chalk_1.default.red('✖ Failed to create memory:'), errorMessage);
|
|
85
91
|
process.exit(1);
|
|
86
92
|
}
|
|
87
93
|
});
|
|
@@ -99,7 +105,7 @@ export function memoryCommands(program) {
|
|
|
99
105
|
.option('--order <order>', 'sort order (asc, desc)', 'desc')
|
|
100
106
|
.action(async (options) => {
|
|
101
107
|
try {
|
|
102
|
-
const spinner =
|
|
108
|
+
const spinner = (0, ora_1.default)('Fetching memories...').start();
|
|
103
109
|
const params = {
|
|
104
110
|
page: parseInt(options.page || '1'),
|
|
105
111
|
limit: parseInt(options.limit || '20'),
|
|
@@ -112,15 +118,15 @@ export function memoryCommands(program) {
|
|
|
112
118
|
params.tags = options.tags;
|
|
113
119
|
if (options.userId)
|
|
114
120
|
params.user_id = options.userId;
|
|
115
|
-
const result = await apiClient.getMemories(params);
|
|
121
|
+
const result = await api_js_1.apiClient.getMemories(params);
|
|
116
122
|
spinner.stop();
|
|
117
123
|
const memories = result.memories || result.data || [];
|
|
118
124
|
if (memories.length === 0) {
|
|
119
|
-
console.log(
|
|
125
|
+
console.log(chalk_1.default.yellow('No memories found'));
|
|
120
126
|
return;
|
|
121
127
|
}
|
|
122
|
-
console.log(
|
|
123
|
-
console.log(
|
|
128
|
+
console.log(chalk_1.default.blue.bold(`\n📚 Memories (${result.pagination.total} total)`));
|
|
129
|
+
console.log(chalk_1.default.gray(`Page ${result.pagination.page || 1} of ${result.pagination.pages || Math.ceil(result.pagination.total / result.pagination.limit)}`));
|
|
124
130
|
console.log();
|
|
125
131
|
const outputFormat = process.env.CLI_OUTPUT_FORMAT || 'table';
|
|
126
132
|
if (outputFormat === 'json') {
|
|
@@ -129,10 +135,10 @@ export function memoryCommands(program) {
|
|
|
129
135
|
else {
|
|
130
136
|
// Table format
|
|
131
137
|
const tableData = memories.map((memory) => [
|
|
132
|
-
truncateText(memory.title, 30),
|
|
138
|
+
(0, formatting_js_1.truncateText)(memory.title, 30),
|
|
133
139
|
memory.memory_type,
|
|
134
140
|
memory.tags.slice(0, 3).join(', '),
|
|
135
|
-
format(new Date(memory.created_at), 'MMM dd, yyyy'),
|
|
141
|
+
(0, date_fns_1.format)(new Date(memory.created_at), 'MMM dd, yyyy'),
|
|
136
142
|
memory.access_count
|
|
137
143
|
]);
|
|
138
144
|
const tableConfig = {
|
|
@@ -149,19 +155,19 @@ export function memoryCommands(program) {
|
|
|
149
155
|
{ width: 8 }
|
|
150
156
|
]
|
|
151
157
|
};
|
|
152
|
-
console.log(table([tableConfig.header, ...tableData], {
|
|
158
|
+
console.log((0, table_1.table)([tableConfig.header, ...tableData], {
|
|
153
159
|
columnDefault: tableConfig.columnDefault,
|
|
154
160
|
columns: tableConfig.columns
|
|
155
161
|
}));
|
|
156
162
|
// Pagination info
|
|
157
163
|
if (result.pagination.pages > 1) {
|
|
158
|
-
console.log(
|
|
164
|
+
console.log(chalk_1.default.gray(`\nUse --page ${result.pagination.page + 1} for next page`));
|
|
159
165
|
}
|
|
160
166
|
}
|
|
161
167
|
}
|
|
162
168
|
catch (error) {
|
|
163
169
|
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
164
|
-
console.error(
|
|
170
|
+
console.error(chalk_1.default.red('✖ Failed to list memories:'), errorMessage);
|
|
165
171
|
process.exit(1);
|
|
166
172
|
}
|
|
167
173
|
});
|
|
@@ -176,7 +182,7 @@ export function memoryCommands(program) {
|
|
|
176
182
|
.option('--tags <tags>', 'filter by tags (comma-separated)')
|
|
177
183
|
.action(async (query, options) => {
|
|
178
184
|
try {
|
|
179
|
-
const spinner =
|
|
185
|
+
const spinner = (0, ora_1.default)(`Searching for "${query}"...`).start();
|
|
180
186
|
const searchOptions = {
|
|
181
187
|
limit: parseInt(options.limit || '20'),
|
|
182
188
|
threshold: parseFloat(options.threshold || '0.7')
|
|
@@ -187,30 +193,30 @@ export function memoryCommands(program) {
|
|
|
187
193
|
if (options.tags) {
|
|
188
194
|
searchOptions.tags = options.tags.split(',').map((t) => t.trim());
|
|
189
195
|
}
|
|
190
|
-
const result = await apiClient.searchMemories(query, searchOptions);
|
|
196
|
+
const result = await api_js_1.apiClient.searchMemories(query, searchOptions);
|
|
191
197
|
spinner.stop();
|
|
192
198
|
const results = result.results || result.data || [];
|
|
193
199
|
if (results.length === 0) {
|
|
194
|
-
console.log(
|
|
200
|
+
console.log(chalk_1.default.yellow('No memories found matching your search'));
|
|
195
201
|
return;
|
|
196
202
|
}
|
|
197
|
-
console.log(
|
|
198
|
-
console.log(
|
|
203
|
+
console.log(chalk_1.default.blue.bold(`\n🔍 Search Results (${result.total_results || results.length} found)`));
|
|
204
|
+
console.log(chalk_1.default.gray(`Query: "${query}" | Search time: ${result.search_time_ms || 0}ms`));
|
|
199
205
|
console.log();
|
|
200
206
|
results.forEach((memory, index) => {
|
|
201
207
|
const score = (memory.relevance_score * 100).toFixed(1);
|
|
202
|
-
console.log(
|
|
203
|
-
console.log(
|
|
204
|
-
console.log(
|
|
208
|
+
console.log(chalk_1.default.green(`${index + 1}. ${memory.title}`) + chalk_1.default.gray(` (${score}% match)`));
|
|
209
|
+
console.log(chalk_1.default.white(` ${(0, formatting_js_1.truncateText)(memory.content, 100)}`));
|
|
210
|
+
console.log(chalk_1.default.cyan(` ID: ${memory.id}`) + chalk_1.default.gray(` | Type: ${memory.memory_type}`));
|
|
205
211
|
if (memory.tags.length > 0) {
|
|
206
|
-
console.log(
|
|
212
|
+
console.log(chalk_1.default.yellow(` Tags: ${memory.tags.join(', ')}`));
|
|
207
213
|
}
|
|
208
214
|
console.log();
|
|
209
215
|
});
|
|
210
216
|
}
|
|
211
217
|
catch (error) {
|
|
212
218
|
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
213
|
-
console.error(
|
|
219
|
+
console.error(chalk_1.default.red('✖ Search failed:'), errorMessage);
|
|
214
220
|
process.exit(1);
|
|
215
221
|
}
|
|
216
222
|
});
|
|
@@ -222,38 +228,38 @@ export function memoryCommands(program) {
|
|
|
222
228
|
.argument('<id>', 'memory ID')
|
|
223
229
|
.action(async (id) => {
|
|
224
230
|
try {
|
|
225
|
-
const spinner =
|
|
226
|
-
const memory = await apiClient.getMemory(id);
|
|
231
|
+
const spinner = (0, ora_1.default)('Fetching memory...').start();
|
|
232
|
+
const memory = await api_js_1.apiClient.getMemory(id);
|
|
227
233
|
spinner.stop();
|
|
228
|
-
console.log(
|
|
234
|
+
console.log(chalk_1.default.blue.bold('\n📄 Memory Details'));
|
|
229
235
|
console.log();
|
|
230
|
-
console.log(
|
|
231
|
-
console.log(
|
|
232
|
-
console.log(
|
|
233
|
-
console.log(
|
|
234
|
-
console.log(
|
|
236
|
+
console.log(chalk_1.default.green('Title:'), memory.title);
|
|
237
|
+
console.log(chalk_1.default.green('ID:'), chalk_1.default.cyan(memory.id));
|
|
238
|
+
console.log(chalk_1.default.green('Type:'), memory.memory_type);
|
|
239
|
+
console.log(chalk_1.default.green('Created:'), (0, date_fns_1.format)(new Date(memory.created_at), 'PPpp'));
|
|
240
|
+
console.log(chalk_1.default.green('Updated:'), (0, date_fns_1.format)(new Date(memory.updated_at), 'PPpp'));
|
|
235
241
|
if (memory.last_accessed) {
|
|
236
|
-
console.log(
|
|
242
|
+
console.log(chalk_1.default.green('Last Accessed:'), (0, date_fns_1.format)(new Date(memory.last_accessed), 'PPpp'));
|
|
237
243
|
}
|
|
238
|
-
console.log(
|
|
244
|
+
console.log(chalk_1.default.green('Access Count:'), memory.access_count);
|
|
239
245
|
if (memory.tags && memory.tags.length > 0) {
|
|
240
|
-
console.log(
|
|
246
|
+
console.log(chalk_1.default.green('Tags:'), memory.tags.join(', '));
|
|
241
247
|
}
|
|
242
248
|
if (memory.topic_id) {
|
|
243
|
-
console.log(
|
|
249
|
+
console.log(chalk_1.default.green('Topic ID:'), memory.topic_id);
|
|
244
250
|
}
|
|
245
251
|
console.log();
|
|
246
|
-
console.log(
|
|
247
|
-
console.log(
|
|
252
|
+
console.log(chalk_1.default.green('Content:'));
|
|
253
|
+
console.log((0, word_wrap_1.default)(memory.content, { width: 80, indent: ' ' }));
|
|
248
254
|
if (memory.metadata && Object.keys(memory.metadata).length > 0) {
|
|
249
255
|
console.log();
|
|
250
|
-
console.log(
|
|
256
|
+
console.log(chalk_1.default.green('Metadata:'));
|
|
251
257
|
console.log(JSON.stringify(memory.metadata, null, 2));
|
|
252
258
|
}
|
|
253
259
|
}
|
|
254
260
|
catch (error) {
|
|
255
261
|
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
256
|
-
console.error(
|
|
262
|
+
console.error(chalk_1.default.red('✖ Failed to get memory:'), errorMessage);
|
|
257
263
|
process.exit(1);
|
|
258
264
|
}
|
|
259
265
|
});
|
|
@@ -272,10 +278,10 @@ export function memoryCommands(program) {
|
|
|
272
278
|
let updateData = {};
|
|
273
279
|
if (options.interactive) {
|
|
274
280
|
// First, get current memory data
|
|
275
|
-
const spinner =
|
|
276
|
-
const currentMemory = await apiClient.getMemory(id);
|
|
281
|
+
const spinner = (0, ora_1.default)('Fetching current memory...').start();
|
|
282
|
+
const currentMemory = await api_js_1.apiClient.getMemory(id);
|
|
277
283
|
spinner.stop();
|
|
278
|
-
const answers = await
|
|
284
|
+
const answers = await inquirer_1.default.prompt([
|
|
279
285
|
{
|
|
280
286
|
type: 'input',
|
|
281
287
|
name: 'title',
|
|
@@ -321,20 +327,20 @@ export function memoryCommands(program) {
|
|
|
321
327
|
}
|
|
322
328
|
}
|
|
323
329
|
if (Object.keys(updateData).length === 0) {
|
|
324
|
-
console.log(
|
|
330
|
+
console.log(chalk_1.default.yellow('No updates specified'));
|
|
325
331
|
return;
|
|
326
332
|
}
|
|
327
|
-
const spinner =
|
|
328
|
-
const memory = await apiClient.updateMemory(id, updateData);
|
|
333
|
+
const spinner = (0, ora_1.default)('Updating memory...').start();
|
|
334
|
+
const memory = await api_js_1.apiClient.updateMemory(id, updateData);
|
|
329
335
|
spinner.succeed('Memory updated successfully');
|
|
330
336
|
console.log();
|
|
331
|
-
console.log(
|
|
332
|
-
console.log(` ID: ${
|
|
337
|
+
console.log(chalk_1.default.green('✓ Memory updated:'));
|
|
338
|
+
console.log(` ID: ${chalk_1.default.cyan(memory.id)}`);
|
|
333
339
|
console.log(` Title: ${memory.title}`);
|
|
334
340
|
}
|
|
335
341
|
catch (error) {
|
|
336
342
|
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
337
|
-
console.error(
|
|
343
|
+
console.error(chalk_1.default.red('✖ Failed to update memory:'), errorMessage);
|
|
338
344
|
process.exit(1);
|
|
339
345
|
}
|
|
340
346
|
});
|
|
@@ -348,8 +354,8 @@ export function memoryCommands(program) {
|
|
|
348
354
|
.action(async (id, options) => {
|
|
349
355
|
try {
|
|
350
356
|
if (!options.force) {
|
|
351
|
-
const memory = await apiClient.getMemory(id);
|
|
352
|
-
const answer = await
|
|
357
|
+
const memory = await api_js_1.apiClient.getMemory(id);
|
|
358
|
+
const answer = await inquirer_1.default.prompt([
|
|
353
359
|
{
|
|
354
360
|
type: 'confirm',
|
|
355
361
|
name: 'confirm',
|
|
@@ -358,17 +364,17 @@ export function memoryCommands(program) {
|
|
|
358
364
|
}
|
|
359
365
|
]);
|
|
360
366
|
if (!answer.confirm) {
|
|
361
|
-
console.log(
|
|
367
|
+
console.log(chalk_1.default.yellow('Deletion cancelled'));
|
|
362
368
|
return;
|
|
363
369
|
}
|
|
364
370
|
}
|
|
365
|
-
const spinner =
|
|
366
|
-
await apiClient.deleteMemory(id);
|
|
371
|
+
const spinner = (0, ora_1.default)('Deleting memory...').start();
|
|
372
|
+
await api_js_1.apiClient.deleteMemory(id);
|
|
367
373
|
spinner.succeed('Memory deleted successfully');
|
|
368
374
|
}
|
|
369
375
|
catch (error) {
|
|
370
376
|
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
371
|
-
console.error(
|
|
377
|
+
console.error(chalk_1.default.red('✖ Failed to delete memory:'), errorMessage);
|
|
372
378
|
process.exit(1);
|
|
373
379
|
}
|
|
374
380
|
});
|
|
@@ -378,35 +384,35 @@ export function memoryCommands(program) {
|
|
|
378
384
|
.description('Show memory statistics (admin only)')
|
|
379
385
|
.action(async () => {
|
|
380
386
|
try {
|
|
381
|
-
const spinner =
|
|
382
|
-
const stats = await apiClient.getMemoryStats();
|
|
387
|
+
const spinner = (0, ora_1.default)('Fetching statistics...').start();
|
|
388
|
+
const stats = await api_js_1.apiClient.getMemoryStats();
|
|
383
389
|
spinner.stop();
|
|
384
|
-
console.log(
|
|
390
|
+
console.log(chalk_1.default.blue.bold('\n📊 Memory Statistics'));
|
|
385
391
|
console.log();
|
|
386
|
-
console.log(
|
|
387
|
-
console.log(
|
|
388
|
-
console.log(
|
|
392
|
+
console.log(chalk_1.default.green('Total Memories:'), stats.total_memories.toLocaleString());
|
|
393
|
+
console.log(chalk_1.default.green('Total Size:'), (0, formatting_js_1.formatBytes)(stats.total_size_bytes));
|
|
394
|
+
console.log(chalk_1.default.green('Average Access Count:'), stats.avg_access_count);
|
|
389
395
|
console.log();
|
|
390
|
-
console.log(
|
|
396
|
+
console.log(chalk_1.default.yellow('Memories by Type:'));
|
|
391
397
|
Object.entries(stats.memories_by_type).forEach(([type, count]) => {
|
|
392
398
|
console.log(` ${type}: ${count}`);
|
|
393
399
|
});
|
|
394
400
|
if (stats.most_accessed_memory) {
|
|
395
401
|
console.log();
|
|
396
|
-
console.log(
|
|
402
|
+
console.log(chalk_1.default.yellow('Most Accessed Memory:'));
|
|
397
403
|
console.log(` ${stats.most_accessed_memory.title} (${stats.most_accessed_memory.access_count} times)`);
|
|
398
404
|
}
|
|
399
405
|
if (stats.recent_memories.length > 0) {
|
|
400
406
|
console.log();
|
|
401
|
-
console.log(
|
|
407
|
+
console.log(chalk_1.default.yellow('Recent Memories:'));
|
|
402
408
|
stats.recent_memories.forEach((memory, index) => {
|
|
403
|
-
console.log(` ${index + 1}. ${truncateText(memory.title, 50)}`);
|
|
409
|
+
console.log(` ${index + 1}. ${(0, formatting_js_1.truncateText)(memory.title, 50)}`);
|
|
404
410
|
});
|
|
405
411
|
}
|
|
406
412
|
}
|
|
407
413
|
catch (error) {
|
|
408
414
|
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
409
|
-
console.error(
|
|
415
|
+
console.error(chalk_1.default.red('✖ Failed to get statistics:'), errorMessage);
|
|
410
416
|
process.exit(1);
|
|
411
417
|
}
|
|
412
418
|
});
|
|
@@ -1,41 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.orgCommands = orgCommands;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const config_js_1 = require("../utils/config.js");
|
|
9
|
+
function orgCommands(program) {
|
|
4
10
|
// Show organization info
|
|
5
11
|
program
|
|
6
12
|
.command('info')
|
|
7
13
|
.description('Show organization information')
|
|
8
14
|
.action(async () => {
|
|
9
|
-
const config = new CLIConfig();
|
|
15
|
+
const config = new config_js_1.CLIConfig();
|
|
10
16
|
await config.init();
|
|
11
17
|
const user = await config.getCurrentUser();
|
|
12
18
|
if (!user) {
|
|
13
|
-
console.error(
|
|
19
|
+
console.error(chalk_1.default.red('✖ Not authenticated'));
|
|
14
20
|
process.exit(1);
|
|
15
21
|
}
|
|
16
|
-
console.log(
|
|
22
|
+
console.log(chalk_1.default.blue.bold('🏢 Organization Information'));
|
|
17
23
|
console.log();
|
|
18
|
-
console.log(
|
|
19
|
-
console.log(
|
|
20
|
-
console.log(
|
|
21
|
-
console.log(
|
|
24
|
+
console.log(chalk_1.default.green('Organization ID:'), user.organization_id);
|
|
25
|
+
console.log(chalk_1.default.green('Your Role:'), user.role);
|
|
26
|
+
console.log(chalk_1.default.green('Plan:'), user.plan);
|
|
27
|
+
console.log(chalk_1.default.green('Email:'), user.email);
|
|
22
28
|
// In a full implementation, you'd fetch more org details from the API
|
|
23
29
|
console.log();
|
|
24
|
-
console.log(
|
|
30
|
+
console.log(chalk_1.default.gray('Note: Use the web dashboard for full organization management'));
|
|
25
31
|
});
|
|
26
32
|
// Placeholder for future org management commands
|
|
27
33
|
program
|
|
28
34
|
.command('members')
|
|
29
35
|
.description('List organization members (admin only)')
|
|
30
36
|
.action(async () => {
|
|
31
|
-
console.log(
|
|
32
|
-
console.log(
|
|
37
|
+
console.log(chalk_1.default.yellow('⚠️ This feature is not yet implemented'));
|
|
38
|
+
console.log(chalk_1.default.gray('Use the web dashboard to manage organization members'));
|
|
33
39
|
});
|
|
34
40
|
program
|
|
35
41
|
.command('usage')
|
|
36
42
|
.description('Show organization usage statistics')
|
|
37
43
|
.action(async () => {
|
|
38
|
-
console.log(
|
|
39
|
-
console.log(
|
|
44
|
+
console.log(chalk_1.default.yellow('⚠️ This feature is not yet implemented'));
|
|
45
|
+
console.log(chalk_1.default.gray('Use the web dashboard to view usage statistics'));
|
|
40
46
|
});
|
|
41
47
|
}
|