claude-code-remote-pilot 0.1.2 → 0.1.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.
- package/bin/claude-pilot.js +16 -0
- package/package.json +1 -1
package/bin/claude-pilot.js
CHANGED
|
@@ -63,9 +63,25 @@ async function ensureDep(cmd, label, installCmd) {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
async function setupTelegram() {
|
|
67
|
+
if (process.env.TELEGRAM_BOT_TOKEN && process.env.TELEGRAM_CHAT_ID) return;
|
|
68
|
+
console.log('\nTelegram notifications are not configured (optional).');
|
|
69
|
+
const answer = await prompt('Set up Telegram now? (y/n) ');
|
|
70
|
+
if (answer !== 'y' && answer !== 'yes') {
|
|
71
|
+
console.log('Skipping. You can set TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID later.\n');
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const token = await prompt('Enter your Telegram bot token: ');
|
|
75
|
+
const chatId = await prompt('Enter your Telegram chat ID: ');
|
|
76
|
+
if (token) process.env.TELEGRAM_BOT_TOKEN = token.trim();
|
|
77
|
+
if (chatId) process.env.TELEGRAM_CHAT_ID = chatId.trim();
|
|
78
|
+
console.log('Telegram configured for this session.\n');
|
|
79
|
+
}
|
|
80
|
+
|
|
66
81
|
async function main() {
|
|
67
82
|
await ensureDep('tmux', 'tmux', tmuxInstallCmd());
|
|
68
83
|
await ensureDep('claude', 'Claude Code CLI', 'npm install -g @anthropic-ai/claude-code');
|
|
84
|
+
await setupTelegram();
|
|
69
85
|
|
|
70
86
|
const child = spawn('bash', [scriptPath], {
|
|
71
87
|
stdio: 'inherit',
|
package/package.json
CHANGED