add eco CLI symlink to setup wizard, document all CLI commands
setup.sh now installs eco → ~/.local/bin/eco (symlink to cli.py). README.md updated with full eco command reference. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -23,9 +23,9 @@ source .venv/bin/activate && python3 src/main.py
|
||||
# WhatsApp bridge
|
||||
systemctl --user start echo-whatsapp-bridge
|
||||
|
||||
# CLI diagnostics
|
||||
./cli.py status
|
||||
./cli.py doctor
|
||||
# CLI diagnostics (eco = symlink to cli.py, installed by setup.sh)
|
||||
eco status
|
||||
eco doctor
|
||||
|
||||
# Install dependencies
|
||||
source .venv/bin/activate && pip install -r requirements.txt
|
||||
|
||||
@@ -137,7 +137,7 @@ bash setup.sh
|
||||
| `src/adapters/telegram_bot.py` | Telegram bot cu commands + inline keyboards |
|
||||
| `src/adapters/whatsapp.py` | WhatsApp adapter — polls Node.js bridge |
|
||||
| `bridge/whatsapp/index.js` | Node.js WhatsApp bridge — Baileys + Express |
|
||||
| `cli.py` | CLI: echo status/doctor/restart/logs/secrets/cron/heartbeat/memory/whatsapp |
|
||||
| `cli.py` | CLI tool (instalat ca `eco` in ~/.local/bin/ de setup.sh) |
|
||||
| `setup.sh` | Interactive setup wizard — 10-step onboarding, idempotent |
|
||||
| `config.json` | Runtime config (channels, telegram_channels, whatsapp, admins, models) |
|
||||
|
||||
|
||||
30
README.md
30
README.md
@@ -68,14 +68,30 @@ systemctl --user start echo-core
|
||||
|
||||
## CLI Usage
|
||||
|
||||
The setup wizard installs `eco` as a global command (`~/.local/bin/eco`):
|
||||
|
||||
```bash
|
||||
./cli.py status # Bot online/offline, uptime
|
||||
./cli.py doctor # Full diagnostic check
|
||||
./cli.py logs # Tail echo-core.log
|
||||
./cli.py restart # Restart the service
|
||||
./cli.py secrets list # Show stored credentials
|
||||
./cli.py cron list # Show scheduled jobs
|
||||
./cli.py whatsapp status # WhatsApp bridge connection
|
||||
eco status # Bot online/offline, uptime
|
||||
eco doctor # Full diagnostic check
|
||||
eco restart # Restart the service
|
||||
eco restart --bridge # Restart bot + WhatsApp bridge
|
||||
eco stop # Stop the service
|
||||
eco logs # Tail echo-core.log (last 20 lines)
|
||||
eco logs 50 # Last 50 lines
|
||||
eco secrets list # Show stored credentials
|
||||
eco secrets set <name> # Store a secret in keyring
|
||||
eco secrets test # Check required secrets
|
||||
eco sessions list # Active Claude sessions
|
||||
eco sessions clear # Clear all sessions
|
||||
eco channel list # Registered Discord channels
|
||||
eco cron list # Show scheduled jobs
|
||||
eco cron run <name> # Force-run a cron job
|
||||
eco memory search "<query>" # Semantic search in memory
|
||||
eco memory reindex # Rebuild search index
|
||||
eco heartbeat # Run health checks
|
||||
eco whatsapp status # WhatsApp bridge connection
|
||||
eco whatsapp qr # QR code pairing instructions
|
||||
eco send <alias> <message> # Send message via router
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
10
setup.sh
10
setup.sh
@@ -850,6 +850,16 @@ EOF
|
||||
|
||||
SERVICES_INSTALLED=true
|
||||
|
||||
# Install `eco` CLI command
|
||||
local cli_target="$HOME/.local/bin/eco"
|
||||
mkdir -p "$HOME/.local/bin"
|
||||
if [[ -L "$cli_target" || -f "$cli_target" ]]; then
|
||||
success "eco CLI already installed at ~/.local/bin/eco"
|
||||
else
|
||||
ln -s "$SCRIPT_DIR/cli.py" "$cli_target"
|
||||
success "Installed eco CLI → ~/.local/bin/eco"
|
||||
fi
|
||||
|
||||
# Start now?
|
||||
echo ""
|
||||
ask_yn "Start services now?" "n"
|
||||
|
||||
Reference in New Issue
Block a user