Skip to content

Commit 5a51ab7

Browse files
DavidsonGomesclaude
andcommitted
release: v0.18.2 — setup nginx fix + CLI remote mode detection + make uninstall
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7c9159a commit 5a51ab7

7 files changed

Lines changed: 103 additions & 17 deletions

File tree

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.18.2] - 2026-04-12
9+
10+
### Added
11+
12+
- **`make uninstall`** — full cleanup command that stops services, removes nginx config, data, deps, and config files. Requires typing "UNINSTALL" to confirm
13+
- **`make stop`** — stops all EvoNexus services (dashboard + terminal-server)
14+
15+
### Fixed
16+
17+
- **Setup nginx config not persisting** — now removes both `default` and `default.conf`, uses `systemctl reload` instead of `start`, shows clear error with fix command if `nginx -t` fails
18+
- **CLI showing wrong instructions for VPS**`npx @evoapi/evo-nexus` now detects remote mode (nginx config present) and shows `./start-services.sh` instead of `make dashboard-app`. Skips redundant frontend build when setup already built it
19+
- **CLI redundant `npm run build`** — no longer rebuilds frontend after setup already did, avoiding "port already in use" cascade when services were already running
20+
821
## [0.18.1] - 2026-04-12
922

1023
### Added

Makefile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,44 @@ terminal-stop: ## 🛑 Stop terminal-server (if orphaned)
126126
@pkill -f "dashboard/terminal-server/bin/server.js" 2>/dev/null && echo "✅ terminal-server stopped" || echo "ℹ terminal-server not running"
127127
@rm -f /tmp/terminal-server.pid
128128

129+
stop: ## 🛑 Stop all EvoNexus services (dashboard + terminal-server)
130+
@echo "Stopping EvoNexus services..."
131+
@pkill -f "dashboard/terminal-server/bin/server.js" 2>/dev/null || true
132+
@pkill -f "dashboard/backend.*app.py" 2>/dev/null || true
133+
@pkill -f "app.py" 2>/dev/null || true
134+
@echo "✅ All services stopped"
135+
136+
uninstall: ## 🗑️ Full cleanup — stop services, remove nginx, data, deps (DESTRUCTIVE)
137+
@echo ""
138+
@echo "⚠ This will STOP all services and DELETE:"
139+
@echo " • dashboard/data/ (SQLite database)"
140+
@echo " • dashboard/frontend/node_modules/"
141+
@echo " • dashboard/terminal-server/node_modules/"
142+
@echo " • .venv/ (Python virtual environment)"
143+
@echo " • logs/"
144+
@echo " • config/workspace.yaml, config/providers.json"
145+
@echo " • /etc/nginx/sites-enabled/evonexus"
146+
@echo ""
147+
@read -p " Type 'UNINSTALL' to confirm: " confirm; \
148+
if [ "$$confirm" = "UNINSTALL" ]; then \
149+
echo ""; \
150+
echo "Stopping services..."; \
151+
pkill -f "dashboard/terminal-server/bin/server.js" 2>/dev/null || true; \
152+
pkill -f "dashboard/backend.*app.py" 2>/dev/null || true; \
153+
pkill -f "app.py" 2>/dev/null || true; \
154+
echo "Removing nginx config..."; \
155+
rm -f /etc/nginx/sites-enabled/evonexus 2>/dev/null || true; \
156+
systemctl reload nginx 2>/dev/null || true; \
157+
echo "Removing generated files..."; \
158+
rm -rf dashboard/data/ dashboard/frontend/node_modules/ dashboard/frontend/dist/ dashboard/terminal-server/node_modules/ .venv/ logs/ start-services.sh; \
159+
rm -f config/workspace.yaml config/providers.json config/routines.yaml .env; \
160+
rm -f CLAUDE.md; \
161+
echo ""; \
162+
echo "✅ EvoNexus uninstalled. Run 'make setup' to reinstall."; \
163+
else \
164+
echo "Aborted."; \
165+
fi
166+
129167
bling-auth: ## 🔐 Bling OAuth2 login (one-time: capture access + refresh tokens into .env)
130168
@python3 .claude/skills/int-bling/scripts/bling_auth.py
131169

