wasm-cli 0.13.16__tar.gz → 0.14.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/MANIFEST.in +3 -0
- {wasm_cli-0.13.16/src/wasm_cli.egg-info → wasm_cli-0.14.1}/PKG-INFO +4 -2
- wasm_cli-0.14.1/man/wasm.1 +521 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/pyproject.toml +5 -2
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/setup.py +7 -2
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/__init__.py +1 -1
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/cli/commands/backup.py +18 -10
- wasm_cli-0.14.1/src/wasm/cli/commands/config.py +96 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/cli/commands/db.py +3 -2
- wasm_cli-0.14.1/src/wasm/cli/commands/health.py +231 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/cli/commands/monitor.py +8 -3
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/cli/commands/setup.py +51 -16
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/cli/commands/store.py +20 -4
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/cli/commands/webapp.py +158 -37
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/cli/interactive.py +3 -2
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/cli/parser.py +99 -18
- wasm_cli-0.14.1/src/wasm/completions/_wasm +829 -0
- wasm_cli-0.14.1/src/wasm/completions/wasm.bash +926 -0
- wasm_cli-0.14.1/src/wasm/completions/wasm.fish +509 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/core/config.py +85 -1
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/core/dependencies.py +51 -17
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/core/exceptions.py +14 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/core/update_checker.py +66 -17
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/core/utils.py +65 -3
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/deployers/base.py +328 -286
- wasm_cli-0.14.1/src/wasm/deployers/helpers/__init__.py +20 -0
- wasm_cli-0.14.1/src/wasm/deployers/helpers/package_manager.py +183 -0
- wasm_cli-0.14.1/src/wasm/deployers/helpers/path_resolver.py +188 -0
- wasm_cli-0.14.1/src/wasm/deployers/helpers/prisma.py +130 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/deployers/vite.py +12 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/main.py +21 -5
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/managers/backup_manager.py +179 -54
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/managers/database/mysql.py +135 -47
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/managers/database/postgres.py +85 -36
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/managers/database/redis.py +14 -10
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/managers/service_manager.py +91 -45
- wasm_cli-0.14.1/src/wasm/monitor/__init__.py +30 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/monitor/ai_analyzer.py +1 -3
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/monitor/process_monitor.py +135 -36
- wasm_cli-0.14.1/src/wasm/monitor/threat_store.py +332 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/api/apps.py +6 -4
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/api/backups.py +37 -17
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/api/monitor.py +164 -10
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/api/services.py +31 -25
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/jobs.py +1 -1
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/pages/monitor.js +69 -9
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/websockets/router.py +8 -6
- {wasm_cli-0.13.16 → wasm_cli-0.14.1/src/wasm_cli.egg-info}/PKG-INFO +4 -2
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm_cli.egg-info/SOURCES.txt +8 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm_cli.egg-info/requires.txt +4 -1
- wasm_cli-0.13.16/src/wasm/completions/_wasm +0 -392
- wasm_cli-0.13.16/src/wasm/completions/wasm.bash +0 -445
- wasm_cli-0.13.16/src/wasm/completions/wasm.fish +0 -266
- wasm_cli-0.13.16/src/wasm/monitor/__init__.py +0 -16
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/LICENSE +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/README.md +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/docs/MONITOR.md +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/docs/OBS_SETUP.md +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/docs/assets/logo.png +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/docs/assets/logo_bg.png +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/setup.cfg +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/__main__.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/cli/__init__.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/cli/commands/__init__.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/cli/commands/cert.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/cli/commands/service.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/cli/commands/site.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/cli/commands/version.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/cli/commands/web.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/completions/__init__.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/core/__init__.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/core/logger.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/core/store.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/deployers/__init__.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/deployers/nextjs.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/deployers/nodejs.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/deployers/python.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/deployers/registry.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/deployers/static.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/managers/__init__.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/managers/apache_manager.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/managers/base_manager.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/managers/cert_manager.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/managers/database/__init__.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/managers/database/base.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/managers/database/mongodb.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/managers/database/registry.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/managers/nginx_manager.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/managers/source_manager.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/monitor/email_notifier.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/templates/__init__.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/templates/apache/proxy.conf.j2 +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/templates/apache/static.conf.j2 +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/templates/nginx/proxy.conf.j2 +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/templates/nginx/static.conf.j2 +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/templates/systemd/app.service.j2 +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/validators/__init__.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/validators/domain.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/validators/port.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/validators/source.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/validators/ssh.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/__init__.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/api/__init__.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/api/auth.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/api/certs.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/api/config.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/api/databases.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/api/jobs.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/api/router.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/api/sites.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/api/system.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/auth.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/server.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/css/main.css +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/index.html +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/components/cards.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/components/jobs.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/components/metrics.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/components/skeleton.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/core/api.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/core/dialogs.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/core/notifications.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/core/router.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/core/search.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/core/shortcuts.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/core/theme.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/core/ui.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/core/websocket.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/main.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/pages/apps.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/pages/backups.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/pages/certs.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/pages/config.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/pages/dashboard.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/pages/databases.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/pages/jobs.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/pages/logs.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/pages/services.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/js/pages/sites.js +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/login.html +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/logo.png +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/static/logo.webp +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm/web/websockets/__init__.py +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm_cli.egg-info/dependency_links.txt +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm_cli.egg-info/entry_points.txt +0 -0
- {wasm_cli-0.13.16 → wasm_cli-0.14.1}/src/wasm_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wasm-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.14.1
|
|
4
4
|
Summary: Web App System Management - Deploy and manage web applications on Linux servers
|
|
5
5
|
Author: Yago López Prado
|
|
6
6
|
Author-email: Yago López Prado <yago.lopez.adeje@gmail.com>
|
|
@@ -26,9 +26,10 @@ Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
|
|
|
26
26
|
Requires-Python: >=3.10
|
|
27
27
|
Description-Content-Type: text/markdown
|
|
28
28
|
License-File: LICENSE
|
|
29
|
-
Requires-Dist: inquirer>=3.1.0
|
|
30
29
|
Requires-Dist: Jinja2>=3.1.0
|
|
31
30
|
Requires-Dist: PyYAML>=6.0
|
|
31
|
+
Provides-Extra: interactive
|
|
32
|
+
Requires-Dist: inquirer>=3.1.0; extra == "interactive"
|
|
32
33
|
Provides-Extra: dev
|
|
33
34
|
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
34
35
|
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
@@ -49,6 +50,7 @@ Requires-Dist: passlib[bcrypt]>=1.7.4; extra == "web"
|
|
|
49
50
|
Requires-Dist: psutil>=5.9.0; extra == "web"
|
|
50
51
|
Requires-Dist: aiofiles>=23.0.0; extra == "web"
|
|
51
52
|
Provides-Extra: all
|
|
53
|
+
Requires-Dist: inquirer>=3.1.0; extra == "all"
|
|
52
54
|
Requires-Dist: rich>=13.0; extra == "all"
|
|
53
55
|
Requires-Dist: psutil>=5.9.0; extra == "all"
|
|
54
56
|
Requires-Dist: httpx>=0.25.0; extra == "all"
|
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
.\" Man page for WASM - Web App System Management
|
|
2
|
+
.\" Generated for WASM v0.13.16
|
|
3
|
+
.\"
|
|
4
|
+
.TH WASM 1 "January 2026" "WASM" "User Commands"
|
|
5
|
+
.SH NAME
|
|
6
|
+
wasm \- Web App System Management
|
|
7
|
+
.SH SYNOPSIS
|
|
8
|
+
.B wasm
|
|
9
|
+
[\fIOPTIONS\fR] \fICOMMAND\fR [\fIARGS\fR...]
|
|
10
|
+
.SH DESCRIPTION
|
|
11
|
+
.B WASM
|
|
12
|
+
(Web App System Management) is a CLI tool for deploying and managing
|
|
13
|
+
web applications on Linux servers. It automates the entire deployment process:
|
|
14
|
+
Git repository cloning, dependency installation, build, systemd service
|
|
15
|
+
configuration, Nginx/Apache reverse proxy configuration, and SSL certificate
|
|
16
|
+
acquisition with Let's Encrypt.
|
|
17
|
+
.PP
|
|
18
|
+
Supported application types:
|
|
19
|
+
.RS
|
|
20
|
+
.IP "\fBnextjs\fR" 12
|
|
21
|
+
Next.js applications (React SSR)
|
|
22
|
+
.IP "\fBnodejs\fR" 12
|
|
23
|
+
Generic Node.js applications
|
|
24
|
+
.IP "\fBvite\fR" 12
|
|
25
|
+
Vite applications (React, Vue, Svelte)
|
|
26
|
+
.IP "\fBpython\fR" 12
|
|
27
|
+
Python applications (Flask, FastAPI, Django)
|
|
28
|
+
.IP "\fBstatic\fR" 12
|
|
29
|
+
Static sites (HTML/CSS/JS)
|
|
30
|
+
.IP "\fBauto\fR" 12
|
|
31
|
+
Automatic type detection
|
|
32
|
+
.RE
|
|
33
|
+
.SH OPTIONS
|
|
34
|
+
Global options go \fBBEFORE\fR the command:
|
|
35
|
+
.TP
|
|
36
|
+
.BR \-V ", " \-\-version
|
|
37
|
+
Show WASM version and exit.
|
|
38
|
+
.TP
|
|
39
|
+
.BR \-v ", " \-\-verbose
|
|
40
|
+
Enable verbose output (debug).
|
|
41
|
+
.TP
|
|
42
|
+
.BR \-i ", " \-\-interactive
|
|
43
|
+
Run in interactive mode with menus.
|
|
44
|
+
.TP
|
|
45
|
+
.BR \-\-no\-color
|
|
46
|
+
Disable colored output.
|
|
47
|
+
.TP
|
|
48
|
+
.BR \-\-dry\-run
|
|
49
|
+
Show what actions would be performed without executing them.
|
|
50
|
+
Useful for verifying before destructive operations.
|
|
51
|
+
.TP
|
|
52
|
+
.BR \-\-json
|
|
53
|
+
Produce output in JSON format.
|
|
54
|
+
Useful for script integration.
|
|
55
|
+
.TP
|
|
56
|
+
.BR \-\-changelog
|
|
57
|
+
Show the changelog for the current version.
|
|
58
|
+
.SH COMMANDS
|
|
59
|
+
.SS Main commands (web applications)
|
|
60
|
+
.TP
|
|
61
|
+
.BR create ", " new ", " deploy
|
|
62
|
+
Deploy a new web application.
|
|
63
|
+
.RS
|
|
64
|
+
.TP
|
|
65
|
+
.BR \-d ", " \-\-domain " \fIDOMAIN\fR"
|
|
66
|
+
Application domain (required).
|
|
67
|
+
.TP
|
|
68
|
+
.BR \-s ", " \-\-source " \fISOURCE\fR"
|
|
69
|
+
Git repository URL or local path (required).
|
|
70
|
+
.TP
|
|
71
|
+
.BR \-t ", " \-\-type " \fITYPE\fR"
|
|
72
|
+
Application type: nextjs, nodejs, vite, python, static, auto.
|
|
73
|
+
.TP
|
|
74
|
+
.BR \-p ", " \-\-port " \fIPORT\fR"
|
|
75
|
+
Port the application will run on (default: 3000).
|
|
76
|
+
.TP
|
|
77
|
+
.BR \-w ", " \-\-webserver " \fISERVER\fR"
|
|
78
|
+
Web server: nginx or apache (default: nginx).
|
|
79
|
+
.TP
|
|
80
|
+
.BR \-b ", " \-\-branch " \fIBRANCH\fR"
|
|
81
|
+
Git branch to deploy (default: main).
|
|
82
|
+
.TP
|
|
83
|
+
.BR \-\-no\-ssl
|
|
84
|
+
Do not configure SSL certificate.
|
|
85
|
+
.TP
|
|
86
|
+
.BR \-\-env\-file " \fIFILE\fR"
|
|
87
|
+
Environment variables file for the application.
|
|
88
|
+
.TP
|
|
89
|
+
.BR \-\-pm ", " \-\-package\-manager " \fIPM\fR"
|
|
90
|
+
Package manager: npm, pnpm, bun, auto.
|
|
91
|
+
.RE
|
|
92
|
+
.TP
|
|
93
|
+
.BR list ", " ls
|
|
94
|
+
List all deployed applications.
|
|
95
|
+
.TP
|
|
96
|
+
.BR status ", " info " \fIDOMAIN\fR"
|
|
97
|
+
Show detailed status of an application.
|
|
98
|
+
.TP
|
|
99
|
+
.BR start " \fIDOMAIN\fR"
|
|
100
|
+
Start a stopped application.
|
|
101
|
+
.TP
|
|
102
|
+
.BR stop " \fIDOMAIN\fR"
|
|
103
|
+
Stop a running application.
|
|
104
|
+
.TP
|
|
105
|
+
.BR restart " \fIDOMAIN\fR"
|
|
106
|
+
Restart an application.
|
|
107
|
+
.TP
|
|
108
|
+
.BR update ", " upgrade " \fIDOMAIN\fR"
|
|
109
|
+
Update application: git pull, reinstall dependencies, rebuild.
|
|
110
|
+
.RS
|
|
111
|
+
.TP
|
|
112
|
+
.BR \-b ", " \-\-branch " \fIBRANCH\fR"
|
|
113
|
+
Switch to a different branch.
|
|
114
|
+
.TP
|
|
115
|
+
.BR \-\-pm ", " \-\-package\-manager " \fIPM\fR"
|
|
116
|
+
Use a different package manager.
|
|
117
|
+
.RE
|
|
118
|
+
.TP
|
|
119
|
+
.BR delete ", " remove ", " rm " \fIDOMAIN\fR"
|
|
120
|
+
Completely delete an application.
|
|
121
|
+
.RS
|
|
122
|
+
.TP
|
|
123
|
+
.BR \-f ", " \-\-force ", " \-y
|
|
124
|
+
Skip confirmation.
|
|
125
|
+
.TP
|
|
126
|
+
.BR \-\-keep\-files
|
|
127
|
+
Keep application files.
|
|
128
|
+
.RE
|
|
129
|
+
.TP
|
|
130
|
+
.BR logs " \fIDOMAIN\fR"
|
|
131
|
+
View application logs.
|
|
132
|
+
.RS
|
|
133
|
+
.TP
|
|
134
|
+
.BR \-f ", " \-\-follow
|
|
135
|
+
Follow logs in real time.
|
|
136
|
+
.TP
|
|
137
|
+
.BR \-n ", " \-\-lines " \fIN\fR"
|
|
138
|
+
Number of lines to show.
|
|
139
|
+
.RE
|
|
140
|
+
.TP
|
|
141
|
+
.B health
|
|
142
|
+
Run system diagnostics: disk space, service status,
|
|
143
|
+
SSL certificates, memory usage.
|
|
144
|
+
.SS Website management (site)
|
|
145
|
+
.TP
|
|
146
|
+
.B site create
|
|
147
|
+
Create Nginx/Apache site configuration.
|
|
148
|
+
.TP
|
|
149
|
+
.B site list
|
|
150
|
+
List all configured sites.
|
|
151
|
+
.TP
|
|
152
|
+
.B site enable \fISITE\fR
|
|
153
|
+
Enable a site.
|
|
154
|
+
.TP
|
|
155
|
+
.B site disable \fISITE\fR
|
|
156
|
+
Disable a site.
|
|
157
|
+
.TP
|
|
158
|
+
.B site show \fISITE\fR
|
|
159
|
+
Show site configuration.
|
|
160
|
+
.TP
|
|
161
|
+
.B site delete \fISITE\fR
|
|
162
|
+
Delete a site.
|
|
163
|
+
.SS Systemd service management (service, svc)
|
|
164
|
+
.TP
|
|
165
|
+
.B service create
|
|
166
|
+
Create a new systemd service.
|
|
167
|
+
.TP
|
|
168
|
+
.B service list
|
|
169
|
+
List services managed by WASM.
|
|
170
|
+
.TP
|
|
171
|
+
.B service status \fINAME\fR
|
|
172
|
+
View service status.
|
|
173
|
+
.TP
|
|
174
|
+
.B service start \fINAME\fR
|
|
175
|
+
Start a service.
|
|
176
|
+
.TP
|
|
177
|
+
.B service stop \fINAME\fR
|
|
178
|
+
Stop a service.
|
|
179
|
+
.TP
|
|
180
|
+
.B service restart \fINAME\fR
|
|
181
|
+
Restart a service.
|
|
182
|
+
.TP
|
|
183
|
+
.B service logs \fINAME\fR
|
|
184
|
+
View service logs.
|
|
185
|
+
.TP
|
|
186
|
+
.B service delete \fINAME\fR
|
|
187
|
+
Delete a service.
|
|
188
|
+
.SS SSL certificate management (cert, ssl)
|
|
189
|
+
.TP
|
|
190
|
+
.B cert create
|
|
191
|
+
Obtain a new SSL certificate via Let's Encrypt.
|
|
192
|
+
.RS
|
|
193
|
+
.TP
|
|
194
|
+
.BR \-d ", " \-\-domain " \fIDOMAIN\fR"
|
|
195
|
+
Domain(s) for the certificate.
|
|
196
|
+
.TP
|
|
197
|
+
.BR \-e ", " \-\-email " \fIEMAIL\fR"
|
|
198
|
+
Email for Let's Encrypt notifications.
|
|
199
|
+
.TP
|
|
200
|
+
.BR \-\-standalone
|
|
201
|
+
Use standalone mode (port 80 must be free).
|
|
202
|
+
.TP
|
|
203
|
+
.BR \-\-nginx
|
|
204
|
+
Use Nginx plugin (recommended if Nginx is installed).
|
|
205
|
+
.TP
|
|
206
|
+
.BR \-\-apache
|
|
207
|
+
Use Apache plugin.
|
|
208
|
+
.RE
|
|
209
|
+
.TP
|
|
210
|
+
.B cert list
|
|
211
|
+
List all certificates.
|
|
212
|
+
.TP
|
|
213
|
+
.B cert info \fIDOMAIN\fR
|
|
214
|
+
Show detailed certificate information.
|
|
215
|
+
.TP
|
|
216
|
+
.B cert renew
|
|
217
|
+
Renew certificates close to expiration.
|
|
218
|
+
.TP
|
|
219
|
+
.B cert revoke \fIDOMAIN\fR
|
|
220
|
+
Revoke a certificate.
|
|
221
|
+
.TP
|
|
222
|
+
.B cert delete \fIDOMAIN\fR
|
|
223
|
+
Delete a certificate.
|
|
224
|
+
.SS Database management (db, database)
|
|
225
|
+
.TP
|
|
226
|
+
.B db install \fIENGINE\fR
|
|
227
|
+
Install database engine: mysql, postgresql, redis, mongodb.
|
|
228
|
+
.TP
|
|
229
|
+
.B db uninstall \fIENGINE\fR
|
|
230
|
+
Uninstall database engine.
|
|
231
|
+
.TP
|
|
232
|
+
.B db status \fIENGINE\fR
|
|
233
|
+
View engine status.
|
|
234
|
+
.TP
|
|
235
|
+
.B db start|stop|restart \fIENGINE\fR
|
|
236
|
+
Control engine service.
|
|
237
|
+
.TP
|
|
238
|
+
.B db engines
|
|
239
|
+
List available engines and their status.
|
|
240
|
+
.TP
|
|
241
|
+
.B db create \fINAME\fR
|
|
242
|
+
Create a new database.
|
|
243
|
+
.TP
|
|
244
|
+
.B db drop \fINAME\fR
|
|
245
|
+
Delete a database.
|
|
246
|
+
.TP
|
|
247
|
+
.B db list
|
|
248
|
+
List databases.
|
|
249
|
+
.TP
|
|
250
|
+
.B db user\-create \fIUSER\fR
|
|
251
|
+
Create database user.
|
|
252
|
+
.TP
|
|
253
|
+
.B db user\-delete \fIUSER\fR
|
|
254
|
+
Delete database user.
|
|
255
|
+
.TP
|
|
256
|
+
.B db user\-list
|
|
257
|
+
List database users.
|
|
258
|
+
.TP
|
|
259
|
+
.B db grant \fIUSER\fR \fIDATABASE\fR
|
|
260
|
+
Grant privileges to a user.
|
|
261
|
+
.TP
|
|
262
|
+
.B db revoke \fIUSER\fR \fIDATABASE\fR
|
|
263
|
+
Revoke privileges from a user.
|
|
264
|
+
.TP
|
|
265
|
+
.B db backup \fINAME\fR
|
|
266
|
+
Create database backup.
|
|
267
|
+
.TP
|
|
268
|
+
.B db restore \fINAME\fR \fIFILE\fR
|
|
269
|
+
Restore database from backup.
|
|
270
|
+
.TP
|
|
271
|
+
.B db connect
|
|
272
|
+
Connect interactively to a database.
|
|
273
|
+
.TP
|
|
274
|
+
.B db connection\-string \fINAME\fR \fIUSER\fR
|
|
275
|
+
Generate connection string for the application.
|
|
276
|
+
.TP
|
|
277
|
+
.B db config
|
|
278
|
+
Configure engine credentials.
|
|
279
|
+
.SS Backup and restore (backup, bak)
|
|
280
|
+
.TP
|
|
281
|
+
.B backup create \fIDOMAIN\fR
|
|
282
|
+
Create application backup.
|
|
283
|
+
.RS
|
|
284
|
+
.TP
|
|
285
|
+
.BR \-m ", " \-\-description " \fITEXT\fR"
|
|
286
|
+
Description or note for the backup.
|
|
287
|
+
.TP
|
|
288
|
+
.BR \-\-no\-env
|
|
289
|
+
Exclude .env files from backup.
|
|
290
|
+
.TP
|
|
291
|
+
.BR \-\-include\-node\-modules
|
|
292
|
+
Include node_modules (significantly increases size).
|
|
293
|
+
.TP
|
|
294
|
+
.BR \-t ", " \-\-tags " \fITAGS\fR"
|
|
295
|
+
Comma-separated tags to organize backups.
|
|
296
|
+
.RE
|
|
297
|
+
.TP
|
|
298
|
+
.B backup list [\fIDOMAIN\fR]
|
|
299
|
+
List available backups.
|
|
300
|
+
.TP
|
|
301
|
+
.B backup restore \fIBACKUP_ID\fR
|
|
302
|
+
Restore from a backup.
|
|
303
|
+
.TP
|
|
304
|
+
.B backup verify \fIBACKUP_ID\fR
|
|
305
|
+
Verify backup integrity.
|
|
306
|
+
.TP
|
|
307
|
+
.B backup info \fIBACKUP_ID\fR
|
|
308
|
+
Show detailed backup information.
|
|
309
|
+
.TP
|
|
310
|
+
.B backup delete \fIBACKUP_ID\fR
|
|
311
|
+
Delete a backup.
|
|
312
|
+
.TP
|
|
313
|
+
.B backup storage
|
|
314
|
+
Show backup storage usage.
|
|
315
|
+
.TP
|
|
316
|
+
.BR rollback ", " rb " \fIDOMAIN\fR [\fIBACKUP_ID\fR]"
|
|
317
|
+
Restore application to a previous backup.
|
|
318
|
+
If BACKUP_ID is not specified, uses the most recent.
|
|
319
|
+
.SS Web dashboard (web)
|
|
320
|
+
.TP
|
|
321
|
+
.B web start
|
|
322
|
+
Start the web dashboard server.
|
|
323
|
+
.RS
|
|
324
|
+
.TP
|
|
325
|
+
.BR \-H ", " \-\-host " \fIHOST\fR"
|
|
326
|
+
Host to listen on (default: 127.0.0.1).
|
|
327
|
+
.TP
|
|
328
|
+
.BR \-p ", " \-\-port " \fIPORT\fR"
|
|
329
|
+
Port to listen on (default: 8080).
|
|
330
|
+
.TP
|
|
331
|
+
.BR \-d ", " \-\-daemon
|
|
332
|
+
Run in background.
|
|
333
|
+
.RE
|
|
334
|
+
.TP
|
|
335
|
+
.B web stop
|
|
336
|
+
Stop the web dashboard.
|
|
337
|
+
.TP
|
|
338
|
+
.B web status
|
|
339
|
+
View dashboard status.
|
|
340
|
+
.TP
|
|
341
|
+
.B web token
|
|
342
|
+
Show access token.
|
|
343
|
+
.RS
|
|
344
|
+
.TP
|
|
345
|
+
.BR \-r ", " \-\-regenerate
|
|
346
|
+
Generate new access token.
|
|
347
|
+
.RE
|
|
348
|
+
.TP
|
|
349
|
+
.B web install
|
|
350
|
+
Install dashboard dependencies.
|
|
351
|
+
.SS Initial setup (setup)
|
|
352
|
+
.TP
|
|
353
|
+
.B setup init
|
|
354
|
+
Initialize WASM directories and configuration.
|
|
355
|
+
Must be run with sudo the first time.
|
|
356
|
+
.TP
|
|
357
|
+
.B setup completions
|
|
358
|
+
Install shell autocompletion (Bash, Zsh, Fish).
|
|
359
|
+
.RS
|
|
360
|
+
.TP
|
|
361
|
+
.BR \-s ", " \-\-shell " \fISHELL\fR"
|
|
362
|
+
Specific shell: bash, zsh, fish.
|
|
363
|
+
.TP
|
|
364
|
+
.BR \-u ", " \-\-user\-only
|
|
365
|
+
Install only for current user (without sudo).
|
|
366
|
+
.RE
|
|
367
|
+
.TP
|
|
368
|
+
.B setup permissions
|
|
369
|
+
Verify required permissions.
|
|
370
|
+
.TP
|
|
371
|
+
.B setup ssh
|
|
372
|
+
Configure SSH key for Git authentication.
|
|
373
|
+
.RS
|
|
374
|
+
.TP
|
|
375
|
+
.BR \-g ", " \-\-generate
|
|
376
|
+
Generate new key if it doesn't exist.
|
|
377
|
+
.TP
|
|
378
|
+
.BR \-t ", " \-\-type " \fITYPE\fR"
|
|
379
|
+
Key type: ed25519, rsa, ecdsa.
|
|
380
|
+
.TP
|
|
381
|
+
.BR \-T ", " \-\-test " \fIHOST\fR"
|
|
382
|
+
Test SSH connection to a host.
|
|
383
|
+
.TP
|
|
384
|
+
.BR \-S ", " \-\-show
|
|
385
|
+
Show the public key.
|
|
386
|
+
.RE
|
|
387
|
+
.TP
|
|
388
|
+
.B setup doctor
|
|
389
|
+
Run system diagnostics.
|
|
390
|
+
.SS Internal store (store)
|
|
391
|
+
.TP
|
|
392
|
+
.B store init
|
|
393
|
+
Initialize internal database.
|
|
394
|
+
.TP
|
|
395
|
+
.B store stats
|
|
396
|
+
Show store statistics.
|
|
397
|
+
.TP
|
|
398
|
+
.B store import
|
|
399
|
+
Import legacy apps from systemd/nginx.
|
|
400
|
+
.TP
|
|
401
|
+
.B store export
|
|
402
|
+
Export data to JSON.
|
|
403
|
+
.TP
|
|
404
|
+
.B store sync
|
|
405
|
+
Sync with current service state.
|
|
406
|
+
.TP
|
|
407
|
+
.B store path
|
|
408
|
+
Show database file path.
|
|
409
|
+
.SS Security monitor (monitor, mon)
|
|
410
|
+
.TP
|
|
411
|
+
.B monitor status
|
|
412
|
+
View monitoring service status.
|
|
413
|
+
.TP
|
|
414
|
+
.B monitor scan
|
|
415
|
+
Run a security scan.
|
|
416
|
+
.TP
|
|
417
|
+
.B monitor enable
|
|
418
|
+
Enable security monitor.
|
|
419
|
+
.TP
|
|
420
|
+
.B monitor disable
|
|
421
|
+
Disable monitor.
|
|
422
|
+
.TP
|
|
423
|
+
.B monitor test\-email
|
|
424
|
+
Send test email.
|
|
425
|
+
.TP
|
|
426
|
+
.B monitor config
|
|
427
|
+
Show current configuration.
|
|
428
|
+
.SH FILES
|
|
429
|
+
.TP
|
|
430
|
+
.I /var/www/apps/
|
|
431
|
+
Directory where applications are deployed.
|
|
432
|
+
.TP
|
|
433
|
+
.I /var/www/backups/
|
|
434
|
+
Application backups directory.
|
|
435
|
+
.TP
|
|
436
|
+
.I /etc/wasm/
|
|
437
|
+
WASM global configuration.
|
|
438
|
+
.TP
|
|
439
|
+
.I ~/.config/wasm/
|
|
440
|
+
WASM user configuration.
|
|
441
|
+
.TP
|
|
442
|
+
.I /var/lib/wasm/store.db
|
|
443
|
+
SQLite database with app information.
|
|
444
|
+
.SH ENVIRONMENT
|
|
445
|
+
.TP
|
|
446
|
+
.B WASM_CONFIG_DIR
|
|
447
|
+
Configuration directory (default: ~/.config/wasm).
|
|
448
|
+
.TP
|
|
449
|
+
.B WASM_APPS_DIR
|
|
450
|
+
Applications directory (default: /var/www/apps).
|
|
451
|
+
.TP
|
|
452
|
+
.B WASM_BACKUPS_DIR
|
|
453
|
+
Backups directory (default: /var/www/backups).
|
|
454
|
+
.SH EXAMPLES
|
|
455
|
+
Deploy a Next.js application:
|
|
456
|
+
.RS
|
|
457
|
+
.nf
|
|
458
|
+
wasm create -d example.com -s git@github.com:user/app.git -t nextjs
|
|
459
|
+
.fi
|
|
460
|
+
.RE
|
|
461
|
+
.PP
|
|
462
|
+
See what delete would do without executing:
|
|
463
|
+
.RS
|
|
464
|
+
.nf
|
|
465
|
+
wasm --dry-run delete example.com
|
|
466
|
+
.fi
|
|
467
|
+
.RE
|
|
468
|
+
.PP
|
|
469
|
+
List applications in JSON format:
|
|
470
|
+
.RS
|
|
471
|
+
.nf
|
|
472
|
+
wasm --json list
|
|
473
|
+
.fi
|
|
474
|
+
.RE
|
|
475
|
+
.PP
|
|
476
|
+
Install MySQL and create a database:
|
|
477
|
+
.RS
|
|
478
|
+
.nf
|
|
479
|
+
wasm db install mysql
|
|
480
|
+
wasm db create myapp_db
|
|
481
|
+
wasm db user-create myapp_user -d myapp_db
|
|
482
|
+
.fi
|
|
483
|
+
.RE
|
|
484
|
+
.PP
|
|
485
|
+
Create backup and restore:
|
|
486
|
+
.RS
|
|
487
|
+
.nf
|
|
488
|
+
wasm backup create example.com -m "Before update"
|
|
489
|
+
wasm backup restore backup_id_here
|
|
490
|
+
.fi
|
|
491
|
+
.RE
|
|
492
|
+
.PP
|
|
493
|
+
Get SSL certificate:
|
|
494
|
+
.RS
|
|
495
|
+
.nf
|
|
496
|
+
wasm cert create -d example.com -e admin@example.com --nginx
|
|
497
|
+
.fi
|
|
498
|
+
.RE
|
|
499
|
+
.SH EXIT STATUS
|
|
500
|
+
.TP
|
|
501
|
+
.B 0
|
|
502
|
+
Successful operation.
|
|
503
|
+
.TP
|
|
504
|
+
.B 1
|
|
505
|
+
General error or operation failure.
|
|
506
|
+
.SH SEE ALSO
|
|
507
|
+
.BR systemctl (1),
|
|
508
|
+
.BR nginx (8),
|
|
509
|
+
.BR apache2 (8),
|
|
510
|
+
.BR certbot (1),
|
|
511
|
+
.BR git (1)
|
|
512
|
+
.SH BUGS
|
|
513
|
+
Report bugs at: https://github.com/Perkybeet/wasm/issues
|
|
514
|
+
.SH AUTHOR
|
|
515
|
+
Yago Lopez Prado <https://github.com/Perkybeet>
|
|
516
|
+
.SH COPYRIGHT
|
|
517
|
+
Copyright (c) 2024-2025 Yago Lopez Prado.
|
|
518
|
+
.br
|
|
519
|
+
Licensed under WASM-NCSAL 1.0 (Non-commercial, source-available).
|
|
520
|
+
.br
|
|
521
|
+
https://github.com/Perkybeet/wasm/blob/main/LICENSE
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "wasm-cli"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.14.1"
|
|
8
8
|
description = "Web App System Management - Deploy and manage web applications on Linux servers"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "WASM-NCSAL" }
|
|
@@ -40,12 +40,14 @@ classifiers = [
|
|
|
40
40
|
]
|
|
41
41
|
|
|
42
42
|
dependencies = [
|
|
43
|
-
"inquirer>=3.1.0",
|
|
44
43
|
"Jinja2>=3.1.0",
|
|
45
44
|
"PyYAML>=6.0",
|
|
46
45
|
]
|
|
47
46
|
|
|
48
47
|
[project.optional-dependencies]
|
|
48
|
+
interactive = [
|
|
49
|
+
"inquirer>=3.1.0",
|
|
50
|
+
]
|
|
49
51
|
dev = [
|
|
50
52
|
"pytest>=7.0",
|
|
51
53
|
"pytest-cov>=4.0",
|
|
@@ -70,6 +72,7 @@ web = [
|
|
|
70
72
|
"aiofiles>=23.0.0",
|
|
71
73
|
]
|
|
72
74
|
all = [
|
|
75
|
+
"inquirer>=3.1.0",
|
|
73
76
|
"rich>=13.0",
|
|
74
77
|
"psutil>=5.9.0",
|
|
75
78
|
"httpx>=0.25.0",
|
|
@@ -9,7 +9,7 @@ from setuptools import setup, find_packages
|
|
|
9
9
|
|
|
10
10
|
setup(
|
|
11
11
|
name="wasm-cli",
|
|
12
|
-
version="0.
|
|
12
|
+
version="0.14.1",
|
|
13
13
|
description="Web App System Management - Deploy and manage web applications on Linux servers",
|
|
14
14
|
author="Yago López Prado",
|
|
15
15
|
author_email="yago.lopez.adeje@gmail.com",
|
|
@@ -19,15 +19,20 @@ setup(
|
|
|
19
19
|
packages=find_packages(where="src"),
|
|
20
20
|
include_package_data=True,
|
|
21
21
|
install_requires=[
|
|
22
|
-
"inquirer>=3.1.0",
|
|
23
22
|
"Jinja2>=3.1.0",
|
|
24
23
|
"PyYAML>=6.0",
|
|
25
24
|
],
|
|
25
|
+
extras_require={
|
|
26
|
+
"interactive": ["inquirer>=3.1.0"],
|
|
27
|
+
},
|
|
26
28
|
entry_points={
|
|
27
29
|
"console_scripts": [
|
|
28
30
|
"wasm=wasm.main:main",
|
|
29
31
|
],
|
|
30
32
|
},
|
|
33
|
+
data_files=[
|
|
34
|
+
("share/man/man1", ["man/wasm.1"]),
|
|
35
|
+
],
|
|
31
36
|
classifiers=[
|
|
32
37
|
"Development Status :: 4 - Beta",
|
|
33
38
|
"Environment :: Console",
|
|
@@ -105,6 +105,7 @@ def _backup_create(args: Namespace, verbose: bool) -> int:
|
|
|
105
105
|
include_env = not getattr(args, "no_env", False)
|
|
106
106
|
include_node_modules = getattr(args, "include_node_modules", False)
|
|
107
107
|
include_build = getattr(args, "include_build", False)
|
|
108
|
+
include_databases = getattr(args, "include_databases", False)
|
|
108
109
|
tags = getattr(args, "tags", None)
|
|
109
110
|
|
|
110
111
|
if not domain:
|
|
@@ -127,6 +128,7 @@ def _backup_create(args: Namespace, verbose: bool) -> int:
|
|
|
127
128
|
include_env=include_env,
|
|
128
129
|
include_node_modules=include_node_modules,
|
|
129
130
|
include_build=include_build,
|
|
131
|
+
include_databases=include_databases,
|
|
130
132
|
tags=tag_list,
|
|
131
133
|
)
|
|
132
134
|
|
|
@@ -135,7 +137,13 @@ def _backup_create(args: Namespace, verbose: bool) -> int:
|
|
|
135
137
|
logger.info(f" Size: {metadata.size_human}")
|
|
136
138
|
if metadata.git_commit:
|
|
137
139
|
logger.info(f" Commit: {metadata.git_commit} ({metadata.git_branch})")
|
|
138
|
-
|
|
140
|
+
if metadata.database_backups:
|
|
141
|
+
db_count = len(metadata.database_backups)
|
|
142
|
+
logger.info(f" Databases: {db_count} backed up")
|
|
143
|
+
for db_info in metadata.database_backups:
|
|
144
|
+
size_mb = db_info.get("size_bytes", 0) / (1024 * 1024)
|
|
145
|
+
logger.info(f" - {db_info['engine']}/{db_info['name']} ({size_mb:.1f} MB)")
|
|
146
|
+
|
|
139
147
|
return 0
|
|
140
148
|
|
|
141
149
|
except BackupError as e:
|
|
@@ -195,7 +203,7 @@ def _backup_list(args: Namespace, verbose: bool) -> int:
|
|
|
195
203
|
by_domain[backup.domain].append(backup)
|
|
196
204
|
|
|
197
205
|
for dom, dom_backups in by_domain.items():
|
|
198
|
-
logger.info(f"\n
|
|
206
|
+
logger.info(f"\n[{dom}]")
|
|
199
207
|
_print_backup_table(dom_backups, logger, indent=True)
|
|
200
208
|
|
|
201
209
|
return 0
|
|
@@ -226,7 +234,7 @@ def _print_backup_table(backups, logger, indent: bool = False):
|
|
|
226
234
|
desc_str = f" - {backup.description}"
|
|
227
235
|
|
|
228
236
|
logger.info(
|
|
229
|
-
f"{prefix}
|
|
237
|
+
f"{prefix}- {backup.id}: {backup.size_human}, "
|
|
230
238
|
f"{backup.age}{commit_str}{tags_str}{desc_str}"
|
|
231
239
|
)
|
|
232
240
|
|
|
@@ -359,17 +367,17 @@ def _backup_verify(args: Namespace, verbose: bool) -> int:
|
|
|
359
367
|
|
|
360
368
|
if result["valid"]:
|
|
361
369
|
logger.success("Backup is valid")
|
|
362
|
-
if result.get("
|
|
363
|
-
logger.info("
|
|
364
|
-
if result.get("
|
|
365
|
-
logger.info(f"
|
|
370
|
+
if result.get("checksum_ok"):
|
|
371
|
+
logger.info(" [OK] Checksum verified")
|
|
372
|
+
if result.get("files_ok"):
|
|
373
|
+
logger.info(f" [OK] Archive valid ({result.get('file_count', '?')} files)")
|
|
366
374
|
else:
|
|
367
375
|
logger.error("Backup is invalid")
|
|
368
376
|
for err in result["errors"]:
|
|
369
|
-
logger.error(f"
|
|
370
|
-
|
|
377
|
+
logger.error(f" [ERROR] {err}")
|
|
378
|
+
|
|
371
379
|
for warn in result.get("warnings", []):
|
|
372
|
-
logger.warning(f"
|
|
380
|
+
logger.warning(f" [WARN] {warn}")
|
|
373
381
|
|
|
374
382
|
return 0 if result["valid"] else 1
|
|
375
383
|
|