lystbot 0.1.1 → 0.2.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/package.json +1 -1
- package/src/index.js +31 -0
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -50,12 +50,43 @@ program
|
|
|
50
50
|
const lists = await api.request('GET', '/lists');
|
|
51
51
|
const count = (lists.lists || lists).length;
|
|
52
52
|
console.log(`✅ Logged in! Found ${count} list${count !== 1 ? 's' : ''} on your account.`);
|
|
53
|
+
console.log('');
|
|
54
|
+
console.log('💡 Set your bot name so users see who\'s making changes:');
|
|
55
|
+
console.log(' lystbot profile --name "My Agent" --emoji "🤖"');
|
|
53
56
|
} catch {
|
|
54
57
|
// Key might still be valid but lists endpoint could fail for other reasons
|
|
55
58
|
console.log('✅ API key stored. Run `lystbot lists` to verify.');
|
|
56
59
|
}
|
|
57
60
|
});
|
|
58
61
|
|
|
62
|
+
// ── profile ────────────────────────────────────────────
|
|
63
|
+
program
|
|
64
|
+
.command('profile')
|
|
65
|
+
.description('View or update your bot profile (name, emoji)')
|
|
66
|
+
.option('--name <name>', 'Set bot display name')
|
|
67
|
+
.option('--emoji <emoji>', 'Set bot emoji')
|
|
68
|
+
.action(async (options) => {
|
|
69
|
+
config.getApiKey();
|
|
70
|
+
const updates = {};
|
|
71
|
+
if (options.name) updates.name = options.name;
|
|
72
|
+
if (options.emoji) updates.signature_emoji = options.emoji;
|
|
73
|
+
|
|
74
|
+
if (Object.keys(updates).length === 0) {
|
|
75
|
+
console.log('🤖 Bot Profile');
|
|
76
|
+
console.log('');
|
|
77
|
+
console.log('Set your name and emoji so users see who\'s making changes:');
|
|
78
|
+
console.log(' lystbot profile --name "My Agent" --emoji "🤖"');
|
|
79
|
+
console.log('');
|
|
80
|
+
console.log('Without a name, you\'ll show up as "Bot" in the app.');
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
await api.request('PATCH', '/agents/me', updates);
|
|
85
|
+
console.log(`✅ Profile updated!`);
|
|
86
|
+
if (options.name) console.log(` Name: ${options.name}`);
|
|
87
|
+
if (options.emoji) console.log(` Emoji: ${options.emoji}`);
|
|
88
|
+
});
|
|
89
|
+
|
|
59
90
|
// ── logout ─────────────────────────────────────────────
|
|
60
91
|
program
|
|
61
92
|
.command('logout')
|