cli/bin/cli.mjs

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -187,28 +187,49 @@ async function main() {
187187

188188
setup.on("close", (code) => {
189189
if (code === 0) {
190-
// Build frontend
191-
console.log(`\n ${DIM}Building dashboard frontend...${RESET}`);
190+
// Check if setup ran in remote mode (services already started)
191+
let isRemote = false;
192192
try {
193-
run("npm run build --silent", { cwd: frontendDir });
194-
console.log(` ${GREEN}${RESET} Dashboard built\n`);
195-
} catch {
196-
console.log(` ${YELLOW}!${RESET} Frontend build failed — run manually: cd ${targetDir}/dashboard/frontend && npm run build\n`);
193+
isRemote = existsSync("/etc/nginx/sites-enabled/evonexus");
194+
} catch {}
195+
196+
if (!isRemote) {
197+
// Local mode: build frontend (setup already built, but ensure latest)
198+
console.log(`\n ${DIM}Building dashboard frontend...${RESET}`);
199+
try {
200+
run("npm run build --silent", { cwd: frontendDir });
201+
console.log(` ${GREEN}${RESET} Dashboard built\n`);
202+
} catch {
203+
console.log(` ${YELLOW}!${RESET} Frontend build failed — run manually: cd ${targetDir}/dashboard/frontend && npm run build\n`);
204+
}
197205
}
198206

199207
console.log(`
200208
${GREEN}${BOLD}EvoNexus installed successfully!${RESET}
209+
`);
210+
211+
if (isRemote) {
212+
// Remote mode: services already running, don't suggest make dashboard-app
213+
console.log(` ${BOLD}The dashboard is already running.${RESET}
214+
Open the URL shown above to create your admin account.
201215
202-
${BOLD}Next steps:${RESET}
216+
${BOLD}Useful commands:${RESET}
217+
${CYAN}${RESET} ${BOLD}./start-services.sh${RESET} — restart dashboard services
218+
${CYAN}${RESET} ${BOLD}make scheduler${RESET} — start automated routines
219+
${CYAN}${RESET} ${BOLD}make help${RESET} — see all available commands
220+
`);
221+
} else {
222+
console.log(` ${BOLD}Next steps:${RESET}
203223
${CYAN}1.${RESET} cd ${targetDir}
204224
${CYAN}2.${RESET} Edit ${BOLD}.env${RESET} with your API keys
205225
${CYAN}3.${RESET} ${BOLD}make dashboard-app${RESET} — start the dashboard
206226
${CYAN}4.${RESET} Open ${BOLD}http://localhost:8080${RESET} and create your admin account
207227
${CYAN}5.${RESET} ${BOLD}make help${RESET} — see all available commands
208-
209-
${DIM}Documentation: https://evonexus.evolutionfoundation.com.br/docs${RESET}
210-
${DIM}GitHub: https://github.com/EvolutionAPI/evo-nexus${RESET}
211228
`);
229+
}
230+
231+
console.log(` ${DIM}Documentation: https://evonexus.evolutionfoundation.com.br/docs${RESET}`);
232+
console.log(` ${DIM}GitHub: https://github.com/EvolutionAPI/evo-nexus${RESET}\n`);
212233
} else {
213234
console.log(`\n ${RED}Setup failed (exit code ${code}).${RESET}`);
214235
console.log(` ${DIM}Try running manually: cd ${targetDir} && make setup${RESET}\n`);

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@evoapi/evo-nexus",
3-
"version": "0.18.1",
3+
"version": "0.18.2",
44
"description": "Unofficial open source toolkit for Claude Code — AI-powered business operating system",
55
"keywords": [
66
"claude-code",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "evo-nexus"
3-
version = "0.18.1"
3+
version = "0.18.2"
44
description = "Unofficial open source toolkit for Claude Code — AI-powered business operating system"
55
requires-python = ">=3.10"
66
dependencies = [

setup.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,17 +297,31 @@ def configure_access() -> dict:
297297
"""
298298
try:
299299
# Remove default nginx site if exists
300-
if os.path.exists("/etc/nginx/sites-enabled/default"):
301-
os.remove("/etc/nginx/sites-enabled/default")
300+
for default_site in ["/etc/nginx/sites-enabled/default", "/etc/nginx/conf.d/default.conf"]:
301+
if os.path.exists(default_site):
302+
os.remove(default_site)
303+
print(f" {GREEN}{RESET} Removed nginx default site")
302304

303305
nginx_path = "/etc/nginx/sites-enabled/evonexus"
304306
with open(nginx_path, "w") as f:
305307
f.write(nginx_config)
306-
ret = os.system("nginx -t 2>/dev/null && systemctl start nginx 2>/dev/null && systemctl enable nginx 2>/dev/null")
308+
309+
# Test nginx config
310+
ret = os.system("nginx -t 2>/tmp/nginx-test.log")
307311
if ret == 0:
312+
os.system("systemctl reload nginx 2>/dev/null || systemctl start nginx 2>/dev/null")
313+
os.system("systemctl enable nginx 2>/dev/null")
308314
print(f" {GREEN}{RESET} Nginx configured for {domain}")
309315
else:
310-
print(f" {YELLOW}!{RESET} Nginx config written but start failed — check manually")
316+
# nginx -t failed — likely SSL cert issue. Show the error clearly.
317+
print(f" {RED}{RESET} Nginx config test failed")
318+
os.system("cat /tmp/nginx-test.log 2>/dev/null")
319+
print(f" {YELLOW}The config is saved at {nginx_path}{RESET}")
320+
print(f" {YELLOW}Fix the issue and run: nginx -t && systemctl reload nginx{RESET}")
321+
322+
# Verify the config file actually exists after writing
323+
if not os.path.exists(nginx_path):
324+
print(f" {RED}{RESET} Nginx config file was not created at {nginx_path}")
311325
except PermissionError:
312326
print(f" {YELLOW}!{RESET} No permission to write nginx config — run setup as root/sudo")
313327

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)