nanobot/multi-bot-setup.sh
tanyar09 4f50cfac3c Add multi-bot Docker setup and improve MCP/tool reliability
Document and add multi-bot Docker workflows with env layering scripts, and update agent/tool configuration handling to make MCP/email/calendar behavior more robust for day-to-day operations.

Made-with: Cursor
2026-03-27 13:06:24 -04:00

50 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# Setup script for multiple nanobot instances
# Create directories for each bot
mkdir -p ~/.nanobot-user1
mkdir -p ~/.nanobot-user2
mkdir -p ~/.nanobot-user3
# Copy base config if it exists
if [ -f ~/.nanobot/config.json ]; then
cp ~/.nanobot/config.json ~/.nanobot-user1/config.json
cp ~/.nanobot/config.json ~/.nanobot-user2/config.json
cp ~/.nanobot/config.json ~/.nanobot-user3/config.json
echo "✓ Copied base config to all directories"
else
echo "⚠ Base config not found. Creating minimal configs..."
# Create minimal configs
cat > ~/.nanobot-user1/config.json <<EOF
{
"providers": {
"openrouter": {
"apiKey": "YOUR_API_KEY_HERE"
}
},
"agents": {
"defaults": {
"model": "anthropic/claude-opus-4-5"
}
},
"channels": {
"telegram": {
"enabled": true,
"token": "BOT_TOKEN_FOR_USER1",
"allowFrom": ["USER1_TELEGRAM_ID"]
}
}
}
EOF
cp ~/.nanobot-user1/config.json ~/.nanobot-user2/config.json
cp ~/.nanobot-user1/config.json ~/.nanobot-user3/config.json
fi
echo ""
echo "Next steps:"
echo "1. Edit each config file (~/.nanobot-user1/config.json, etc.)"
echo "2. Add different Telegram bot tokens and user IDs"
echo "3. Run the Docker containers (see docker-compose.multi.yml)"