| name | ef-localdev |
| description | Local development and debugging for the EigenFlux platform. Start local EigenFlux services
and switch CLI to localhost for end-to-end testing with OpenClaw or other clients.
Use when user says "本地调试 eigenflux", "local debug eigenflux", "切到本地", "debug eigenflux locally",
"start local eigenflux", "本地启动 eigenflux", "启动本地 eigenflux".
Also handles switching back to production: "切回线上", "switch back to production", "恢复线上",
"switch to prod eigenflux", "切回正式环境".
Do NOT use for server-side unit/integration testing (see eigenflux-localtest skill).
Do NOT use for feed, messaging, or profile operations (see ef-broadcast, ef-communication, ef-profile).
|
| metadata | {"author":"Phronesis AI","version":"0.1.0","jarvis-local":true,"requires":{"bins":["eigenflux","docker"]},"cliHelps":["eigenflux server --help"]} |
EigenFlux — Local Development
Switch between local and production EigenFlux servers for end-to-end debugging via OpenClaw or any CLI client.
Mode 1: Start Local Debugging
Trigger: "本地调试 eigenflux", "local debug eigenflux", "切到本地"
Execute these steps in order, without asking the user — all scripts are idempotent and safe:
Step 1 — Verify prerequisites
docker info > /dev/null 2>&1 || { echo "ERROR: Docker is not running. Please start Docker first."; exit 1; }
test -f /Users/pascal/Desktop/jarvis/repos/eigenflux/.env || {
echo "WARNING: .env not found. Copying from .env.example..."
cp /Users/pascal/Desktop/jarvis/repos/eigenflux/.env.example /Users/pascal/Desktop/jarvis/repos/eigenflux/.env
echo "Please review /Users/pascal/Desktop/jarvis/repos/eigenflux/.env and update secrets if needed."
}
Step 2 — Start infrastructure and services
cd /Users/pascal/Desktop/jarvis/repos/eigenflux
docker compose up -d
bash scripts/common/build.sh
./scripts/local/start_local.sh
Wait for services to be ready before proceeding.
Step 3 — Switch CLI to localhost
eigenflux server list
eigenflux server add --name localhost --endpoint http://localhost:8080 2>/dev/null || true
eigenflux server use --name localhost
Step 4 — Verify
eigenflux server list
curl -s -o /dev/null -w "%{http_code}" http://localhost:8080/ping
Report to the user:
- Which server is now active
- Whether the health check passed
- Remind them: "本地调试已就绪。OpenClaw 现在连接的是本地 EigenFlux。调试完毕后说「切回线上」恢复。"
Service Logs
If something goes wrong, check logs at:
/Users/pascal/Desktop/jarvis/repos/eigenflux/.log/<service>.log
Available services: api, profile, item, sort, feed, pm, auth, notification, ws, pipeline, cron
Mode 2: Switch Back to Production
Trigger: "切回线上", "switch back to production", "恢复线上"
Step 1 — Switch CLI to production
eigenflux server use --name eigenflux
Step 2 — Verify
eigenflux server list
Report to the user: "已切回线上环境 (eigenflux)。"
Note: This does NOT stop local services. They continue running and can be reused later. To stop them manually:
cd /Users/pascal/Desktop/jarvis/repos/eigenflux && docker compose down
Troubleshooting
Docker containers not starting
cd /Users/pascal/Desktop/jarvis/repos/eigenflux && docker compose ps
docker compose logs <service_name>
Build failures
Check Go version (go version, requires 1.25+). Review build output for compilation errors.
Service fails to start
Check the service log:
cat /Users/pascal/Desktop/jarvis/repos/eigenflux/.log/<service>.log
CLI cannot connect to localhost
- Confirm API is running:
curl http://localhost:8080/ping
- Check port conflicts:
lsof -i :8080
- Verify CLI config:
cat ~/.eigenflux/config.json
Auth token issues on localhost
Local server has its own auth state. You may need to re-authenticate:
eigenflux auth login