caffeinated-whale-cli 3.8.0__tar.gz → 3.9.0__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.
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/PKG-INFO +57 -6
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/README.md +56 -5
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/pyproject.toml +1 -1
- caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/__init__.py +1 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/axi.py +150 -2
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/backups.py +2 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/init.py +14 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/new_site.py +9 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/restore.py +103 -73
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/serve.py +20 -2
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/status.py +12 -4
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/update.py +38 -10
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/accounts.py +6 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/apps.py +19 -9
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/backup_drill.py +1 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/doctor.py +105 -11
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/fleet.py +1 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/init.py +87 -2
- caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/core/log_storage.py +856 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/maintenance.py +99 -28
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/new_site.py +165 -111
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/schedules.py +10 -1
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/status.py +142 -51
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/supervision.py +2 -2
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/transfer.py +310 -32
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/update.py +52 -6
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/jobs.py +97 -5
- caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/utils/sendme_utils.py +673 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/utils/shared_home.py +14 -1
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Advisories-BmT8oQfh.js → caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/Advisories-4ss45_z_.js +1 -1
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Apps-Dcw4ZQiF.js → caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/Apps-VBrfzRwk.js +1 -1
- caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/Backups-DmhC8579.js +1 -0
- caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/Bench-C_Mzz-lb.js +3 -0
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Breadcrumbs.vue_vue_type_script_setup_true_lang-DjSKQeOY.js → caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/Breadcrumbs.vue_vue_type_script_setup_true_lang-Cp7Dvo-i.js +1 -1
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/FollowPane-BRuO-biQ.js → caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/FollowPane-D04o0jah.js +1 -1
- caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/HealthReasons-BOJO4ZWo.js +1 -0
- caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/HealthReasons-BnFXw61y.css +1 -0
- caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/Instance-DZpo5Bz_.js +1 -0
- caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/Instances-C9dawYTm.js +1 -0
- caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/Job-DE2605u9.js +3 -0
- caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/JobState-C4nxI-tX.js +1 -0
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Jobs-BgVEdmxi.js → caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/Jobs-BbDX4BdR.js +1 -1
- caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/ListRows.vue_vue_type_script_setup_true_lang-BJY0MXVj.js +1 -0
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/MaintenanceAlert-DqFT6z9a.js → caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/MaintenanceAlert-CJHLZ42v.js +1 -1
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/PageHead-p47Rxiwi.js → caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/PageHead-BPYU8PwT.js +1 -1
- caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/PageHeader.vue_vue_type_script_setup_true_lang-Cdyv_ChD.js +1 -0
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/PerformancePanel-DZeEuIqh.js → caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/PerformancePanel-Bi_sj_0F.js +1 -1
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/RemoteHostBadge-7hTGaukh.js → caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/RemoteHostBadge-CoJcviM4.js +1 -1
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Schedules-Btf72D4d.js → caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/Schedules-BoGm8ndV.js +1 -1
- caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/Site-BJNKNOsg.js +9 -0
- caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/Sites-BLafl87c.js +3 -0
- caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/Storage-DI0Di3bE.js +1 -0
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/TabButtons.vue_vue_type_script_setup_true_lang-DzaPGA5w.js → caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/TabButtons.vue_vue_type_script_setup_true_lang-CDgRR3vb.js +1 -1
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/TimeSeries-DUCEf3GZ.js → caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/TimeSeries-DMEs6YB4.js +1 -1
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/UpdatePill-ChMXZ5uW.js → caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/UpdatePill-CEi24KFo.js +1 -1
- caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/index-BwnuYP2d.js +39 -0
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/index-JnUfx8-w.css → caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/index-CqSA-72d.css +1 -1
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/set-menu-BUx20_jn.js → caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/set-menu-7r_kZAmy.js +1 -1
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/tabs-BZusINW8.js → caffeinated_whale_cli-3.9.0/src/caffeinated_whale_cli/webui/dist/assets/tabs-Bg9TNlWs.js +1 -1
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/index.html +2 -2
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli.egg-info/SOURCES.txt +31 -28
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/__init__.py +0 -1
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/utils/sendme_utils.py +0 -435
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/AppNameCell-B1rmwEVF.js +0 -1
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Backups-COF5nXgk.js +0 -1
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Bench-DyRSgptU.js +0 -3
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Instance-DiYaGfOA.js +0 -1
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Instances-ClZeUBnc.js +0 -1
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Job-Dq8lo9yT.js +0 -3
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/JobState-C_7qvU8N.js +0 -1
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/ListRows.vue_vue_type_script_setup_true_lang-yU2l_w-u.js +0 -1
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/PageHeader.vue_vue_type_script_setup_true_lang-Bi30PPrw.js +0 -1
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Site-CGpOIcRr.js +0 -9
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Sites-CfAww7bp.js +0 -3
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/index-TTAPNjEG.js +0 -39
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/LICENSE +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/setup.cfg +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/__main__.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/bridge.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/__init__.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/admin.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/apps.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/backup.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/config.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/db_access.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/deps_ui.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/dev_mode.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/doctor.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/inspect.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/integrations.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/label.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/list.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/logs.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/new_bench.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/open.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/remote.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/restart.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/rm.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/rm_bench.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/rm_site.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/run.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/scale.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/schedule.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/self_update.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/setup.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/start.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/stop.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/ui.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/unlock.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/utils.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/commands/where.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/__init__.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/advisories.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/app_catalog.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/app_deps.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/auto_inspect.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/backup.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/backup_crypto.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/backup_store.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/bench_ops.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/bench_read.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/cloudflare.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/community.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/config.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/cred_bridge.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/credbridge.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/daemon_recovery.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/db_access.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/db_password.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/dev_mode.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/directory.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/docker.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/editors.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/envelope.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/errors.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/exec_stream.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/failure_causes.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/git_refs.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/hosts.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/inspect.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/integrations.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/label.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/ldap_client.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/list.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/logs.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/metrics.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/new_bench.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/npm.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/open.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/protocol.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/publish.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/remote_access.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/resolvers.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/restart.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/restore.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/rm.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/rm_bench.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/rm_site.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/run.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/s3.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/scale.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/self_update.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/setup.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/site_icons.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/site_logs.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/start.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/stop.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/unlock.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/update_preflight.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/updates.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/url.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/version.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/webapi.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/core/where.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/main.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/update_notice.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/utils/__init__.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/utils/agent_hooks.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/utils/auto_inspect.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/utils/bench_labels.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/utils/bench_sites.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/utils/cache.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/utils/completion_utils.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/utils/config_utils.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/utils/console.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/utils/cred_daemon.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/utils/daemon_identity.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/utils/db_utils.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/utils/docker_utils.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/utils/port_utils.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/utils/signals.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/utils/startup.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/utils/tips.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/utils/toon.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/utils/vscode_utils.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/__init__.py +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/assets/Inter-Italic.var-BGHziHgI.woff2 +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/assets/Inter.var-C9xDBOS3.woff2 +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/assets/ListRows-CejsiiPF.css +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/assets/code-insiders--L5huIRx.svg +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/assets/code-ofeWxTsy.svg +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/assets/cursor-jGcLH-b0.svg +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-cyrillic-ext-opsz-normal-CfYZpDVp.woff2 +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-cyrillic-opsz-normal-BFQXbQ-f.woff2 +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-greek-ext-opsz-normal-BmPQvyvo.woff2 +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-greek-opsz-normal-BM0NlUE_.woff2 +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-latin-ext-opsz-normal-DpK-iCPk.woff2 +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-latin-opsz-normal-BwkfbSeq.woff2 +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-vietnamese-opsz-normal-Ci9T9ieq.woff2 +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-cyrillic-ext-wght-normal-EocZY2iu.woff2 +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/assets/opsz-DreOFYE_.css +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/csp.json +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/logo-whale.png +0 -0
- {caffeinated_whale_cli-3.8.0 → caffeinated_whale_cli-3.9.0}/src/caffeinated_whale_cli/webui/dist/theme-boot.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: caffeinated-whale-cli
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.9.0
|
|
4
4
|
Summary: A CLI tool to help manage Frappe Docker instances.
|
|
5
5
|
Author-email: Christopher McKay <mckay.christopher73@outlook.com>
|
|
6
6
|
License: MIT
|
|
@@ -515,6 +515,13 @@ The Administrator password is resolved the same way as for `new-bench`: the flag
|
|
|
515
515
|
A site name that already exists on the bench is refused, and every `--app` must already be in the bench's `apps/` folder (fetch one first with `cwcli apps install <project> <app> --fetch-only`).
|
|
516
516
|
cwcli checks the MariaDB root password with one connection before it creates the site, so a wrong one fails in seconds with nothing changed.
|
|
517
517
|
Every picked app's Frappe range and required apps are checked before the site is created, exactly as for `apps install`, and the apps are installed in dependency order, so a refusal leaves no site behind.
|
|
518
|
+
When new-site installs at least one app on the new site of a running bench, it restarts the running cwcli-supervised programs that run the bench's Python (`web`, `schedule`, and every worker) once, after the site and its apps are in place, because a process that started before an app reached the bench cannot import it, and cwcli cannot tell when an app already in `apps/` arrived.
|
|
519
|
+
This is the same resynchronise step `apps install` uses: the reload succeeds when the new site answers Frappe, together with every existing site that has an app new-site checked out at another ref, because that checkout moved their code too.
|
|
520
|
+
A failure on one of those existing sites is reported as the checkout breaking that site; any other site is never probed, so an unrelated site in maintenance cannot fail new-site.
|
|
521
|
+
new-site names each restarted program (`processes_restarted` on the agent surface) and exits non-zero if the reload fails; a bench run by a manager cwcli does not supervise is not restarted, and new-site exits non-zero with a manual-restart remedy when a site does not answer.
|
|
522
|
+
A site created with no app restarts nothing, and a stopped bench stays stopped; the same holds for the web UI's New site.
|
|
523
|
+
Restore drills and transfers also create their site through new-site, but they skip this reload and rely on the restart their restore runs straight after.
|
|
524
|
+
`cwcli init --reuse-bench` with `--install-erpnext` on a running bench does the same for ERPNext.
|
|
518
525
|
|
|
519
526
|
```bash
|
|
520
527
|
CWCLI_ADMIN_PASSWORD=... cwcli new-site my-project shop.localhost --app erpnext --default
|
|
@@ -1353,7 +1360,7 @@ It flags an app whose `apps/<app>` is a symlink (naming the real directory it po
|
|
|
1353
1360
|
**`apps install`** - ensures each app is present on the bench, then installs it on the target site(s).
|
|
1354
1361
|
An app absent from `apps/` is fetched with `bench get-app` (honoring `--branch`); an app already present **and registered** (in `sites/apps.txt`) is not fetched again, so pre-warmed benches install it without failing on the existing directory. A repository URL is matched to the app already on the bench by that checkout's git remote, so a repository named differently from its app (`field-service` holding `field_service`) is recognized too; `bench get-app` alone would clone it into `apps/field-service` and then fail renaming that clone onto the existing `apps/field_service`. A present directory that is *not* a valid install - the leftover of an earlier fetch that cloned but failed at its `pip install` step - is refused with an actionable message telling you to remove it and re-run, rather than reporting a false "get-app ok" and then dumping a raw install traceback on every retry. When a fresh fetch itself fails, the partial `apps/<app>` directory it created is removed so a retry genuinely re-fetches (a pre-existing app directory is never touched).
|
|
1355
1362
|
Each app is a known app name **or** a git URL (passed straight to `bench get-app` when a fetch is needed, so custom apps not in bench's registry work). Apps may be given positionally (matching `apps update`/`apps checkout` and `axi apps install`) or with `-a`/`--app`; both forms combine, and repeat either to install more than one.
|
|
1356
|
-
`--fetch-only` ensures the app is present without installing it on any site.
|
|
1363
|
+
`--fetch-only` ensures the app is present without installing it on any site; it restarts nothing, because no site uses the app until it is installed, and that install reloads the bench.
|
|
1357
1364
|
**Compatibility and required apps.** Before anything is fetched, install reads what each app declares at the exact ref that will land: its Frappe range in `pyproject.toml` (`[tool.bench.frappe-dependencies]`, for example `frappe = ">=15.0.0,<17.0.0"`) and its `required_apps` in `<app>/hooks.py`.
|
|
1358
1365
|
An app already on the bench is read from that copy; any other app is read from its repository on the host, so nothing reaches the instance until the check passes.
|
|
1359
1366
|
Each range is compared with the version on the bench in bench's own dialect (semantic_version's `SimpleSpec`, so `>=16.0.0` does not accept a `16.0.0-dev` Frappe), and a range bench cannot parse (a space-separated `">=15.0.0 <16.0.0"`) is refused, because bench stops on it too.
|
|
@@ -1378,6 +1385,11 @@ A bench that was not running is left alone.
|
|
|
1378
1385
|
|
|
1379
1386
|
**`apps update`** - the canonical app-update path (what the deprecated `cwcli update` now delegates to). Updating the `frappe` framework app (or `erpnext`) is a **core update**: only the core app you name is reset to its remote branch (`apps update <p> frappe` never touches erpnext) (`git fetch <remote> <branch>` then `git reset --hard <remote>/<branch>`, for the app's own remote and checked-out branch, never bench's bench-wide `bench update --reset`, which hard-reset every app on the bench), every site's stale `locks` folder is cleared first and listed (a site whose migrate lock is held by a running migrate refuses the update before anything runs, with or without the preflight), the bench's requirements are reinstalled, then every affected site migrates under the same per-site maintenance lifecycle as any other app; other apps use the normal git-pull + migrate flow. **Every update reinstalls the bench's Python requirements before any site migrates:** after the pull, cwcli runs `bench setup requirements --python` (a core update runs the full `bench setup requirements`) for every app on the bench, not only the updated one, because a package the new code needs can come from another app - a frappe that gained `pyarrow` fails the migrate of a site whose update named only a custom app with `ModuleNotFoundError`. A failed or unknown requirements step migrates no site and exits non-zero; the report's `requirements` field says `ok`, `failed`, `unknown`, or `skipped`. `--skip-requirements` opts out: the step does not run, the output says it was skipped, and the run is not failed for it. After the migrations finish and maintenance mode is lifted, it runs the same **resynchronise** step as `apps install`, so a `git pull` cannot leave the bench's web, scheduler, and workers on the code that was there before it; every migrated site must answer Frappe before the run reports success. `--site` narrows which affected sites are migrated; if none of the named site(s) actually have the app installed, the command refuses and exits non-zero rather than silently migrating nothing (a genuine typo/mismatch guard - a bench with no affected sites at all still exits zero). It accepts the same migration flags as the [deprecated `update` command](#update---update-apps-and-migrate) (`--clear-cache`, `--clear-website-cache`, `--build`, `--skip-maintenance`, `--skip-requirements`, `--no-recache`). A core update honours `--site` and those flags like any other app, and always rebuilds assets.
|
|
1380
1387
|
Because the core update never runs bench's own bench-wide update, nothing is set in `sites/common_site_config.json`: a site that fails to migrate is named as such (`failed_migrations`), its maintenance mode is cleared by cwcli's `finally`, and the summary states the bench state - which sites migrated, which did not and why, and whether any site is still in maintenance.
|
|
1388
|
+
|
|
1389
|
+
A site that cannot be opened (a rejected database login, a broken site config) is never migrated and is always listed with its cause.
|
|
1390
|
+
It fails the run (exit 1) when it is known to have an updated app (the cache records the app on it, the app is `frappe`, or you named the site with `--site`).
|
|
1391
|
+
Otherwise it is unrelated to the update as far as cwcli can tell, so the run succeeds and reports `warned` ("finished with warnings" in the CLI and the web UI's job page), with the site in `unreadable_sites` but not in `unreadable_with_app`.
|
|
1392
|
+
|
|
1381
1393
|
`--force` is an opt-in, **destructive** recovery for a conflicting update (updating `frappe` gives it a different meaning, described under [the data-loss guard](#apps---manage-frappe-apps) below): if an app's `git pull` hits a **conflict** (local changes that would be overwritten, or a conflicted merge), it hard-resets that app to its remote tracking branch (`git fetch` then `git reset --hard @{u}`), discarding the local changes, so the update completes instead of failing. It fires **only on a conflict** - a clean update is untouched, and a pull that failed for another reason (network, auth) is left as the failure it is rather than having work discarded. Without `--force`, a conflict fails safely and discards nothing. Every force-reset app is reported (`force_reset_apps`) and a warning is printed at the reset. `--force` does not delete untracked files (it never runs `git clean`), matching `apps checkout --reset`. `--force` also clears a git **"dubious ownership"** refusal before pulling: when an app's repository is owned by a different user than the container runs as - common on a shared-mode or migrated instance whose app sources are owned by a pre-migration uid - it re-owns the repository to the container user so the pull proceeds, rather than surfacing a raw git ownership error. A `cwcli start`/`cwcli restart` self-heals the same ownership so a plain `apps update` works too; `--force` fixes it inline without a restart.
|
|
1382
1394
|
**The `frappe` preflight.** A core update resets the core app's git checkout and reinstalls the bench's requirements before any site migrates, so a git problem (a branch the remote lacks, an unreachable remote, a detached HEAD) or a code requirement the bench cannot meet would otherwise surface mid-run.
|
|
1383
1395
|
Updating `frappe` therefore runs a preflight first that predicts those failures in seconds, by evaluating bench's own rules against the same state bench reads.
|
|
@@ -1805,7 +1817,7 @@ cwcli backups key export --to FILE | import --from FILE [--replace]
|
|
|
1805
1817
|
- A move needs `--yes`, and drops each source only after its copy answered its checks, through the same backup gate `cwcli rm-site` uses.
|
|
1806
1818
|
- Retention keeps a site's newest verified set always, keeps safety sets (`before-*` reasons) for 14 days with at most 5 per site, and keeps the newest set of each of the last 7 days and 4 weeks (S3: 7 days, 4 weeks, 12 months). Change these with `cwcli backups settings`.
|
|
1807
1819
|
- `prune`, the scheduled prune, and the S3 prune never delete an unverified set. An unverified set takes no retention slot and stays until you delete it with `cwcli backups delete`.
|
|
1808
|
-
- Apart from the daily backup you can switch on with `cwcli backups settings --schedule on`, cwcli takes an automatic backup in
|
|
1820
|
+
- Apart from the daily backup you can switch on with `cwcli backups settings --schedule on`, cwcli takes an automatic backup in two cases only: a core (frappe or erpnext) update started from the web UI or a schedule first takes a verified `before-core-update` set of every site on the bench, and stops before changing anything if one does not verify; and the web UI's Remove app first takes a verified `before-app-remove` set of the site unless its backup checkbox is unticked, removing nothing if that set does not verify. `cwcli rm`, `rm-site`, and `rm-bench` also move their removal backups into the store as `before-removal` sets.
|
|
1809
1821
|
|
|
1810
1822
|
```bash
|
|
1811
1823
|
# Take a verified set of the default site, then list the store
|
|
@@ -2004,7 +2016,7 @@ Copying the downloaded backup into the container streams through a bounded pipe
|
|
|
2004
2016
|
- **NAT traversal** - Works behind firewalls and corporate networks
|
|
2005
2017
|
- **No cloud intermediary** - Direct peer-to-peer connections
|
|
2006
2018
|
- **Cross-platform** - Works on macOS, Linux, and Windows
|
|
2007
|
-
- **Automatic setup** - sendme binary
|
|
2019
|
+
- **Automatic setup** - cwcli pins sendme v0.37.1: the first send or receive, from the command line or the web UI, downloads that exact release into `~/.local/bin` of the account that runs it, checking the archive and the binary against the SHA-256 values cwcli ships; every send or receive copies the installed binary into a fresh private directory (under `$XDG_RUNTIME_DIR`, else the system temp dir, else `~/.cache/cwcli/sendme` when your home is not group- or world-writable, whichever first lets you execute a file), hashing the bytes as it copies them, and runs that copy only when they match, so the bytes that run are the bytes that were checked (known limit: where none of those directories allows execution, for example all mounted `noexec`, cwcli runs the installed binary right after hashing it and warns that it could be swapped between that check and the run), and an installed copy that does not match is replaced by the pinned release first (on a platform cwcli pins no build for, it uses the sendme on PATH as it is, unchecked, and never installs one; on a shared install the web UI runs as the service account, so it keeps its own copy in that account's home); `cwcli doctor` reports whether your copy and the web UI's match, and names the manual install command, with its checksum step, if the download fails
|
|
2008
2020
|
- **Multiple receivers** - Same ticket can be used by multiple machines
|
|
2009
2021
|
|
|
2010
2022
|
**Use Cases:**
|
|
@@ -2217,16 +2229,31 @@ hint to run `cwcli start` to bring it under cwcli's supervisor. In this mode the
|
|
|
2217
2229
|
per-process supervisord `state` is unavailable (there is no supervisord to ask);
|
|
2218
2230
|
`up` comes straight from `ps`. `status` only reads - it never launches supervisord.
|
|
2219
2231
|
|
|
2232
|
+
**A degraded bench names what is wrong.** `degraded` folds every check into one
|
|
2233
|
+
token, so each bench also carries `reasons`: one entry per failed check, computed
|
|
2234
|
+
from the same facts the token was (so the list is empty exactly when the bench is
|
|
2235
|
+
not degraded). Each names the check (`supervisor`, `process` or `web`), its subject
|
|
2236
|
+
(the program label, `supervisord`, or `web`), the state the probe saw (supervisord's
|
|
2237
|
+
`FATAL`/`BACKOFF`/`EXITED`/`STOPPED`, `down` for a process `ps` did not find, `no
|
|
2238
|
+
response` or `not listening` for the web probe) and one plain sentence. A dead
|
|
2239
|
+
supervisor is one reason, not one per program. `cwcli axi status` carries them as
|
|
2240
|
+
`benches[i].reasons`, and the web UI shows the same list on the instance, bench and
|
|
2241
|
+
site pages (with a restart or start button for each) and names the first reason
|
|
2242
|
+
beside `degraded` on the Instances cards and Sites rows and in the sidebar's tooltip.
|
|
2243
|
+
|
|
2220
2244
|
**Maintenance mode is called out plainly, and `status` offers to take sites out of it.**
|
|
2221
2245
|
A site stuck in maintenance mode answers HTTP 503 (`SessionStopped`) to every user with no other signal - the state a `migrate` / `apps update` killed mid-run (a closed terminal, a `kill`, an OOM kill, a reboot) or a failed `bench update` leaves behind.
|
|
2222
2246
|
`status` reads maintenance mode for every site of every bench it reports, the way Frappe answers it, not from one file:
|
|
2223
2247
|
the bench's `sites/common_site_config.json` first, with each site's own `site_config.json` overriding it;
|
|
2224
2248
|
and, when the web server is `bench serve` with a default site (`bench use`), every request is answered as that default site, so a site whose own file says `maintenance_mode: 0` still answers 503 while the default site inherits a bench-wide 1.
|
|
2225
2249
|
When something is in maintenance, `status` also asks each site over HTTP (`/api/method/ping` with its `Host`), because Frappe can keep answering from its config cache for up to a minute after a file changes.
|
|
2250
|
+
Frappe v16.61.0 and later serve a site's reads in maintenance mode and refuse only its writes (with HTTP 503 `InReadOnlyMode`) unless `allow_reads_during_maintenance` is set to 0, so such a site answers the ping with 200 either way: `status` reports it as in maintenance mode, read-only, from its config files and the installed Frappe's default.
|
|
2251
|
+
Earlier releases, v16.60.x included, answer 503 (`SessionStopped`) unless that key is set.
|
|
2226
2252
|
It prints one `MAINTENANCE MODE` fault per bench (even without `-v`) naming the affected sites, the write that holds them (the bench-wide `maintenance_mode`, with `pause_scheduler` when `bench update` set both, or a site's own flag), and who set it: cwcli records the maintenance mode it turns on, so a flag left by an interrupted cwcli `migrate` or `apps update` names that operation and its job, while a flag with no record is reported as possibly set on purpose.
|
|
2227
2253
|
On an interactive terminal `status` then asks whether to take the sites out of maintenance mode.
|
|
2228
2254
|
`--clear-maintenance` does it without asking (the way for scripts and agents; a non-TTY is never asked and the fault names this flag).
|
|
2229
2255
|
Taking them out clears the bench-wide flags with `bench set-config --global --parse <flag> 0` (resuming a scheduler paused with them) and each site's own flag with `set-maintenance-mode off`, then waits until no site answers Frappe's ping with 503 (SessionStopped) any more; `--clear-maintenance` exits 1 if a site still does.
|
|
2256
|
+
A read-only site answers that ping with 200 throughout, so the clear cannot check it: it reports `Maintenance mode cleared: <site>. Writes can take up to a minute to resume.` (the site is listed under `read_only`, not `answering`, and the clear is not `verified`), and exits 0.
|
|
2230
2257
|
A site that does not answer at all, because its web server is not running, is not waited for: cwcli reports that it could not check that site.
|
|
2231
2258
|
It is never offered, and `--clear-maintenance` refuses with exit 1, while anything that sets maintenance mode still runs on the bench: the cwcli operation that turned it on, an in-container `bench migrate`/`update`/`restore`, or a held migrate lock.
|
|
2232
2259
|
`cwcli axi status` carries the per-bench report as `maintenance` (with `down`, `bench_flags`, `owners` and `busy`) beside `maintenance_mode`, plus the `status.maintenance_mode` and `status.scheduler_paused` warnings.
|
|
@@ -2333,11 +2360,11 @@ Interrupt requests use the command's cleanup path; Detach only leaves the page,
|
|
|
2333
2360
|
On Windows a job that has not begun its cleanup five minutes after Interrupt, or has not finished it two minutes after beginning, is terminated; one that never began is marked `unknown` because its cleanup may not have run.
|
|
2334
2361
|
Jobs keeps every active job and the 100 most recent finished ones; older finished records are pruned when a new job starts.
|
|
2335
2362
|
The `self-update` job restarts the local daemon and the open page reloads after its protocol check sees the replacement.
|
|
2336
|
-
The guarded destructive verbs run as jobs too, each behind a typed confirmation of the exact name of what it destroys: remove an instance (`rm`: every site backed up first and the named volumes deletable only while the instance runs, mirroring `cwcli axi rm`, unless Force is ticked, which skips the verified backup like `cwcli rm --no-backup` after a red warning naming what is lost for good), drop a site (`rm-site`), remove a stopped bench (`rm-bench`), check out an app ref discarding local changes (`apps checkout --reset`, typed back as the app's name), and force a `frappe` update past the data-loss guard (`apps update` with Force ticked, typed back as the bench's name).
|
|
2363
|
+
The guarded destructive verbs run as jobs too, each behind a typed confirmation of the exact name of what it destroys: remove an instance (`rm`: every site backed up first and the named volumes deletable only while the instance runs, mirroring `cwcli axi rm`, unless Force is ticked, which skips the verified backup like `cwcli rm --no-backup` after a red warning naming what is lost for good), drop a site (`rm-site`), remove a stopped bench (`rm-bench`), remove an app from one site (`apps uninstall`, typed back as the app's name, offered on the site page for every installed app but `frappe`, with a verified backup of the site first unless unticked), check out an app ref discarding local changes (`apps checkout --reset`, typed back as the app's name), and force a `frappe` update past the data-loss guard (`apps update` with Force ticked, typed back as the bench's name).
|
|
2337
2364
|
A failed backup drops nothing, exactly as on the command line, and the job page shows bench's own reason.
|
|
2338
2365
|
Settings is writable for an Admin: cache on/off, forget one remembered project or clear the whole cache (confirmed first), add, remove and prune bench search paths (the prune check names any stopped instance that keeps it from pruning), auto-inspect and its interval and boot hook, the persistent credential bridge and its boot unit, a Start (or Restart) button for either daemon while its feature is enabled, with the daemon log's last line shown while it is down, tips, and the agent SessionStart hooks `cwcli axi setup` installs; every control sits beside the terminal command that does the same.
|
|
2339
2366
|
Schedules puts any of those jobs on a timetable (templates, a friendly recurrence picker with the cron underneath, one-off runs, recipes of chained steps, "after a successful job" and "when the instance starts" triggers, a week's timeline, and "Schedule this…" on every job's page); see `schedule` below.
|
|
2340
|
-
`cwcli restore` (the UI restores sets from the backup store instead), `
|
|
2367
|
+
`cwcli restore` (the UI restores sets from the backup store instead), `run`, `cwcli open`'s Docker shell (the UI opens VS Code, VS Code Insiders or Cursor only), an in-browser terminal and the shared multi-user mode are not in the UI; each needs its own decision first.
|
|
2341
2368
|
Other machines' instances are in the UI through **Remote hosts** (Settings > Remote hosts and the `remote` command below).
|
|
2342
2369
|
|
|
2343
2370
|
**Integrations (Settings > Integrations):** connections to systems outside cwcli, each off until an Admin turns it on.
|
|
@@ -2412,6 +2439,28 @@ When this machine's Docker stops answering (it refuses the connection, or three
|
|
|
2412
2439
|
A single slow answer from an overloaded Docker is not treated as an outage.
|
|
2413
2440
|
Everything recovers by itself once Docker answers again, with no daemon restart.
|
|
2414
2441
|
|
|
2442
|
+
#### Storage
|
|
2443
|
+
|
|
2444
|
+
The Storage page (sidebar, beside Backups) puts the logs around your instances next to the backup store, so what fills the disk is on one page.
|
|
2445
|
+
It shows, for every instance, the Docker container logs (each container's log driver, whether a size limit is set, and the size of its current and rotated files) and the bench and site log files inside the frappe container (`<bench>/logs` and each `<bench>/sites/<site>/logs`) (the current files and the rotated `*.log.1`, `*.log.2.gz`, ... beside them), plus the host's systemd journal usage.
|
|
2446
|
+
Four actions trim them, each behind a confirmation that spells out what goes, and each an Admin job (log data is deleted, or the compose file is edited):
|
|
2447
|
+
|
|
2448
|
+
- **Set rotation** writes `json-file` logging with `max-size` and `max-file` into every service of the instance's compose file.
|
|
2449
|
+
Running containers keep the settings they were created with, and the page says so; the rotation binds when each container is next recreated.
|
|
2450
|
+
`cwcli init` writes no rotation of its own, so a new instance's containers follow the Docker daemon's default until you set one here.
|
|
2451
|
+
- **Empty Docker logs** empties every json-file container log of the instance and removes its rotated files, through a short-lived root helper container that mounts only those log directories (never by hand under Docker's data root).
|
|
2452
|
+
Docker writes the file in append mode, so the containers keep running and nothing inside them is touched; their `docker logs` history is gone.
|
|
2453
|
+
- **Remove rotated** removes a bench's rotated log files, under `logs/` and each site's `logs/`, and keeps every current file, so a running bench loses nothing it holds open.
|
|
2454
|
+
A stopped instance's bench logs are not measured and never pruned: the page says to start it, and never starts it for you.
|
|
2455
|
+
- **Trim the journal** runs `journalctl --vacuum-size --vacuum-time` (500M and 2weeks unless you change them) when cwcli runs as root; it deletes older archived entries for the whole host.
|
|
2456
|
+
Anywhere else the card says that vacuuming needs root and cwcli does not have it, and shows the commands (`sudo journalctl --vacuum-size=500M`, `--vacuum-time=2weeks`) to copy into a terminal.
|
|
2457
|
+
|
|
2458
|
+
The journal card runs `journalctl --disk-usage` on a Linux host with systemd-journald.
|
|
2459
|
+
A container on the `journald` log driver is shown as managed by the system journal, with no size of its own.
|
|
2460
|
+
On macOS, Windows, or a Linux without systemd it says plainly that there is no host journal to manage (Docker Desktop's VM keeps its own logs).
|
|
2461
|
+
Sizes are read from the host when Docker's data root is readable and otherwise through a read-only helper container; a size cwcli could not measure is shown as not measured, never as zero.
|
|
2462
|
+
`cwcli axi storage logs` is the same report as TOON (see the agent surface below).
|
|
2463
|
+
|
|
2415
2464
|
#### Site addresses
|
|
2416
2465
|
|
|
2417
2466
|
The site page's **Open site** opens the address Frappe itself builds for the site, with the same rule as `frappe.utils.get_url`, which also builds the site's OAuth and SSO redirect URLs.
|
|
@@ -3311,6 +3360,8 @@ These are agent-only for now: there is no human `cwcli migrate`, `cwcli run-test
|
|
|
3311
3360
|
|
|
3312
3361
|
`cwcli axi setup-wizard <project> <site> [--country <country>] [--currency <currency>] [--timezone <timezone>]` headlessly completes a site's Frappe setup wizard. A fresh site - whether created by `cwcli init`/`cwcli axi init` without `--complete-setup`, or by a bare `bench new-site` outside cwcli entirely - is left in the setup-wizard state: `frappe.is_setup_complete()` is `false` and the `desktop:home_page` default stays `setup-wizard`, so a non-System-Manager desk renders with no navbar. This runs the same whitelisted RPC a person finishing the wizard in a browser triggers - `frappe.desk.page.setup_wizard.setup_wizard.setup_complete`, called via `bench execute ... --kwargs` with the args dict the wizard UI would have submitted (System Settings' country/currency/timezone/language; omitted flags fall back to `United States`/`USD`/`UTC`/`English`). It is **idempotent by Frappe's own design**: `setup_complete` checks `frappe.is_setup_complete()` first and no-ops under an advisory lock when the site is already set up, so re-running it is always safe - the report's `already_complete` field says whether it found the site already done. No user is created: `email`/`full_name`/`password` are deliberately left out of the args dict, so the `Administrator` account `cwcli init`'s `--admin-password` already provisioned is left untouched. Like the other bench-scoped verbs it takes `--bench`, has no `--yes`, and reports a stopped project as a usage error naming `cwcli start`.
|
|
3313
3362
|
|
|
3363
|
+
`cwcli axi storage logs [<project>]` reports what the logs around the instances weigh, as one TOON document: each instance's Docker container logs (per container: driver, `max_size`/`max_file`, whether a rotation is live, and the size and count of its current and rotated files, measured from the host or through a read-only root helper when the data root is not readable), the log files under each bench's `logs/` and each site's `sites/<site>/logs/` split into current and rotated bytes, the compose file's declared logging options, and the host journal (`applies`, `journalctl --disk-usage`, `privileged`, and the `sudo journalctl --vacuum-*` commands for when cwcli is not root). A stopped instance's bench logs are not measured and the report says so. Four verbs trim them, all mirroring the web UI's Storage page: `cwcli axi storage set-docker-log-rotation <project> [--max-size 10m] [--max-file 3]` writes the rotation into the compose file (it binds when a container is next recreated; the report shows which containers already carry it); `cwcli axi storage truncate-docker-logs <project> --yes` empties every json-file container log and removes the rotated ones through a root helper mounting only those directories; `cwcli axi storage prune-bench-logs <project> [--bench <sel>] --yes` removes a bench's rotated log files (its own and its sites') and keeps every current one, refusing a stopped instance (exit 1, naming `cwcli start`) rather than starting it; without `--bench`, a cached bench whose logs cannot be read is skipped with a warning; `cwcli axi storage vacuum-journal [--max-size 500M] [--max-time 2weeks] --yes` trims the host journal when cwcli runs as root and otherwise refuses (exit 1) with the `sudo journalctl` command to run. The three removals without `--yes` are usage errors naming the flag (exit 2), never prompts.
|
|
3364
|
+
|
|
3314
3365
|
`cwcli axi init` provisions a new instance, bench, and site the way `cwcli init` does, but non-interactively and as ONE terminal TOON document. It **blocks** for the full 10-20 minute run - the same block-and-emit-one-document shape as `cwcli axi apps update`, because a progress stream would break the one-TOON-document contract - narrating coarse phase labels to stderr; run `cwcli logs <project>` / `cwcli status <project>` from a second shell for live progress. Running several `axi init` calls in parallel can OOM-kill the host on a memory-constrained machine - serialize them instead. Adding a bench to an already-running instance never disturbs it or its other benches: the frappe container is never pulled, recreated, or restarted, so every already-serving bench keeps running throughout. Re-running init against a stopped instance starts its existing containers as they are, without pulling images or recreating them, so its benches keep their Python environments. If the re-run would change that instance's compose settings, such as a different `--port` on an instance still on the default port range (8000-8005), init refuses with exit 1 (`instance.settings_changed`), leaves the compose file unchanged, and names each change; remove the instance with `cwcli rm` (which backs it up) and run init again, or rerun init without the changed options. For an instance created on another `--port` or widened by `cwcli scale`, init does not compare `--port`. An instance whose frappe container has never started, such as one left by a first init that failed at `docker compose up`, has no bench to protect, so init neither refuses nor uses `--no-recreate` there: it pulls images and recreates the containers with the new options. After the bench+site is created, it starts the bench's dev services by default (the same `core.start` behind `cwcli start`/`cwcli axi start`), leaving a running bench rather than a created-but-idle one; `--no-start` creates without starting, for automation/CI, distinct from Docker container startup (stage 1 always brings the containers up regardless of this flag). A dev-services start failure degrades to a stderr warning rather than a non-zero exit, since the bench was already created. The site administrator password comes from the **`CWCLI_ADMIN_PASSWORD` environment variable (recommended)** or `--admin-password`; the flag wins if both are set, and with neither set the verb refuses with a usage error (exit 2) naming both - it never generates a password and never prompts. The env var keeps the secret off the process argv (visible in `ps`/shell history) that the flag exposes; the container-side `bench new-site` still receives it, so treat the value as one-time. The MariaDB root password takes the same shape via `CWCLI_DB_ROOT_PASSWORD` / `--db-root-password` (default: the instance's remembered password, else `123`); on a new instance it becomes MariaDB's own root password, as on `cwcli init`. The interactive decisions the human `cwcli init` prompts for become non-prompting errors: an existing bench with neither `--reuse-bench` nor `--no-reuse-bench` is a usage error (exit 2) naming both; a port conflict names `--port` (exit 1); containers that do not come up point at `cwcli status`/`cwcli logs` (exit 1); an invalid `--uid` (0, negative, or non-numeric), or a non-root user's `--uid` naming a uid other than their own, is rejected before any container work. `--uid` behaves as it does on `cwcli init` (including the root-host fallback, whose one-time warning is folded into the report's `warnings`). There is no `--auto-start` (compose `cwcli axi start` then re-run) and no `--verbose` (stdout is always TOON). `--bench` here is the NAME of the bench to create, distinct from the `--bench <index|label>` selector the other verbs use.
|
|
3315
3366
|
|
|
3316
3367
|
`--complete-setup` runs the new site's Frappe setup wizard headlessly right after creation - the same operation `cwcli axi setup-wizard` performs standalone, sharing its exact implementation - so a fresh site does not land in the unfinished setup-wizard state a non-System-Manager desk renders with no navbar in. `--country`/`--currency`/`--timezone` tune it (require `--complete-setup`; each has a sensible default when omitted) and are usage errors on their own. Its outcome rides as a `setup_wizard` block inside the SAME `InitReport` document, not a second one; a failure there is never exit `0` even though the bench and site above it were already created successfully - the `setup_wizard` block still carries what happened.
|
|
@@ -474,6 +474,13 @@ The Administrator password is resolved the same way as for `new-bench`: the flag
|
|
|
474
474
|
A site name that already exists on the bench is refused, and every `--app` must already be in the bench's `apps/` folder (fetch one first with `cwcli apps install <project> <app> --fetch-only`).
|
|
475
475
|
cwcli checks the MariaDB root password with one connection before it creates the site, so a wrong one fails in seconds with nothing changed.
|
|
476
476
|
Every picked app's Frappe range and required apps are checked before the site is created, exactly as for `apps install`, and the apps are installed in dependency order, so a refusal leaves no site behind.
|
|
477
|
+
When new-site installs at least one app on the new site of a running bench, it restarts the running cwcli-supervised programs that run the bench's Python (`web`, `schedule`, and every worker) once, after the site and its apps are in place, because a process that started before an app reached the bench cannot import it, and cwcli cannot tell when an app already in `apps/` arrived.
|
|
478
|
+
This is the same resynchronise step `apps install` uses: the reload succeeds when the new site answers Frappe, together with every existing site that has an app new-site checked out at another ref, because that checkout moved their code too.
|
|
479
|
+
A failure on one of those existing sites is reported as the checkout breaking that site; any other site is never probed, so an unrelated site in maintenance cannot fail new-site.
|
|
480
|
+
new-site names each restarted program (`processes_restarted` on the agent surface) and exits non-zero if the reload fails; a bench run by a manager cwcli does not supervise is not restarted, and new-site exits non-zero with a manual-restart remedy when a site does not answer.
|
|
481
|
+
A site created with no app restarts nothing, and a stopped bench stays stopped; the same holds for the web UI's New site.
|
|
482
|
+
Restore drills and transfers also create their site through new-site, but they skip this reload and rely on the restart their restore runs straight after.
|
|
483
|
+
`cwcli init --reuse-bench` with `--install-erpnext` on a running bench does the same for ERPNext.
|
|
477
484
|
|
|
478
485
|
```bash
|
|
479
486
|
CWCLI_ADMIN_PASSWORD=... cwcli new-site my-project shop.localhost --app erpnext --default
|
|
@@ -1312,7 +1319,7 @@ It flags an app whose `apps/<app>` is a symlink (naming the real directory it po
|
|
|
1312
1319
|
**`apps install`** - ensures each app is present on the bench, then installs it on the target site(s).
|
|
1313
1320
|
An app absent from `apps/` is fetched with `bench get-app` (honoring `--branch`); an app already present **and registered** (in `sites/apps.txt`) is not fetched again, so pre-warmed benches install it without failing on the existing directory. A repository URL is matched to the app already on the bench by that checkout's git remote, so a repository named differently from its app (`field-service` holding `field_service`) is recognized too; `bench get-app` alone would clone it into `apps/field-service` and then fail renaming that clone onto the existing `apps/field_service`. A present directory that is *not* a valid install - the leftover of an earlier fetch that cloned but failed at its `pip install` step - is refused with an actionable message telling you to remove it and re-run, rather than reporting a false "get-app ok" and then dumping a raw install traceback on every retry. When a fresh fetch itself fails, the partial `apps/<app>` directory it created is removed so a retry genuinely re-fetches (a pre-existing app directory is never touched).
|
|
1314
1321
|
Each app is a known app name **or** a git URL (passed straight to `bench get-app` when a fetch is needed, so custom apps not in bench's registry work). Apps may be given positionally (matching `apps update`/`apps checkout` and `axi apps install`) or with `-a`/`--app`; both forms combine, and repeat either to install more than one.
|
|
1315
|
-
`--fetch-only` ensures the app is present without installing it on any site.
|
|
1322
|
+
`--fetch-only` ensures the app is present without installing it on any site; it restarts nothing, because no site uses the app until it is installed, and that install reloads the bench.
|
|
1316
1323
|
**Compatibility and required apps.** Before anything is fetched, install reads what each app declares at the exact ref that will land: its Frappe range in `pyproject.toml` (`[tool.bench.frappe-dependencies]`, for example `frappe = ">=15.0.0,<17.0.0"`) and its `required_apps` in `<app>/hooks.py`.
|
|
1317
1324
|
An app already on the bench is read from that copy; any other app is read from its repository on the host, so nothing reaches the instance until the check passes.
|
|
1318
1325
|
Each range is compared with the version on the bench in bench's own dialect (semantic_version's `SimpleSpec`, so `>=16.0.0` does not accept a `16.0.0-dev` Frappe), and a range bench cannot parse (a space-separated `">=15.0.0 <16.0.0"`) is refused, because bench stops on it too.
|
|
@@ -1337,6 +1344,11 @@ A bench that was not running is left alone.
|
|
|
1337
1344
|
|
|
1338
1345
|
**`apps update`** - the canonical app-update path (what the deprecated `cwcli update` now delegates to). Updating the `frappe` framework app (or `erpnext`) is a **core update**: only the core app you name is reset to its remote branch (`apps update <p> frappe` never touches erpnext) (`git fetch <remote> <branch>` then `git reset --hard <remote>/<branch>`, for the app's own remote and checked-out branch, never bench's bench-wide `bench update --reset`, which hard-reset every app on the bench), every site's stale `locks` folder is cleared first and listed (a site whose migrate lock is held by a running migrate refuses the update before anything runs, with or without the preflight), the bench's requirements are reinstalled, then every affected site migrates under the same per-site maintenance lifecycle as any other app; other apps use the normal git-pull + migrate flow. **Every update reinstalls the bench's Python requirements before any site migrates:** after the pull, cwcli runs `bench setup requirements --python` (a core update runs the full `bench setup requirements`) for every app on the bench, not only the updated one, because a package the new code needs can come from another app - a frappe that gained `pyarrow` fails the migrate of a site whose update named only a custom app with `ModuleNotFoundError`. A failed or unknown requirements step migrates no site and exits non-zero; the report's `requirements` field says `ok`, `failed`, `unknown`, or `skipped`. `--skip-requirements` opts out: the step does not run, the output says it was skipped, and the run is not failed for it. After the migrations finish and maintenance mode is lifted, it runs the same **resynchronise** step as `apps install`, so a `git pull` cannot leave the bench's web, scheduler, and workers on the code that was there before it; every migrated site must answer Frappe before the run reports success. `--site` narrows which affected sites are migrated; if none of the named site(s) actually have the app installed, the command refuses and exits non-zero rather than silently migrating nothing (a genuine typo/mismatch guard - a bench with no affected sites at all still exits zero). It accepts the same migration flags as the [deprecated `update` command](#update---update-apps-and-migrate) (`--clear-cache`, `--clear-website-cache`, `--build`, `--skip-maintenance`, `--skip-requirements`, `--no-recache`). A core update honours `--site` and those flags like any other app, and always rebuilds assets.
|
|
1339
1346
|
Because the core update never runs bench's own bench-wide update, nothing is set in `sites/common_site_config.json`: a site that fails to migrate is named as such (`failed_migrations`), its maintenance mode is cleared by cwcli's `finally`, and the summary states the bench state - which sites migrated, which did not and why, and whether any site is still in maintenance.
|
|
1347
|
+
|
|
1348
|
+
A site that cannot be opened (a rejected database login, a broken site config) is never migrated and is always listed with its cause.
|
|
1349
|
+
It fails the run (exit 1) when it is known to have an updated app (the cache records the app on it, the app is `frappe`, or you named the site with `--site`).
|
|
1350
|
+
Otherwise it is unrelated to the update as far as cwcli can tell, so the run succeeds and reports `warned` ("finished with warnings" in the CLI and the web UI's job page), with the site in `unreadable_sites` but not in `unreadable_with_app`.
|
|
1351
|
+
|
|
1340
1352
|
`--force` is an opt-in, **destructive** recovery for a conflicting update (updating `frappe` gives it a different meaning, described under [the data-loss guard](#apps---manage-frappe-apps) below): if an app's `git pull` hits a **conflict** (local changes that would be overwritten, or a conflicted merge), it hard-resets that app to its remote tracking branch (`git fetch` then `git reset --hard @{u}`), discarding the local changes, so the update completes instead of failing. It fires **only on a conflict** - a clean update is untouched, and a pull that failed for another reason (network, auth) is left as the failure it is rather than having work discarded. Without `--force`, a conflict fails safely and discards nothing. Every force-reset app is reported (`force_reset_apps`) and a warning is printed at the reset. `--force` does not delete untracked files (it never runs `git clean`), matching `apps checkout --reset`. `--force` also clears a git **"dubious ownership"** refusal before pulling: when an app's repository is owned by a different user than the container runs as - common on a shared-mode or migrated instance whose app sources are owned by a pre-migration uid - it re-owns the repository to the container user so the pull proceeds, rather than surfacing a raw git ownership error. A `cwcli start`/`cwcli restart` self-heals the same ownership so a plain `apps update` works too; `--force` fixes it inline without a restart.
|
|
1341
1353
|
**The `frappe` preflight.** A core update resets the core app's git checkout and reinstalls the bench's requirements before any site migrates, so a git problem (a branch the remote lacks, an unreachable remote, a detached HEAD) or a code requirement the bench cannot meet would otherwise surface mid-run.
|
|
1342
1354
|
Updating `frappe` therefore runs a preflight first that predicts those failures in seconds, by evaluating bench's own rules against the same state bench reads.
|
|
@@ -1764,7 +1776,7 @@ cwcli backups key export --to FILE | import --from FILE [--replace]
|
|
|
1764
1776
|
- A move needs `--yes`, and drops each source only after its copy answered its checks, through the same backup gate `cwcli rm-site` uses.
|
|
1765
1777
|
- Retention keeps a site's newest verified set always, keeps safety sets (`before-*` reasons) for 14 days with at most 5 per site, and keeps the newest set of each of the last 7 days and 4 weeks (S3: 7 days, 4 weeks, 12 months). Change these with `cwcli backups settings`.
|
|
1766
1778
|
- `prune`, the scheduled prune, and the S3 prune never delete an unverified set. An unverified set takes no retention slot and stays until you delete it with `cwcli backups delete`.
|
|
1767
|
-
- Apart from the daily backup you can switch on with `cwcli backups settings --schedule on`, cwcli takes an automatic backup in
|
|
1779
|
+
- Apart from the daily backup you can switch on with `cwcli backups settings --schedule on`, cwcli takes an automatic backup in two cases only: a core (frappe or erpnext) update started from the web UI or a schedule first takes a verified `before-core-update` set of every site on the bench, and stops before changing anything if one does not verify; and the web UI's Remove app first takes a verified `before-app-remove` set of the site unless its backup checkbox is unticked, removing nothing if that set does not verify. `cwcli rm`, `rm-site`, and `rm-bench` also move their removal backups into the store as `before-removal` sets.
|
|
1768
1780
|
|
|
1769
1781
|
```bash
|
|
1770
1782
|
# Take a verified set of the default site, then list the store
|
|
@@ -1963,7 +1975,7 @@ Copying the downloaded backup into the container streams through a bounded pipe
|
|
|
1963
1975
|
- **NAT traversal** - Works behind firewalls and corporate networks
|
|
1964
1976
|
- **No cloud intermediary** - Direct peer-to-peer connections
|
|
1965
1977
|
- **Cross-platform** - Works on macOS, Linux, and Windows
|
|
1966
|
-
- **Automatic setup** - sendme binary
|
|
1978
|
+
- **Automatic setup** - cwcli pins sendme v0.37.1: the first send or receive, from the command line or the web UI, downloads that exact release into `~/.local/bin` of the account that runs it, checking the archive and the binary against the SHA-256 values cwcli ships; every send or receive copies the installed binary into a fresh private directory (under `$XDG_RUNTIME_DIR`, else the system temp dir, else `~/.cache/cwcli/sendme` when your home is not group- or world-writable, whichever first lets you execute a file), hashing the bytes as it copies them, and runs that copy only when they match, so the bytes that run are the bytes that were checked (known limit: where none of those directories allows execution, for example all mounted `noexec`, cwcli runs the installed binary right after hashing it and warns that it could be swapped between that check and the run), and an installed copy that does not match is replaced by the pinned release first (on a platform cwcli pins no build for, it uses the sendme on PATH as it is, unchecked, and never installs one; on a shared install the web UI runs as the service account, so it keeps its own copy in that account's home); `cwcli doctor` reports whether your copy and the web UI's match, and names the manual install command, with its checksum step, if the download fails
|
|
1967
1979
|
- **Multiple receivers** - Same ticket can be used by multiple machines
|
|
1968
1980
|
|
|
1969
1981
|
**Use Cases:**
|
|
@@ -2176,16 +2188,31 @@ hint to run `cwcli start` to bring it under cwcli's supervisor. In this mode the
|
|
|
2176
2188
|
per-process supervisord `state` is unavailable (there is no supervisord to ask);
|
|
2177
2189
|
`up` comes straight from `ps`. `status` only reads - it never launches supervisord.
|
|
2178
2190
|
|
|
2191
|
+
**A degraded bench names what is wrong.** `degraded` folds every check into one
|
|
2192
|
+
token, so each bench also carries `reasons`: one entry per failed check, computed
|
|
2193
|
+
from the same facts the token was (so the list is empty exactly when the bench is
|
|
2194
|
+
not degraded). Each names the check (`supervisor`, `process` or `web`), its subject
|
|
2195
|
+
(the program label, `supervisord`, or `web`), the state the probe saw (supervisord's
|
|
2196
|
+
`FATAL`/`BACKOFF`/`EXITED`/`STOPPED`, `down` for a process `ps` did not find, `no
|
|
2197
|
+
response` or `not listening` for the web probe) and one plain sentence. A dead
|
|
2198
|
+
supervisor is one reason, not one per program. `cwcli axi status` carries them as
|
|
2199
|
+
`benches[i].reasons`, and the web UI shows the same list on the instance, bench and
|
|
2200
|
+
site pages (with a restart or start button for each) and names the first reason
|
|
2201
|
+
beside `degraded` on the Instances cards and Sites rows and in the sidebar's tooltip.
|
|
2202
|
+
|
|
2179
2203
|
**Maintenance mode is called out plainly, and `status` offers to take sites out of it.**
|
|
2180
2204
|
A site stuck in maintenance mode answers HTTP 503 (`SessionStopped`) to every user with no other signal - the state a `migrate` / `apps update` killed mid-run (a closed terminal, a `kill`, an OOM kill, a reboot) or a failed `bench update` leaves behind.
|
|
2181
2205
|
`status` reads maintenance mode for every site of every bench it reports, the way Frappe answers it, not from one file:
|
|
2182
2206
|
the bench's `sites/common_site_config.json` first, with each site's own `site_config.json` overriding it;
|
|
2183
2207
|
and, when the web server is `bench serve` with a default site (`bench use`), every request is answered as that default site, so a site whose own file says `maintenance_mode: 0` still answers 503 while the default site inherits a bench-wide 1.
|
|
2184
2208
|
When something is in maintenance, `status` also asks each site over HTTP (`/api/method/ping` with its `Host`), because Frappe can keep answering from its config cache for up to a minute after a file changes.
|
|
2209
|
+
Frappe v16.61.0 and later serve a site's reads in maintenance mode and refuse only its writes (with HTTP 503 `InReadOnlyMode`) unless `allow_reads_during_maintenance` is set to 0, so such a site answers the ping with 200 either way: `status` reports it as in maintenance mode, read-only, from its config files and the installed Frappe's default.
|
|
2210
|
+
Earlier releases, v16.60.x included, answer 503 (`SessionStopped`) unless that key is set.
|
|
2185
2211
|
It prints one `MAINTENANCE MODE` fault per bench (even without `-v`) naming the affected sites, the write that holds them (the bench-wide `maintenance_mode`, with `pause_scheduler` when `bench update` set both, or a site's own flag), and who set it: cwcli records the maintenance mode it turns on, so a flag left by an interrupted cwcli `migrate` or `apps update` names that operation and its job, while a flag with no record is reported as possibly set on purpose.
|
|
2186
2212
|
On an interactive terminal `status` then asks whether to take the sites out of maintenance mode.
|
|
2187
2213
|
`--clear-maintenance` does it without asking (the way for scripts and agents; a non-TTY is never asked and the fault names this flag).
|
|
2188
2214
|
Taking them out clears the bench-wide flags with `bench set-config --global --parse <flag> 0` (resuming a scheduler paused with them) and each site's own flag with `set-maintenance-mode off`, then waits until no site answers Frappe's ping with 503 (SessionStopped) any more; `--clear-maintenance` exits 1 if a site still does.
|
|
2215
|
+
A read-only site answers that ping with 200 throughout, so the clear cannot check it: it reports `Maintenance mode cleared: <site>. Writes can take up to a minute to resume.` (the site is listed under `read_only`, not `answering`, and the clear is not `verified`), and exits 0.
|
|
2189
2216
|
A site that does not answer at all, because its web server is not running, is not waited for: cwcli reports that it could not check that site.
|
|
2190
2217
|
It is never offered, and `--clear-maintenance` refuses with exit 1, while anything that sets maintenance mode still runs on the bench: the cwcli operation that turned it on, an in-container `bench migrate`/`update`/`restore`, or a held migrate lock.
|
|
2191
2218
|
`cwcli axi status` carries the per-bench report as `maintenance` (with `down`, `bench_flags`, `owners` and `busy`) beside `maintenance_mode`, plus the `status.maintenance_mode` and `status.scheduler_paused` warnings.
|
|
@@ -2292,11 +2319,11 @@ Interrupt requests use the command's cleanup path; Detach only leaves the page,
|
|
|
2292
2319
|
On Windows a job that has not begun its cleanup five minutes after Interrupt, or has not finished it two minutes after beginning, is terminated; one that never began is marked `unknown` because its cleanup may not have run.
|
|
2293
2320
|
Jobs keeps every active job and the 100 most recent finished ones; older finished records are pruned when a new job starts.
|
|
2294
2321
|
The `self-update` job restarts the local daemon and the open page reloads after its protocol check sees the replacement.
|
|
2295
|
-
The guarded destructive verbs run as jobs too, each behind a typed confirmation of the exact name of what it destroys: remove an instance (`rm`: every site backed up first and the named volumes deletable only while the instance runs, mirroring `cwcli axi rm`, unless Force is ticked, which skips the verified backup like `cwcli rm --no-backup` after a red warning naming what is lost for good), drop a site (`rm-site`), remove a stopped bench (`rm-bench`), check out an app ref discarding local changes (`apps checkout --reset`, typed back as the app's name), and force a `frappe` update past the data-loss guard (`apps update` with Force ticked, typed back as the bench's name).
|
|
2322
|
+
The guarded destructive verbs run as jobs too, each behind a typed confirmation of the exact name of what it destroys: remove an instance (`rm`: every site backed up first and the named volumes deletable only while the instance runs, mirroring `cwcli axi rm`, unless Force is ticked, which skips the verified backup like `cwcli rm --no-backup` after a red warning naming what is lost for good), drop a site (`rm-site`), remove a stopped bench (`rm-bench`), remove an app from one site (`apps uninstall`, typed back as the app's name, offered on the site page for every installed app but `frappe`, with a verified backup of the site first unless unticked), check out an app ref discarding local changes (`apps checkout --reset`, typed back as the app's name), and force a `frappe` update past the data-loss guard (`apps update` with Force ticked, typed back as the bench's name).
|
|
2296
2323
|
A failed backup drops nothing, exactly as on the command line, and the job page shows bench's own reason.
|
|
2297
2324
|
Settings is writable for an Admin: cache on/off, forget one remembered project or clear the whole cache (confirmed first), add, remove and prune bench search paths (the prune check names any stopped instance that keeps it from pruning), auto-inspect and its interval and boot hook, the persistent credential bridge and its boot unit, a Start (or Restart) button for either daemon while its feature is enabled, with the daemon log's last line shown while it is down, tips, and the agent SessionStart hooks `cwcli axi setup` installs; every control sits beside the terminal command that does the same.
|
|
2298
2325
|
Schedules puts any of those jobs on a timetable (templates, a friendly recurrence picker with the cron underneath, one-off runs, recipes of chained steps, "after a successful job" and "when the instance starts" triggers, a week's timeline, and "Schedule this…" on every job's page); see `schedule` below.
|
|
2299
|
-
`cwcli restore` (the UI restores sets from the backup store instead), `
|
|
2326
|
+
`cwcli restore` (the UI restores sets from the backup store instead), `run`, `cwcli open`'s Docker shell (the UI opens VS Code, VS Code Insiders or Cursor only), an in-browser terminal and the shared multi-user mode are not in the UI; each needs its own decision first.
|
|
2300
2327
|
Other machines' instances are in the UI through **Remote hosts** (Settings > Remote hosts and the `remote` command below).
|
|
2301
2328
|
|
|
2302
2329
|
**Integrations (Settings > Integrations):** connections to systems outside cwcli, each off until an Admin turns it on.
|
|
@@ -2371,6 +2398,28 @@ When this machine's Docker stops answering (it refuses the connection, or three
|
|
|
2371
2398
|
A single slow answer from an overloaded Docker is not treated as an outage.
|
|
2372
2399
|
Everything recovers by itself once Docker answers again, with no daemon restart.
|
|
2373
2400
|
|
|
2401
|
+
#### Storage
|
|
2402
|
+
|
|
2403
|
+
The Storage page (sidebar, beside Backups) puts the logs around your instances next to the backup store, so what fills the disk is on one page.
|
|
2404
|
+
It shows, for every instance, the Docker container logs (each container's log driver, whether a size limit is set, and the size of its current and rotated files) and the bench and site log files inside the frappe container (`<bench>/logs` and each `<bench>/sites/<site>/logs`) (the current files and the rotated `*.log.1`, `*.log.2.gz`, ... beside them), plus the host's systemd journal usage.
|
|
2405
|
+
Four actions trim them, each behind a confirmation that spells out what goes, and each an Admin job (log data is deleted, or the compose file is edited):
|
|
2406
|
+
|
|
2407
|
+
- **Set rotation** writes `json-file` logging with `max-size` and `max-file` into every service of the instance's compose file.
|
|
2408
|
+
Running containers keep the settings they were created with, and the page says so; the rotation binds when each container is next recreated.
|
|
2409
|
+
`cwcli init` writes no rotation of its own, so a new instance's containers follow the Docker daemon's default until you set one here.
|
|
2410
|
+
- **Empty Docker logs** empties every json-file container log of the instance and removes its rotated files, through a short-lived root helper container that mounts only those log directories (never by hand under Docker's data root).
|
|
2411
|
+
Docker writes the file in append mode, so the containers keep running and nothing inside them is touched; their `docker logs` history is gone.
|
|
2412
|
+
- **Remove rotated** removes a bench's rotated log files, under `logs/` and each site's `logs/`, and keeps every current file, so a running bench loses nothing it holds open.
|
|
2413
|
+
A stopped instance's bench logs are not measured and never pruned: the page says to start it, and never starts it for you.
|
|
2414
|
+
- **Trim the journal** runs `journalctl --vacuum-size --vacuum-time` (500M and 2weeks unless you change them) when cwcli runs as root; it deletes older archived entries for the whole host.
|
|
2415
|
+
Anywhere else the card says that vacuuming needs root and cwcli does not have it, and shows the commands (`sudo journalctl --vacuum-size=500M`, `--vacuum-time=2weeks`) to copy into a terminal.
|
|
2416
|
+
|
|
2417
|
+
The journal card runs `journalctl --disk-usage` on a Linux host with systemd-journald.
|
|
2418
|
+
A container on the `journald` log driver is shown as managed by the system journal, with no size of its own.
|
|
2419
|
+
On macOS, Windows, or a Linux without systemd it says plainly that there is no host journal to manage (Docker Desktop's VM keeps its own logs).
|
|
2420
|
+
Sizes are read from the host when Docker's data root is readable and otherwise through a read-only helper container; a size cwcli could not measure is shown as not measured, never as zero.
|
|
2421
|
+
`cwcli axi storage logs` is the same report as TOON (see the agent surface below).
|
|
2422
|
+
|
|
2374
2423
|
#### Site addresses
|
|
2375
2424
|
|
|
2376
2425
|
The site page's **Open site** opens the address Frappe itself builds for the site, with the same rule as `frappe.utils.get_url`, which also builds the site's OAuth and SSO redirect URLs.
|
|
@@ -3270,6 +3319,8 @@ These are agent-only for now: there is no human `cwcli migrate`, `cwcli run-test
|
|
|
3270
3319
|
|
|
3271
3320
|
`cwcli axi setup-wizard <project> <site> [--country <country>] [--currency <currency>] [--timezone <timezone>]` headlessly completes a site's Frappe setup wizard. A fresh site - whether created by `cwcli init`/`cwcli axi init` without `--complete-setup`, or by a bare `bench new-site` outside cwcli entirely - is left in the setup-wizard state: `frappe.is_setup_complete()` is `false` and the `desktop:home_page` default stays `setup-wizard`, so a non-System-Manager desk renders with no navbar. This runs the same whitelisted RPC a person finishing the wizard in a browser triggers - `frappe.desk.page.setup_wizard.setup_wizard.setup_complete`, called via `bench execute ... --kwargs` with the args dict the wizard UI would have submitted (System Settings' country/currency/timezone/language; omitted flags fall back to `United States`/`USD`/`UTC`/`English`). It is **idempotent by Frappe's own design**: `setup_complete` checks `frappe.is_setup_complete()` first and no-ops under an advisory lock when the site is already set up, so re-running it is always safe - the report's `already_complete` field says whether it found the site already done. No user is created: `email`/`full_name`/`password` are deliberately left out of the args dict, so the `Administrator` account `cwcli init`'s `--admin-password` already provisioned is left untouched. Like the other bench-scoped verbs it takes `--bench`, has no `--yes`, and reports a stopped project as a usage error naming `cwcli start`.
|
|
3272
3321
|
|
|
3322
|
+
`cwcli axi storage logs [<project>]` reports what the logs around the instances weigh, as one TOON document: each instance's Docker container logs (per container: driver, `max_size`/`max_file`, whether a rotation is live, and the size and count of its current and rotated files, measured from the host or through a read-only root helper when the data root is not readable), the log files under each bench's `logs/` and each site's `sites/<site>/logs/` split into current and rotated bytes, the compose file's declared logging options, and the host journal (`applies`, `journalctl --disk-usage`, `privileged`, and the `sudo journalctl --vacuum-*` commands for when cwcli is not root). A stopped instance's bench logs are not measured and the report says so. Four verbs trim them, all mirroring the web UI's Storage page: `cwcli axi storage set-docker-log-rotation <project> [--max-size 10m] [--max-file 3]` writes the rotation into the compose file (it binds when a container is next recreated; the report shows which containers already carry it); `cwcli axi storage truncate-docker-logs <project> --yes` empties every json-file container log and removes the rotated ones through a root helper mounting only those directories; `cwcli axi storage prune-bench-logs <project> [--bench <sel>] --yes` removes a bench's rotated log files (its own and its sites') and keeps every current one, refusing a stopped instance (exit 1, naming `cwcli start`) rather than starting it; without `--bench`, a cached bench whose logs cannot be read is skipped with a warning; `cwcli axi storage vacuum-journal [--max-size 500M] [--max-time 2weeks] --yes` trims the host journal when cwcli runs as root and otherwise refuses (exit 1) with the `sudo journalctl` command to run. The three removals without `--yes` are usage errors naming the flag (exit 2), never prompts.
|
|
3323
|
+
|
|
3273
3324
|
`cwcli axi init` provisions a new instance, bench, and site the way `cwcli init` does, but non-interactively and as ONE terminal TOON document. It **blocks** for the full 10-20 minute run - the same block-and-emit-one-document shape as `cwcli axi apps update`, because a progress stream would break the one-TOON-document contract - narrating coarse phase labels to stderr; run `cwcli logs <project>` / `cwcli status <project>` from a second shell for live progress. Running several `axi init` calls in parallel can OOM-kill the host on a memory-constrained machine - serialize them instead. Adding a bench to an already-running instance never disturbs it or its other benches: the frappe container is never pulled, recreated, or restarted, so every already-serving bench keeps running throughout. Re-running init against a stopped instance starts its existing containers as they are, without pulling images or recreating them, so its benches keep their Python environments. If the re-run would change that instance's compose settings, such as a different `--port` on an instance still on the default port range (8000-8005), init refuses with exit 1 (`instance.settings_changed`), leaves the compose file unchanged, and names each change; remove the instance with `cwcli rm` (which backs it up) and run init again, or rerun init without the changed options. For an instance created on another `--port` or widened by `cwcli scale`, init does not compare `--port`. An instance whose frappe container has never started, such as one left by a first init that failed at `docker compose up`, has no bench to protect, so init neither refuses nor uses `--no-recreate` there: it pulls images and recreates the containers with the new options. After the bench+site is created, it starts the bench's dev services by default (the same `core.start` behind `cwcli start`/`cwcli axi start`), leaving a running bench rather than a created-but-idle one; `--no-start` creates without starting, for automation/CI, distinct from Docker container startup (stage 1 always brings the containers up regardless of this flag). A dev-services start failure degrades to a stderr warning rather than a non-zero exit, since the bench was already created. The site administrator password comes from the **`CWCLI_ADMIN_PASSWORD` environment variable (recommended)** or `--admin-password`; the flag wins if both are set, and with neither set the verb refuses with a usage error (exit 2) naming both - it never generates a password and never prompts. The env var keeps the secret off the process argv (visible in `ps`/shell history) that the flag exposes; the container-side `bench new-site` still receives it, so treat the value as one-time. The MariaDB root password takes the same shape via `CWCLI_DB_ROOT_PASSWORD` / `--db-root-password` (default: the instance's remembered password, else `123`); on a new instance it becomes MariaDB's own root password, as on `cwcli init`. The interactive decisions the human `cwcli init` prompts for become non-prompting errors: an existing bench with neither `--reuse-bench` nor `--no-reuse-bench` is a usage error (exit 2) naming both; a port conflict names `--port` (exit 1); containers that do not come up point at `cwcli status`/`cwcli logs` (exit 1); an invalid `--uid` (0, negative, or non-numeric), or a non-root user's `--uid` naming a uid other than their own, is rejected before any container work. `--uid` behaves as it does on `cwcli init` (including the root-host fallback, whose one-time warning is folded into the report's `warnings`). There is no `--auto-start` (compose `cwcli axi start` then re-run) and no `--verbose` (stdout is always TOON). `--bench` here is the NAME of the bench to create, distinct from the `--bench <index|label>` selector the other verbs use.
|
|
3274
3325
|
|
|
3275
3326
|
`--complete-setup` runs the new site's Frappe setup wizard headlessly right after creation - the same operation `cwcli axi setup-wizard` performs standalone, sharing its exact implementation - so a fresh site does not land in the unfinished setup-wizard state a non-System-Manager desk renders with no navbar in. `--country`/`--currency`/`--timezone` tune it (require `--complete-setup`; each has a sensible default when omitted) and are usage errors on their own. Its outcome rides as a `setup_wizard` block inside the SAME `InitReport` document, not a second one; a failure there is never exit `0` even though the bench and site above it were already created successfully - the `setup_wizard` block still carries what happened.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "3.9.0"
|
|
@@ -609,6 +609,9 @@ def _choice_error_message(choice: Choice) -> str:
|
|
|
609
609
|
# databases and files) and deletes the bench directory; the agent must
|
|
610
610
|
# consent. The --yes flag rides the `help:` line below.
|
|
611
611
|
return "removing this bench drops every site on it and deletes its directory"
|
|
612
|
+
if choice.kind in ("confirm_truncate_logs", "confirm_prune_logs", "confirm_vacuum_journal"):
|
|
613
|
+
# `axi storage` only. The prompt names what is deleted; --yes rides `help:`.
|
|
614
|
+
return choice.prompt
|
|
612
615
|
return f"a decision is required: {choice.prompt}"
|
|
613
616
|
|
|
614
617
|
|
|
@@ -659,6 +662,8 @@ def emit_axi_choice_as_usage_error(choice: Choice) -> None:
|
|
|
659
662
|
typer.echo(toon.kv("help", "re-run with --yes to consent to permanently dropping it"))
|
|
660
663
|
elif choice.kind == "confirm_remove_bench":
|
|
661
664
|
typer.echo(toon.kv("help", "re-run with --yes to consent to permanently removing it"))
|
|
665
|
+
elif choice.kind in ("confirm_truncate_logs", "confirm_prune_logs", "confirm_vacuum_journal"):
|
|
666
|
+
typer.echo(toon.kv("help", "re-run with --yes to consent"))
|
|
662
667
|
elif choice.kind == "confirm_reuse_bench":
|
|
663
668
|
typer.echo(
|
|
664
669
|
toon.kv(
|
|
@@ -956,7 +961,7 @@ def axi_new_site(
|
|
|
956
961
|
|
|
957
962
|
_cache.recache_project(project, bench_path=result.data.bench_path, warnings=[])
|
|
958
963
|
emit_result(result.data, warnings=result.warnings)
|
|
959
|
-
raise typer.Exit(0)
|
|
964
|
+
raise typer.Exit(0 if result.data.ok else 1)
|
|
960
965
|
|
|
961
966
|
|
|
962
967
|
# ----------------------------------------------------------------------------- new-bench
|
|
@@ -3221,7 +3226,9 @@ def axi_init(
|
|
|
3221
3226
|
|
|
3222
3227
|
# Never exit 0 for a failed explicit request: --complete-setup was asked for,
|
|
3223
3228
|
# so its own failure must be visible in the exit code, not just the payload.
|
|
3224
|
-
overall_ok =
|
|
3229
|
+
overall_ok = (
|
|
3230
|
+
bench_result.status in (CoreStatus.OK, CoreStatus.WARNING) and report.ok and setup_wizard_ok
|
|
3231
|
+
)
|
|
3225
3232
|
raise typer.Exit(0 if overall_ok else 1)
|
|
3226
3233
|
|
|
3227
3234
|
|
|
@@ -3718,3 +3725,144 @@ def axi_setup() -> None:
|
|
|
3718
3725
|
)
|
|
3719
3726
|
typer.echo("\n".join(lines))
|
|
3720
3727
|
raise typer.Exit(0)
|
|
3728
|
+
|
|
3729
|
+
|
|
3730
|
+
# --------------------------------------------------------------------------------- storage
|
|
3731
|
+
|
|
3732
|
+
storage_app = AxiTyper(
|
|
3733
|
+
help="Log storage around the instances: Docker container logs, bench logs, the host journal."
|
|
3734
|
+
)
|
|
3735
|
+
app.add_typer(storage_app, name="storage")
|
|
3736
|
+
|
|
3737
|
+
|
|
3738
|
+
def _emit_storage_result(result) -> None:
|
|
3739
|
+
"""One TOON document for a storage verb; a choice fork is a usage error naming its flag."""
|
|
3740
|
+
if result.status is CoreStatus.NEEDS_CHOICE:
|
|
3741
|
+
assert result.choice is not None # NEEDS_CHOICE always carries a Choice
|
|
3742
|
+
emit_axi_choice_as_usage_error(result.choice)
|
|
3743
|
+
raise typer.Exit(2)
|
|
3744
|
+
emit_result(result.data or {}, warnings=result.warnings)
|
|
3745
|
+
raise typer.Exit(0)
|
|
3746
|
+
|
|
3747
|
+
|
|
3748
|
+
@storage_app.command("logs")
|
|
3749
|
+
def axi_storage_logs(
|
|
3750
|
+
project: str = typer.Argument(None, help="One instance; omit for every instance."),
|
|
3751
|
+
) -> None:
|
|
3752
|
+
"""What the logs weigh, as TOON: each instance's Docker container logs (driver,
|
|
3753
|
+
rotation, size), its bench log files (current vs rotated), and the host journal.
|
|
3754
|
+
|
|
3755
|
+
A read: the only container it may start is a short-lived read-only helper that
|
|
3756
|
+
measures the Docker log files when the daemon's data root is not readable from
|
|
3757
|
+
here. A stopped instance's bench logs are not measured (its container is down),
|
|
3758
|
+
and the report says so.
|
|
3759
|
+
"""
|
|
3760
|
+
from ..core import log_storage as core_log_storage
|
|
3761
|
+
|
|
3762
|
+
try:
|
|
3763
|
+
result = core_log_storage.report(project)
|
|
3764
|
+
except CwcliError as error:
|
|
3765
|
+
emit_axi_error(error)
|
|
3766
|
+
raise typer.Exit(exit_for(error.kind)) from None
|
|
3767
|
+
assert result.data is not None
|
|
3768
|
+
emit_result(core_log_storage.to_dict(result.data), warnings=result.warnings)
|
|
3769
|
+
raise typer.Exit(0)
|
|
3770
|
+
|
|
3771
|
+
|
|
3772
|
+
@storage_app.command("truncate-docker-logs")
|
|
3773
|
+
def axi_storage_truncate_docker_logs(
|
|
3774
|
+
project: str = typer.Argument(..., help="The instance whose container logs to empty."),
|
|
3775
|
+
yes: bool = typer.Option(
|
|
3776
|
+
False, "--yes", help="REQUIRED consent: the containers' `docker logs` history is lost."
|
|
3777
|
+
),
|
|
3778
|
+
) -> None:
|
|
3779
|
+
"""Empty every json-file container log of the instance and remove its rotated files.
|
|
3780
|
+
|
|
3781
|
+
The daemon writes the log file in append mode, so emptying it is safe while the
|
|
3782
|
+
containers run; nothing inside a container is touched. Without ``--yes`` this is a
|
|
3783
|
+
usage error naming the flag (exit 2), never a prompt.
|
|
3784
|
+
"""
|
|
3785
|
+
from ..core import log_storage as core_log_storage
|
|
3786
|
+
|
|
3787
|
+
try:
|
|
3788
|
+
result = core_log_storage.truncate_docker_logs(project, consent=yes)
|
|
3789
|
+
except CwcliError as error:
|
|
3790
|
+
emit_axi_error(error)
|
|
3791
|
+
raise typer.Exit(exit_for(error.kind)) from None
|
|
3792
|
+
_emit_storage_result(result)
|
|
3793
|
+
|
|
3794
|
+
|
|
3795
|
+
@storage_app.command("set-docker-log-rotation")
|
|
3796
|
+
def axi_storage_set_docker_log_rotation(
|
|
3797
|
+
project: str = typer.Argument(..., help="The instance whose compose file to update."),
|
|
3798
|
+
max_size: str = typer.Option("10m", "--max-size", help="Rotate each log at this size."),
|
|
3799
|
+
max_file: int = typer.Option(3, "--max-file", help="How many rotated files to keep."),
|
|
3800
|
+
) -> None:
|
|
3801
|
+
"""Write json-file log rotation (max-size, max-file) into every service of the
|
|
3802
|
+
instance's compose file.
|
|
3803
|
+
|
|
3804
|
+
Running containers keep the log settings they were created with; the rotation
|
|
3805
|
+
binds when each container is next recreated. The report's ``rotation`` column
|
|
3806
|
+
shows which containers already have it live.
|
|
3807
|
+
"""
|
|
3808
|
+
from ..core import log_storage as core_log_storage
|
|
3809
|
+
|
|
3810
|
+
try:
|
|
3811
|
+
result = core_log_storage.set_docker_log_rotation(
|
|
3812
|
+
project, max_size=max_size, max_file=max_file
|
|
3813
|
+
)
|
|
3814
|
+
except CwcliError as error:
|
|
3815
|
+
emit_axi_error(error)
|
|
3816
|
+
raise typer.Exit(exit_for(error.kind)) from None
|
|
3817
|
+
_emit_storage_result(result)
|
|
3818
|
+
|
|
3819
|
+
|
|
3820
|
+
@storage_app.command("prune-bench-logs")
|
|
3821
|
+
def axi_storage_prune_bench_logs(
|
|
3822
|
+
project: str = typer.Argument(..., help="The instance whose bench logs to prune."),
|
|
3823
|
+
bench: str = typer.Option(
|
|
3824
|
+
None, "--bench", help="Which bench: numeric index or label. Omit for every bench."
|
|
3825
|
+
),
|
|
3826
|
+
yes: bool = typer.Option(False, "--yes", help="REQUIRED consent to remove the rotated files."),
|
|
3827
|
+
) -> None:
|
|
3828
|
+
"""Remove the rotated log files (``*.log.1``, ``*.log.2.gz``, ...) under a bench's
|
|
3829
|
+
``logs/`` and each of its ``sites/<site>/logs/``; every current log file is kept, so a running bench loses nothing it holds
|
|
3830
|
+
open. A stopped instance is refused (exit 1) naming ``cwcli start``, never started.
|
|
3831
|
+
Without ``--yes`` this is a usage error naming the flag (exit 2).
|
|
3832
|
+
"""
|
|
3833
|
+
from ..core import log_storage as core_log_storage
|
|
3834
|
+
|
|
3835
|
+
try:
|
|
3836
|
+
result = core_log_storage.prune_bench_logs(project, bench=bench, consent=yes)
|
|
3837
|
+
except CwcliError as error:
|
|
3838
|
+
emit_axi_error(error)
|
|
3839
|
+
raise typer.Exit(exit_for(error.kind)) from None
|
|
3840
|
+
_emit_storage_result(result)
|
|
3841
|
+
|
|
3842
|
+
|
|
3843
|
+
@storage_app.command("vacuum-journal")
|
|
3844
|
+
def axi_storage_vacuum_journal(
|
|
3845
|
+
max_size: str = typer.Option(
|
|
3846
|
+
"500M", "--max-size", help="Keep at most this much journal (500M, 2G, ...)."
|
|
3847
|
+
),
|
|
3848
|
+
max_time: str = typer.Option(
|
|
3849
|
+
"2weeks", "--max-time", help="Keep at most this much history (2weeks, 14d, ...)."
|
|
3850
|
+
),
|
|
3851
|
+
yes: bool = typer.Option(
|
|
3852
|
+
False, "--yes", help="REQUIRED consent: older archived journal entries are deleted."
|
|
3853
|
+
),
|
|
3854
|
+
) -> None:
|
|
3855
|
+
"""Trim the host's systemd journal (``journalctl --vacuum-size --vacuum-time``).
|
|
3856
|
+
|
|
3857
|
+
Root only: when cwcli does not run as root this is refused (exit 1) and the hint
|
|
3858
|
+
names the ``sudo journalctl`` command to run instead. Without ``--yes`` this is a
|
|
3859
|
+
usage error naming the flag (exit 2), never a prompt.
|
|
3860
|
+
"""
|
|
3861
|
+
from ..core import log_storage as core_log_storage
|
|
3862
|
+
|
|
3863
|
+
try:
|
|
3864
|
+
result = core_log_storage.vacuum_journal(max_size=max_size, max_time=max_time, consent=yes)
|
|
3865
|
+
except CwcliError as error:
|
|
3866
|
+
emit_axi_error(error)
|
|
3867
|
+
raise typer.Exit(exit_for(error.kind)) from None
|
|
3868
|
+
_emit_storage_result(result)
|
|
@@ -275,6 +275,8 @@ def _narrate_transfer(event) -> None:
|
|
|
275
275
|
stderr_console.print(f"[cyan]{event.message}[/cyan]")
|
|
276
276
|
elif kind == "Received":
|
|
277
277
|
console.print("[bold green]✓[/bold green] " + ", ".join(event.sets))
|
|
278
|
+
elif kind == "TransferBytes":
|
|
279
|
+
pass # the web UI's progress bar; a line per reading would flood a terminal
|
|
278
280
|
else:
|
|
279
281
|
_narrate(event)
|
|
280
282
|
|
|
@@ -59,9 +59,11 @@ _SPINNER_GROUP = {
|
|
|
59
59
|
"bench_init": "bench_init",
|
|
60
60
|
"configure_bench": "configure_bench",
|
|
61
61
|
"new_site": "new_site",
|
|
62
|
+
"db_access": "new_site",
|
|
62
63
|
"finalize": "finalize",
|
|
63
64
|
"erpnext_get": "erpnext",
|
|
64
65
|
"erpnext_install": "erpnext",
|
|
66
|
+
"restart_processes": "restart_processes",
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
|
|
@@ -98,6 +100,7 @@ class _InitRenderer:
|
|
|
98
100
|
"new_site": f"Creating site '{self.site_name}'",
|
|
99
101
|
"finalize": f"Finalizing setup for '{self.site_name}'",
|
|
100
102
|
"erpnext": "Installing ERPNext",
|
|
103
|
+
"restart_processes": f"Reloading bench '{self.bench_name}' processes",
|
|
101
104
|
}[group]
|
|
102
105
|
|
|
103
106
|
def close(self) -> None:
|
|
@@ -175,6 +178,7 @@ class _InitRenderer:
|
|
|
175
178
|
"init.uid_align_failed",
|
|
176
179
|
"init.uid_align_root_host",
|
|
177
180
|
"init.db_password_not_applied",
|
|
181
|
+
"site.reload_failed",
|
|
178
182
|
):
|
|
179
183
|
stderr_console.print(f"[yellow]Warning: {event.text}[/yellow]")
|
|
180
184
|
elif code in ("instance.already_running", "instance.existing") and self.verbose:
|
|
@@ -824,6 +828,11 @@ def init(
|
|
|
824
828
|
f"in {time_str}"
|
|
825
829
|
)
|
|
826
830
|
console.print(f"[dim]Bench path: {report.bench_path}[/dim]")
|
|
831
|
+
if report.processes_restarted:
|
|
832
|
+
console.print(
|
|
833
|
+
f"[dim]Restarted {', '.join(report.processes_restarted)} so the running bench "
|
|
834
|
+
"loads the new apps.[/dim]"
|
|
835
|
+
)
|
|
827
836
|
|
|
828
837
|
_refresh_cache(project, verbose, report.bench_path)
|
|
829
838
|
|
|
@@ -885,3 +894,8 @@ def init(
|
|
|
885
894
|
f"`cwcli run {project} --site {report.site_name} set-admin-password "
|
|
886
895
|
"<new-password>`.[/dim]"
|
|
887
896
|
)
|
|
897
|
+
|
|
898
|
+
# The site exists either way; a reload cwcli could not complete or verify is
|
|
899
|
+
# a failed step, so automation must not read it as success.
|
|
900
|
+
if not report.ok:
|
|
901
|
+
raise typer.Exit(code=1)
|