Download scripts/setup.js from agenthinkmesh/meezan: direct link, hf CLI and curl.
- Browser
- Download file 2.61 kB
-
https://huggingface.co/agenthinkmesh/meezan/resolve/main/scripts/setup.js
- Command line
-
hf download hf://agenthinkmesh/meezan/scripts/setup.js
-
curl -L -o setup.js https://huggingface.co/agenthinkmesh/meezan/resolve/main/scripts/setup.js
2.61 kB
| // ========================================== | |
| // MEEZAN - ู ูุฒุงู Setup Script | |
| // ========================================== | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const readline = require('readline'); | |
| const rl = readline.createInterface({ | |
| input: process.stdin, | |
| output: process.stdout | |
| }); | |
| function ask(question) { | |
| return new Promise(resolve => rl.question(question, resolve)); | |
| } | |
| async function setup() { | |
| console.log(` | |
| โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| โ ู ูุฒุงู MEEZAN - ุฅุนุฏุงุฏ ุงููุธุงู โ | |
| โ Setup Wizard โ | |
| โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| `); | |
| console.log('Welcome! Let\'s configure your Meezan assistant.\n'); | |
| const apiKey = await ask('1. Anthropic API Key (from console.anthropic.com): '); | |
| const telegramToken = await ask('2. Telegram Bot Token (from @BotFather, or press Enter to skip): '); | |
| const city = await ask('3. Your city (default: Kuwait City): ') || 'Kuwait City'; | |
| const country = await ask('4. Your country (default: Kuwait): ') || 'Kuwait'; | |
| const language = await ask('5. Default language ar/en/ur/ms (default: ar): ') || 'ar'; | |
| const madhab = await ask('6. Madhab hanafi/maliki/shafii/hanbali (default: shafii): ') || 'shafii'; | |
| const envContent = `# MEEZAN - ู ูุฒุงู Configuration | |
| # Generated by setup wizard on ${new Date().toISOString()} | |
| ANTHROPIC_API_KEY=${apiKey} | |
| TELEGRAM_BOT_TOKEN=${telegramToken || 'your_telegram_bot_token_here'} | |
| PORT=3000 | |
| NODE_ENV=development | |
| DEFAULT_CITY=${city} | |
| DEFAULT_COUNTRY=${country} | |
| DEFAULT_LATITUDE=29.3759 | |
| DEFAULT_LONGITUDE=47.9774 | |
| DEFAULT_LANGUAGE=${language} | |
| DEFAULT_MADHAB=${madhab} | |
| DB_PATH=./data/memory.json | |
| ASSISTANT_NAME=ู ูุฒุงู | |
| ASSISTANT_NAME_EN=Meezan | |
| LOG_LEVEL=info | |
| `; | |
| fs.writeFileSync(path.join(__dirname, '..', '.env'), envContent); | |
| // Create data directory | |
| const dataDir = path.join(__dirname, '..', 'data'); | |
| if (!fs.existsSync(dataDir)) { | |
| fs.mkdirSync(dataDir, { recursive: true }); | |
| } | |
| console.log(` | |
| โ Configuration saved to .env | |
| Next steps: | |
| 1. Run: npm install | |
| 2. Run: npm run dev | |
| 3. Open: http://localhost:3000 | |
| ${telegramToken ? '๐ค Telegram bot configured! Your bot will be live after starting.' : '๐ฑ To add Telegram: Get a token from @BotFather and add to .env'} | |
| ุฌุฒุงู ุงููู ุฎูุฑุงู! ุจุงุฑู ุงููู ูู ู ุดุฑูุนู ๐คฒ | |
| `); | |
| rl.close(); | |
| } | |
| setup().catch(console.error); | |