security: remove all hardcoded paths, usernames, IPs, and chat IDs from tracked files

- start.sh: use dirname instead of hardcoded path
- src/zcode.js: remove hardcoded chat_id fallback
- src/utils/rtk.js: use 'rtk' from PATH instead of hardcoded binary path
- src/telegram-bot.ts: use process.cwd() instead of hardcoded path
- TELEGRAM_SETUP.md: replace token/chat_id with placeholders
- QUICKSTART.md: sanitize all references
- SERVICE_MAP.md: use relative paths instead of absolute
This commit is contained in:
admin
2026-05-05 14:30:57 +00:00
Unverified
parent 977dcc97c3
commit d7107e162f
7 changed files with 41 additions and 40 deletions

View File

@@ -3,7 +3,7 @@
## ⚡ 30-Second Setup
```bash
cd /home/uroma2/zcode-cli-x
cd zcode-cli-x
npm install
node bin/zcode.js --bot
```
@@ -23,11 +23,11 @@ node bin/zcode.js --bot
## ⚙️ Configure .env
Edit `/home/uroma2/zcode-cli-x/.env`:
Edit `.env` in the project root:
```env
ZAI_API_KEY=your_zai_api_key
TELEGRAM_BOT_TOKEN=your_bot_token
ZAI_API_KEY=***
TELEGRAM_BOT_TOKEN=***
TELEGRAM_ALLOWED_USERS=your_user_id
```
@@ -89,7 +89,7 @@ Bot: 🔧 Bug fixed in app.js...
## 🐛 Troubleshooting
### Bot not responding
- Check logs: `tail -f /home/uroma2/zcode-cli-x/logs/zcode.log`
- Check logs: `tail -f logs/zcode.log`
- Verify Telegram token in .env
- Check bot is enabled: `grep TELEGRAM_BOT_TOKEN .env`