caffeinated-whale-cli 3.7.0__tar.gz → 3.8.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.7.0/README.md → caffeinated_whale_cli-3.8.0/PKG-INFO +79 -4
- caffeinated_whale_cli-3.7.0/PKG-INFO → caffeinated_whale_cli-3.8.0/README.md +38 -45
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/pyproject.toml +5 -2
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/__init__.py +1 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/axi.py +2 -2
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/config.py +8 -10
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/init.py +4 -5
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/new_bench.py +17 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/serve.py +13 -3
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/status.py +14 -2
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/app_catalog.py +5 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/app_deps.py +130 -30
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/apps.py +51 -22
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/auto_inspect.py +61 -10
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/docker.py +172 -92
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/doctor.py +17 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/init.py +41 -38
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/inspect.py +6 -8
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/new_bench.py +5 -1
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/new_site.py +31 -12
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/rm.py +54 -9
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/self_update.py +2 -1
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/setup.py +18 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/status.py +9 -4
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/jobs.py +11 -16
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/startup.py +285 -59
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Advisories-8RIVvbEM.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Advisories-BmT8oQfh.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/AppNameCell-T5yTpJS_.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/AppNameCell-B1rmwEVF.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Apps-D62h5KGN.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Apps-Dcw4ZQiF.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Backups-nWhVDOjg.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Backups-COF5nXgk.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Bench-BuSJ6bIs.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Bench-DyRSgptU.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Breadcrumbs.vue_vue_type_script_setup_true_lang-DcP1mnTc.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Breadcrumbs.vue_vue_type_script_setup_true_lang-DjSKQeOY.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/FollowPane-Bkn582fa.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/FollowPane-BRuO-biQ.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Instance-BayYhh_a.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Instance-DiYaGfOA.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Instances-Bd-qQu00.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Instances-ClZeUBnc.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Job-BYIH7Rp8.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Job-Dq8lo9yT.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/JobState-BUjTqh1j.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/JobState-C_7qvU8N.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Jobs-CX6MSlBD.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Jobs-BgVEdmxi.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/ListRows.vue_vue_type_script_setup_true_lang-Cg8R_3zW.js → 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 +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/MaintenanceAlert-B4MRN42x.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/MaintenanceAlert-DqFT6z9a.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/PageHead--9AlqJjw.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/PageHead-p47Rxiwi.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/PageHeader.vue_vue_type_script_setup_true_lang-COKQqRho.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/PageHeader.vue_vue_type_script_setup_true_lang-Bi30PPrw.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/PerformancePanel-DYSWFcx1.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/PerformancePanel-DZeEuIqh.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/RemoteHostBadge-CAGEU_an.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/RemoteHostBadge-7hTGaukh.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Schedules-Bxvm1y_i.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Schedules-Btf72D4d.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Site-BxDY0kWk.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Site-CGpOIcRr.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/Sites-DQwpr9rz.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Sites-CfAww7bp.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/TabButtons.vue_vue_type_script_setup_true_lang-BliWFnWq.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/TabButtons.vue_vue_type_script_setup_true_lang-DzaPGA5w.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/TimeSeries-BrVhoWDB.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/TimeSeries-DUCEf3GZ.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/UpdatePill-ClNJlH_y.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/UpdatePill-ChMXZ5uW.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/index-zXyVnhY-.css → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/index-JnUfx8-w.css +1 -1
- caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/index-TTAPNjEG.js +39 -0
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/set-menu-BPlc9fjT.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/set-menu-BUx20_jn.js +1 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/tabs-CeZNoJQO.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/tabs-BZusINW8.js +1 -1
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/index.html +2 -2
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli.egg-info/SOURCES.txt +28 -28
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/__init__.py +0 -1
- caffeinated_whale_cli-3.7.0/src/caffeinated_whale_cli/webui/dist/assets/index-DJGtLAcx.js +0 -39
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/LICENSE +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/setup.cfg +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/__main__.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/bridge.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/__init__.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/admin.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/apps.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/backup.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/backups.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/db_access.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/deps_ui.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/dev_mode.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/doctor.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/inspect.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/integrations.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/label.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/list.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/logs.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/new_site.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/open.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/remote.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/restart.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/restore.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/rm.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/rm_bench.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/rm_site.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/run.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/scale.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/schedule.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/self_update.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/setup.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/start.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/stop.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/ui.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/unlock.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/update.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/utils.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/where.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/__init__.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/accounts.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/advisories.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/backup.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/backup_crypto.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/backup_drill.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/backup_store.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/bench_ops.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/bench_read.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/cloudflare.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/community.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/config.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/cred_bridge.py +2 -2
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/credbridge.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/daemon_recovery.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/db_access.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/db_password.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/dev_mode.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/directory.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/editors.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/envelope.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/errors.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/exec_stream.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/failure_causes.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/fleet.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/git_refs.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/hosts.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/integrations.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/label.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/ldap_client.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/list.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/logs.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/maintenance.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/metrics.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/npm.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/open.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/protocol.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/publish.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/remote_access.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/resolvers.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/restart.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/restore.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/rm_bench.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/rm_site.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/run.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/s3.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/scale.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/schedules.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/site_icons.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/site_logs.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/start.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/stop.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/supervision.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/transfer.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/unlock.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/update.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/update_preflight.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/updates.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/url.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/version.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/webapi.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/where.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/main.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/update_notice.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/__init__.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/agent_hooks.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/auto_inspect.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/bench_labels.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/bench_sites.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/cache.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/completion_utils.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/config_utils.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/console.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/cred_daemon.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/daemon_identity.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/db_utils.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/docker_utils.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/port_utils.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/sendme_utils.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/shared_home.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/signals.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/tips.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/toon.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/vscode_utils.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/__init__.py +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/Inter-Italic.var-BGHziHgI.woff2 +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/Inter.var-C9xDBOS3.woff2 +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/ListRows-CejsiiPF.css +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/code-insiders--L5huIRx.svg +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/code-ofeWxTsy.svg +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/cursor-jGcLH-b0.svg +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-cyrillic-ext-opsz-normal-CfYZpDVp.woff2 +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-cyrillic-opsz-normal-BFQXbQ-f.woff2 +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-greek-ext-opsz-normal-BmPQvyvo.woff2 +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-greek-opsz-normal-BM0NlUE_.woff2 +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-latin-ext-opsz-normal-DpK-iCPk.woff2 +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-latin-opsz-normal-BwkfbSeq.woff2 +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-vietnamese-opsz-normal-Ci9T9ieq.woff2 +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-cyrillic-ext-wght-normal-EocZY2iu.woff2 +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/opsz-DreOFYE_.css +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/csp.json +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/logo-whale.png +0 -0
- {caffeinated_whale_cli-3.7.0 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/theme-boot.js +0 -0
|
@@ -1,3 +1,44 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: caffeinated-whale-cli
|
|
3
|
+
Version: 3.8.0
|
|
4
|
+
Summary: A CLI tool to help manage Frappe Docker instances.
|
|
5
|
+
Author-email: Christopher McKay <mckay.christopher73@outlook.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/karotkriss/caffeinated-whale-cli
|
|
8
|
+
Project-URL: Issues, https://github.com/karotkriss/caffeinated-whale-cli/issues
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Topic :: System :: Systems Administration
|
|
14
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Environment :: Console
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: docker>=7.1.0
|
|
21
|
+
Requires-Dist: typer<0.29,>=0.16.0
|
|
22
|
+
Requires-Dist: click>=8.0.0
|
|
23
|
+
Requires-Dist: rich>=14.0.0
|
|
24
|
+
Requires-Dist: requests>=2.26.0
|
|
25
|
+
Requires-Dist: questionary>=2.1.0
|
|
26
|
+
Requires-Dist: toml>=0.10.2
|
|
27
|
+
Requires-Dist: peewee>=3.17.0
|
|
28
|
+
Requires-Dist: packaging>=24.0
|
|
29
|
+
Requires-Dist: cryptography>=42
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: black>=25.1.0; extra == "dev"
|
|
32
|
+
Requires-Dist: ruff>=0.8.0; extra == "dev"
|
|
33
|
+
Requires-Dist: mypy>=1.13.0; extra == "dev"
|
|
34
|
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
35
|
+
Requires-Dist: pytest-cov>=6.0.0; extra == "dev"
|
|
36
|
+
Requires-Dist: types-requests>=2.33.0.20260518; extra == "dev"
|
|
37
|
+
Requires-Dist: types-toml>=0.10.8.20260518; extra == "dev"
|
|
38
|
+
Provides-Extra: e2e
|
|
39
|
+
Requires-Dist: pexpect>=4.9.0; extra == "e2e"
|
|
40
|
+
Dynamic: license-file
|
|
41
|
+
|
|
1
42
|
# Caffeinated Whale CLI
|
|
2
43
|
|
|
3
44
|
A command-line interface (CLI) for managing Frappe/ERPNext Docker instances during local development.
|
|
@@ -228,7 +269,7 @@ cwcli init [OPTIONS] [PROJECT_NAME]
|
|
|
228
269
|
| `--auto-start` | Automatically start containers if not running |
|
|
229
270
|
| `--start` / `--no-start` | After creating the bench+site, start its dev services (supervisord over `bench start`) so init leaves a running dev environment (default: `--start`). `--no-start` creates without starting, for automation/CI. Distinct from `--auto-start`, which only controls Docker container startup |
|
|
230
271
|
| `--reuse-bench` / `--no-reuse-bench` | Pre-answer the existing-bench question non-interactively: `--reuse-bench` reuses the bench and skips `bench init`; `--no-reuse-bench` requires a fresh `--bench` name and errors if it already exists. Default: ask interactively (a non-TTY without either flag refuses). Distinct from `--auto-start`, which controls container startup |
|
|
231
|
-
| `--uid INTEGER` | Override the uid/gid the container's `frappe` user is aligned to, instead of the host's own uid/gid. Mainly for a root-uid host (e.g. a CI runner running as uid 0), where a root host already falls back to a safe default automatically (see step 7 below); pass `--uid` to choose a specific uid instead. Must be a positive, non-root integer (`--uid 0`, negatives,
|
|
272
|
+
| `--uid INTEGER` | Override the uid/gid the container's `frappe` user is aligned to, instead of the host's own uid/gid. Mainly for a root-uid host (e.g. a CI runner running as uid 0), where a root host already falls back to a safe default automatically (see step 7 below); as root, pass `--uid` to choose a specific uid instead. Must be a positive, non-root integer, and a non-root user may pass only their own uid (`--uid 0`, negatives, non-numeric values, and a non-root user's foreign uid are rejected with a usage error before any container or file work). Applies only to this init invocation, including its end-of-init auto-start; it is never persisted, so later `cwcli start`/`restart` do not take it |
|
|
232
273
|
| `-v`, `--verbose` | Show verbose output with streaming command execution |
|
|
233
274
|
|
|
234
275
|
**What It Does:**
|
|
@@ -239,7 +280,7 @@ cwcli init [OPTIONS] [PROJECT_NAME]
|
|
|
239
280
|
4. Binds the bench workspace to a host `~/.cwcli/projects/{project_name}/data/` directory at `--bench-parent` inside the container (default `/workspace`), so bench files stay directly accessible on the host and survive container recreation
|
|
240
281
|
5. Resolves the `frappe/bench` image tag to pin (never uses `:latest`): `--bench-image-tag` is used verbatim and skips the lookup; otherwise a short-lived on-disk cache serves repeated inits and only a cache miss queries Docker Hub for the latest stable tag
|
|
241
282
|
6. Pulls Docker images and starts containers
|
|
242
|
-
7. On hosts that expose uid/gid information, aligns the container's `frappe` user to the host user so bench files written to the mounted workspace stay host-owned and removable by `cwcli rm` (no-op when the ids already match; platforms without `os.getuid`, such as Windows, cleanly skip alignment because Docker Desktop handles bind-mount ownership; a failed attempted remap degrades to a warning and bench creation still proceeds).
|
|
283
|
+
7. On hosts that expose uid/gid information, aligns the container's `frappe` user to the host user so bench files written to the mounted workspace stay host-owned and removable by `cwcli rm` (no-op when the ids already match; platforms without `os.getuid`, such as Windows, cleanly skip alignment because Docker Desktop handles bind-mount ownership; a failed attempted remap degrades to a warning and bench creation still proceeds). The `frappe` user is **never** given a uid that another account in the image already holds: not 0 on a **root host** (uid 0, a common CI-runner shape), and not a system account's uid such as `systemd-network`'s 998, which is where a shared install's service account or a runner's system user can land. Either would give bench that account's home and drop its `PATH` (`bench init` fails with exit 127, and the workspace fills with files owned by a system account), so cwcli uses the image's default uid (1000) instead, makes the workspace directory owned by it (on a non-root host it also gives that one directory group write for your own group, so you keep write access to it), and says so once in a warning. As root, pass `--uid <n>` to align to a specific uid instead; a uid an image account holds falls back to 1000 even then. When the bench files are owned by a uid other than the user running cwcli (a fallback on a non-root host), `cwcli rm` deletes the project directory through a short-lived root container (see [Running as root or in CI](#running-as-root-or-in-ci))
|
|
243
284
|
8. Pins the correct Python version via `PYENV_VERSION` for the branch (installs via pyenv if missing)
|
|
244
285
|
9. Pins the correct Node.js version via nvm for older branches (installs via nvm if missing)
|
|
245
286
|
10. Installs `yarn` globally for the activated Node.js version (older branches only)
|
|
@@ -421,6 +462,7 @@ cwcli new-bench [OPTIONS] PROJECT_NAME BENCH_NAME
|
|
|
421
462
|
| `--frappe-url TEXT` | A Frappe fork to build from (private forks use the credential bridge) |
|
|
422
463
|
| `--erpnext` | Install ERPNext on the first site |
|
|
423
464
|
| `-a`, `--app TEXT` | An extra app (git URL or name) to fetch and install on the first site (repeatable) |
|
|
465
|
+
| `--app-ref APP=REF` | The branch, tag or commit one `--app` is fetched at, with APP exactly as given to `--app`; without it the plan picks the branch, and one naming no `--app` exits 2 before anything is built (repeatable) |
|
|
424
466
|
| `--with-deps` | Fetch and install the apps each `--app` requires first; the apps are checked after the bench is built, so without it an app with a missing required app is reported as failed |
|
|
425
467
|
| `--ignore-frappe-range` | Install an extra app although its declared Frappe range does not fit the new bench |
|
|
426
468
|
| `--dep-source APP=URL` | Which of the apps catalog's repositories named APP to fetch a required app from, when it holds several; a repository not in the catalog is refused (repeatable) |
|
|
@@ -2284,6 +2326,8 @@ The long-job forms cover `init`, `apps install`, `apps update`, `apps checkout`,
|
|
|
2284
2326
|
When an update's new code needs an app the bench or a site lacks, the job page offers "Fetch and install it, then retry", which runs the same update again with `--with-deps`.
|
|
2285
2327
|
The Install sheet, New site and New bench show the [compatibility and required apps](#apps---manage-frappe-apps) plan live as you pick the app, branch and sites: each app at the ref that would land, its Frappe range against the bench, and each required app with where it comes from and the install order.
|
|
2286
2328
|
Start stays disabled while something would refuse the install; the Install sheet's checkbox is the consent to fetch the required apps, New site and New bench add them to the picks with the reason shown, and a Frappe range you know is wrong can be overridden by typing the app's name.
|
|
2329
|
+
New site's app picker takes a branch, tag or commit for each picked app, in the same autocomplete field as the other ref fields: an app from the app sources is fetched at that ref, and an app the bench already holds is shown at the branch its copy sits at and, given another ref, is checked out there first - which moves it for every site on that bench, so the picker and the plan both say so before Create site runs.
|
|
2330
|
+
New bench's extra-apps picker takes a branch, tag or commit for each picked app in that same field, and the app is fetched at it (`--app-ref`).
|
|
2287
2331
|
A failed job leads with its plain cause (for example MariaDB rejecting the database root password, or git failing to authenticate) when cwcli recognizes one in the failing step's output, and otherwise says it did not and points at that output.
|
|
2288
2332
|
Interrupt requests use the command's cleanup path; Detach only leaves the page, and an active record whose process disappears becomes `unknown` instead of being reported as failed or successful.
|
|
2289
2333
|
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.
|
|
@@ -2615,6 +2659,7 @@ when the tool is signed in to none of them; a signed-out host beside a
|
|
|
2615
2659
|
signed-in one is listed with its `auth login --hostname` command.
|
|
2616
2660
|
An enabled but stopped auto-inspect or credential-bridge daemon is a `warn`
|
|
2617
2661
|
naming its start command; the web UI's Doctor view offers a Start button for it.
|
|
2662
|
+
A start-on-boot unit (or a shared install's system unit) that runs a removed cwcli, or that an older cwcli wrote without a restart limit, is a `warn` naming the unit and the command that rewrites or removes it, and so is a shared system unit only root can read, which doctor could not check (see the boot-unit note under `config`).
|
|
2618
2663
|
|
|
2619
2664
|
**Exit codes:** `0` when every check is pass/warn (a warning never blocks -
|
|
2620
2665
|
doctor is a chainable preflight gate), `1` when any check fails.
|
|
@@ -2860,7 +2905,15 @@ These verbs remain as hidden aliases with byte-identical behavior plus a one-lin
|
|
|
2860
2905
|
|
|
2861
2906
|
**Boot-unit note:** startup units installed before this change (systemd/LaunchAgent/schtasks) exec `cwcli config auto-inspect start` verbatim.
|
|
2862
2907
|
The `start` alias keeps BOTH that argv and its refuse-when-disabled guard, so an existing unit keeps working and a stale hook left behind after `disable` stays inert.
|
|
2863
|
-
|
|
2908
|
+
The auto-inspect and credential-bridge units run `/usr/bin/env cwcli` on a PATH that starts with the directory of the cwcli writing the unit (the directory of the `cwcli` script that is running, or the Python interpreter's directory when it was not started through that script), then `~/.local/bin`, `/usr/local/bin` and the system directories, then the directories on the PATH of the command that wrote it (the unit's PATH replaces the service manager's, so tools such as a snap-installed `gh` stay reachable), so a reinstall or a move between a per-user and the shared install keeps the unit working (Windows tasks keep the absolute path, because a task action does not search PATH).
|
|
2909
|
+
A systemd unit whose start keeps failing retries at most 3 times in 10 minutes and then stays failed until the next boot (or login, without lingering) or a manual start, so a removed cwcli cannot fill the journal; launchd and Task Scheduler run the unit once per login and never retry.
|
|
2910
|
+
A unit is stale when its cwcli no longer exists or when an older cwcli wrote it (no systemd restart limit, or a macOS absolute path); a unit that runs a different cwcli that still exists is left alone.
|
|
2911
|
+
`cwcli status` and `cwcli doctor` name a stale unit and the command that fixes it: `cwcli config auto-inspect enable` (or `cwcli config cred-bridge start`) rewrites it while the feature is enabled, and `disable` removes it otherwise.
|
|
2912
|
+
`enable`, `start` and `restart` rewrite a stale unit of their own daemon automatically, without starting the unit, and an old unit whose cwcli still exists rewrites itself at the next boot because the `start` it runs does the same.
|
|
2913
|
+
On a shared install, `cwcli status` and `cwcli doctor` also check the credential-bridge and scheduler system units in `/etc/systemd/system`; a stale one, or one only root can read (an older cwcli wrote it `0660` under the shared umask, so a member cannot check it), is named with `sudo cwcli setup shared`, which rewrites it in place with the restart limit (and the running cwcli when its own is gone) and makes it readable to every user (`0644`), keeping its service account, and `sudo cwcli self-update` does the same before it restarts a running one.
|
|
2914
|
+
After you upgrade a host whose boot unit is already failing (its cwcli was removed, so the unit cannot run the `start` that would rewrite it), the unit keeps failing until you fix it by hand.
|
|
2915
|
+
Run `cwcli doctor` on that host, then run the command it names: `cwcli config auto-inspect enable` or `cwcli config auto-inspect disable` for auto-inspect, and `cwcli config cred-bridge start` or `cwcli config cred-bridge disable` for the credential bridge.
|
|
2916
|
+
For a shared install's credential-bridge or scheduler system unit, run `sudo cwcli setup shared`, which is the command doctor names for those units (`cwcli self-update` repairs only a system unit that is running).
|
|
2864
2917
|
|
|
2865
2918
|
### `self-update` - Upgrade cwcli Itself
|
|
2866
2919
|
|
|
@@ -3003,6 +3056,28 @@ cwcli ls --json | jq '.[] | select(.status=="running")'
|
|
|
3003
3056
|
cwcli inspect frappe-one --json | jq '.bench_instances[0].sites'
|
|
3004
3057
|
```
|
|
3005
3058
|
|
|
3059
|
+
### Running as root or in CI
|
|
3060
|
+
|
|
3061
|
+
Bench commands run inside the container as its `frappe` user, and every file they write to the bind-mounted workspace is owned by that user's uid on the host.
|
|
3062
|
+
`cwcli init`, `start`, `restart`, `scale`, and `new-bench` align that uid to the user running cwcli, so the workspace stays owned by you and `cwcli rm` can delete it directly.
|
|
3063
|
+
In two cases that uid would break bench, so cwcli uses uid 1000 (the image's own `frappe` uid) instead, with a one-time warning from `init`:
|
|
3064
|
+
|
|
3065
|
+
- The invoking user is root (uid 0), as on a GitLab shell runner or another root CI job.
|
|
3066
|
+
- The uid already belongs to another account in the image, such as `systemd-network` (998) or `redis` (100). A shared install's `cwcli` service account and a runner's system user often have a uid in this range.
|
|
3067
|
+
|
|
3068
|
+
Both cases need no configuration.
|
|
3069
|
+
As root, you can choose the uid yourself with `cwcli init --uid <n>`; it applies to that `init` run and its end-of-init start only.
|
|
3070
|
+
A non-root user may pass only their own uid, and `init` refuses any other uid with a usage error before it creates anything.
|
|
3071
|
+
In the second case, the bench files do not belong to you, so `cwcli rm` cannot delete them as you.
|
|
3072
|
+
`cwcli rm` therefore deletes the project directory through a short-lived root container, the same way it does on a shared install.
|
|
3073
|
+
|
|
3074
|
+
**Repairing an instance an older cwcli left broken:** older releases could give `frappe` uid 0 (before 3.2.0, on a root host) or a system account's uid, so `bench` was not on its `PATH` and the bench files were owned by that account.
|
|
3075
|
+
Upgrade cwcli and run `cwcli start <project>` as the same user as before.
|
|
3076
|
+
When `frappe` is aligned to a uid other than yours (a root host or a fallback), or `start` moves `frappe` to a new uid, `start` gives `frappe` ownership of every bench it starts that another uid owns, with `chown -R`, so no file is deleted.
|
|
3077
|
+
This also repairs a bench that one `sudo cwcli start` left owned by uid 1000: the next plain `cwcli start` gives it back to you.
|
|
3078
|
+
If you remove that instance with `cwcli rm` before then, `rm` deletes those bench files through the same short-lived root container.
|
|
3079
|
+
A bench whose `bench init` never finished must still be created again with `cwcli init`.
|
|
3080
|
+
|
|
3006
3081
|
### For agents: the `cwcli axi` surface
|
|
3007
3082
|
|
|
3008
3083
|
`cwcli axi` is an agent-facing surface built for autonomous tools that drive cwcli through shell execution.
|
|
@@ -3236,7 +3311,7 @@ These are agent-only for now: there is no human `cwcli migrate`, `cwcli run-test
|
|
|
3236
3311
|
|
|
3237
3312
|
`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`.
|
|
3238
3313
|
|
|
3239
|
-
`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) 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.
|
|
3314
|
+
`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.
|
|
3240
3315
|
|
|
3241
3316
|
`--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.
|
|
3242
3317
|
|
|
@@ -1,44 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: caffeinated-whale-cli
|
|
3
|
-
Version: 3.7.0
|
|
4
|
-
Summary: A CLI tool to help manage Frappe Docker instances.
|
|
5
|
-
Author-email: Christopher McKay <mckay.christopher73@outlook.com>
|
|
6
|
-
License: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/karotkriss/caffeinated-whale-cli
|
|
8
|
-
Project-URL: Issues, https://github.com/karotkriss/caffeinated-whale-cli/issues
|
|
9
|
-
Classifier: Development Status :: 4 - Beta
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
-
Classifier: Operating System :: OS Independent
|
|
13
|
-
Classifier: Topic :: System :: Systems Administration
|
|
14
|
-
Classifier: Topic :: Software Development :: Build Tools
|
|
15
|
-
Classifier: Intended Audience :: Developers
|
|
16
|
-
Classifier: Environment :: Console
|
|
17
|
-
Requires-Python: >=3.10
|
|
18
|
-
Description-Content-Type: text/markdown
|
|
19
|
-
License-File: LICENSE
|
|
20
|
-
Requires-Dist: docker>=7.1.0
|
|
21
|
-
Requires-Dist: typer>=0.16.0
|
|
22
|
-
Requires-Dist: click>=8.0.0
|
|
23
|
-
Requires-Dist: rich>=14.0.0
|
|
24
|
-
Requires-Dist: requests>=2.26.0
|
|
25
|
-
Requires-Dist: questionary>=2.1.0
|
|
26
|
-
Requires-Dist: toml>=0.10.2
|
|
27
|
-
Requires-Dist: peewee>=3.17.0
|
|
28
|
-
Requires-Dist: packaging>=24.0
|
|
29
|
-
Requires-Dist: cryptography>=42
|
|
30
|
-
Provides-Extra: dev
|
|
31
|
-
Requires-Dist: black>=25.1.0; extra == "dev"
|
|
32
|
-
Requires-Dist: ruff>=0.8.0; extra == "dev"
|
|
33
|
-
Requires-Dist: mypy>=1.13.0; extra == "dev"
|
|
34
|
-
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
35
|
-
Requires-Dist: pytest-cov>=6.0.0; extra == "dev"
|
|
36
|
-
Requires-Dist: types-requests>=2.33.0.20260518; extra == "dev"
|
|
37
|
-
Requires-Dist: types-toml>=0.10.8.20260518; extra == "dev"
|
|
38
|
-
Provides-Extra: e2e
|
|
39
|
-
Requires-Dist: pexpect>=4.9.0; extra == "e2e"
|
|
40
|
-
Dynamic: license-file
|
|
41
|
-
|
|
42
1
|
# Caffeinated Whale CLI
|
|
43
2
|
|
|
44
3
|
A command-line interface (CLI) for managing Frappe/ERPNext Docker instances during local development.
|
|
@@ -269,7 +228,7 @@ cwcli init [OPTIONS] [PROJECT_NAME]
|
|
|
269
228
|
| `--auto-start` | Automatically start containers if not running |
|
|
270
229
|
| `--start` / `--no-start` | After creating the bench+site, start its dev services (supervisord over `bench start`) so init leaves a running dev environment (default: `--start`). `--no-start` creates without starting, for automation/CI. Distinct from `--auto-start`, which only controls Docker container startup |
|
|
271
230
|
| `--reuse-bench` / `--no-reuse-bench` | Pre-answer the existing-bench question non-interactively: `--reuse-bench` reuses the bench and skips `bench init`; `--no-reuse-bench` requires a fresh `--bench` name and errors if it already exists. Default: ask interactively (a non-TTY without either flag refuses). Distinct from `--auto-start`, which controls container startup |
|
|
272
|
-
| `--uid INTEGER` | Override the uid/gid the container's `frappe` user is aligned to, instead of the host's own uid/gid. Mainly for a root-uid host (e.g. a CI runner running as uid 0), where a root host already falls back to a safe default automatically (see step 7 below); pass `--uid` to choose a specific uid instead. Must be a positive, non-root integer (`--uid 0`, negatives,
|
|
231
|
+
| `--uid INTEGER` | Override the uid/gid the container's `frappe` user is aligned to, instead of the host's own uid/gid. Mainly for a root-uid host (e.g. a CI runner running as uid 0), where a root host already falls back to a safe default automatically (see step 7 below); as root, pass `--uid` to choose a specific uid instead. Must be a positive, non-root integer, and a non-root user may pass only their own uid (`--uid 0`, negatives, non-numeric values, and a non-root user's foreign uid are rejected with a usage error before any container or file work). Applies only to this init invocation, including its end-of-init auto-start; it is never persisted, so later `cwcli start`/`restart` do not take it |
|
|
273
232
|
| `-v`, `--verbose` | Show verbose output with streaming command execution |
|
|
274
233
|
|
|
275
234
|
**What It Does:**
|
|
@@ -280,7 +239,7 @@ cwcli init [OPTIONS] [PROJECT_NAME]
|
|
|
280
239
|
4. Binds the bench workspace to a host `~/.cwcli/projects/{project_name}/data/` directory at `--bench-parent` inside the container (default `/workspace`), so bench files stay directly accessible on the host and survive container recreation
|
|
281
240
|
5. Resolves the `frappe/bench` image tag to pin (never uses `:latest`): `--bench-image-tag` is used verbatim and skips the lookup; otherwise a short-lived on-disk cache serves repeated inits and only a cache miss queries Docker Hub for the latest stable tag
|
|
282
241
|
6. Pulls Docker images and starts containers
|
|
283
|
-
7. On hosts that expose uid/gid information, aligns the container's `frappe` user to the host user so bench files written to the mounted workspace stay host-owned and removable by `cwcli rm` (no-op when the ids already match; platforms without `os.getuid`, such as Windows, cleanly skip alignment because Docker Desktop handles bind-mount ownership; a failed attempted remap degrades to a warning and bench creation still proceeds).
|
|
242
|
+
7. On hosts that expose uid/gid information, aligns the container's `frappe` user to the host user so bench files written to the mounted workspace stay host-owned and removable by `cwcli rm` (no-op when the ids already match; platforms without `os.getuid`, such as Windows, cleanly skip alignment because Docker Desktop handles bind-mount ownership; a failed attempted remap degrades to a warning and bench creation still proceeds). The `frappe` user is **never** given a uid that another account in the image already holds: not 0 on a **root host** (uid 0, a common CI-runner shape), and not a system account's uid such as `systemd-network`'s 998, which is where a shared install's service account or a runner's system user can land. Either would give bench that account's home and drop its `PATH` (`bench init` fails with exit 127, and the workspace fills with files owned by a system account), so cwcli uses the image's default uid (1000) instead, makes the workspace directory owned by it (on a non-root host it also gives that one directory group write for your own group, so you keep write access to it), and says so once in a warning. As root, pass `--uid <n>` to align to a specific uid instead; a uid an image account holds falls back to 1000 even then. When the bench files are owned by a uid other than the user running cwcli (a fallback on a non-root host), `cwcli rm` deletes the project directory through a short-lived root container (see [Running as root or in CI](#running-as-root-or-in-ci))
|
|
284
243
|
8. Pins the correct Python version via `PYENV_VERSION` for the branch (installs via pyenv if missing)
|
|
285
244
|
9. Pins the correct Node.js version via nvm for older branches (installs via nvm if missing)
|
|
286
245
|
10. Installs `yarn` globally for the activated Node.js version (older branches only)
|
|
@@ -462,6 +421,7 @@ cwcli new-bench [OPTIONS] PROJECT_NAME BENCH_NAME
|
|
|
462
421
|
| `--frappe-url TEXT` | A Frappe fork to build from (private forks use the credential bridge) |
|
|
463
422
|
| `--erpnext` | Install ERPNext on the first site |
|
|
464
423
|
| `-a`, `--app TEXT` | An extra app (git URL or name) to fetch and install on the first site (repeatable) |
|
|
424
|
+
| `--app-ref APP=REF` | The branch, tag or commit one `--app` is fetched at, with APP exactly as given to `--app`; without it the plan picks the branch, and one naming no `--app` exits 2 before anything is built (repeatable) |
|
|
465
425
|
| `--with-deps` | Fetch and install the apps each `--app` requires first; the apps are checked after the bench is built, so without it an app with a missing required app is reported as failed |
|
|
466
426
|
| `--ignore-frappe-range` | Install an extra app although its declared Frappe range does not fit the new bench |
|
|
467
427
|
| `--dep-source APP=URL` | Which of the apps catalog's repositories named APP to fetch a required app from, when it holds several; a repository not in the catalog is refused (repeatable) |
|
|
@@ -2325,6 +2285,8 @@ The long-job forms cover `init`, `apps install`, `apps update`, `apps checkout`,
|
|
|
2325
2285
|
When an update's new code needs an app the bench or a site lacks, the job page offers "Fetch and install it, then retry", which runs the same update again with `--with-deps`.
|
|
2326
2286
|
The Install sheet, New site and New bench show the [compatibility and required apps](#apps---manage-frappe-apps) plan live as you pick the app, branch and sites: each app at the ref that would land, its Frappe range against the bench, and each required app with where it comes from and the install order.
|
|
2327
2287
|
Start stays disabled while something would refuse the install; the Install sheet's checkbox is the consent to fetch the required apps, New site and New bench add them to the picks with the reason shown, and a Frappe range you know is wrong can be overridden by typing the app's name.
|
|
2288
|
+
New site's app picker takes a branch, tag or commit for each picked app, in the same autocomplete field as the other ref fields: an app from the app sources is fetched at that ref, and an app the bench already holds is shown at the branch its copy sits at and, given another ref, is checked out there first - which moves it for every site on that bench, so the picker and the plan both say so before Create site runs.
|
|
2289
|
+
New bench's extra-apps picker takes a branch, tag or commit for each picked app in that same field, and the app is fetched at it (`--app-ref`).
|
|
2328
2290
|
A failed job leads with its plain cause (for example MariaDB rejecting the database root password, or git failing to authenticate) when cwcli recognizes one in the failing step's output, and otherwise says it did not and points at that output.
|
|
2329
2291
|
Interrupt requests use the command's cleanup path; Detach only leaves the page, and an active record whose process disappears becomes `unknown` instead of being reported as failed or successful.
|
|
2330
2292
|
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.
|
|
@@ -2656,6 +2618,7 @@ when the tool is signed in to none of them; a signed-out host beside a
|
|
|
2656
2618
|
signed-in one is listed with its `auth login --hostname` command.
|
|
2657
2619
|
An enabled but stopped auto-inspect or credential-bridge daemon is a `warn`
|
|
2658
2620
|
naming its start command; the web UI's Doctor view offers a Start button for it.
|
|
2621
|
+
A start-on-boot unit (or a shared install's system unit) that runs a removed cwcli, or that an older cwcli wrote without a restart limit, is a `warn` naming the unit and the command that rewrites or removes it, and so is a shared system unit only root can read, which doctor could not check (see the boot-unit note under `config`).
|
|
2659
2622
|
|
|
2660
2623
|
**Exit codes:** `0` when every check is pass/warn (a warning never blocks -
|
|
2661
2624
|
doctor is a chainable preflight gate), `1` when any check fails.
|
|
@@ -2901,7 +2864,15 @@ These verbs remain as hidden aliases with byte-identical behavior plus a one-lin
|
|
|
2901
2864
|
|
|
2902
2865
|
**Boot-unit note:** startup units installed before this change (systemd/LaunchAgent/schtasks) exec `cwcli config auto-inspect start` verbatim.
|
|
2903
2866
|
The `start` alias keeps BOTH that argv and its refuse-when-disabled guard, so an existing unit keeps working and a stale hook left behind after `disable` stays inert.
|
|
2904
|
-
|
|
2867
|
+
The auto-inspect and credential-bridge units run `/usr/bin/env cwcli` on a PATH that starts with the directory of the cwcli writing the unit (the directory of the `cwcli` script that is running, or the Python interpreter's directory when it was not started through that script), then `~/.local/bin`, `/usr/local/bin` and the system directories, then the directories on the PATH of the command that wrote it (the unit's PATH replaces the service manager's, so tools such as a snap-installed `gh` stay reachable), so a reinstall or a move between a per-user and the shared install keeps the unit working (Windows tasks keep the absolute path, because a task action does not search PATH).
|
|
2868
|
+
A systemd unit whose start keeps failing retries at most 3 times in 10 minutes and then stays failed until the next boot (or login, without lingering) or a manual start, so a removed cwcli cannot fill the journal; launchd and Task Scheduler run the unit once per login and never retry.
|
|
2869
|
+
A unit is stale when its cwcli no longer exists or when an older cwcli wrote it (no systemd restart limit, or a macOS absolute path); a unit that runs a different cwcli that still exists is left alone.
|
|
2870
|
+
`cwcli status` and `cwcli doctor` name a stale unit and the command that fixes it: `cwcli config auto-inspect enable` (or `cwcli config cred-bridge start`) rewrites it while the feature is enabled, and `disable` removes it otherwise.
|
|
2871
|
+
`enable`, `start` and `restart` rewrite a stale unit of their own daemon automatically, without starting the unit, and an old unit whose cwcli still exists rewrites itself at the next boot because the `start` it runs does the same.
|
|
2872
|
+
On a shared install, `cwcli status` and `cwcli doctor` also check the credential-bridge and scheduler system units in `/etc/systemd/system`; a stale one, or one only root can read (an older cwcli wrote it `0660` under the shared umask, so a member cannot check it), is named with `sudo cwcli setup shared`, which rewrites it in place with the restart limit (and the running cwcli when its own is gone) and makes it readable to every user (`0644`), keeping its service account, and `sudo cwcli self-update` does the same before it restarts a running one.
|
|
2873
|
+
After you upgrade a host whose boot unit is already failing (its cwcli was removed, so the unit cannot run the `start` that would rewrite it), the unit keeps failing until you fix it by hand.
|
|
2874
|
+
Run `cwcli doctor` on that host, then run the command it names: `cwcli config auto-inspect enable` or `cwcli config auto-inspect disable` for auto-inspect, and `cwcli config cred-bridge start` or `cwcli config cred-bridge disable` for the credential bridge.
|
|
2875
|
+
For a shared install's credential-bridge or scheduler system unit, run `sudo cwcli setup shared`, which is the command doctor names for those units (`cwcli self-update` repairs only a system unit that is running).
|
|
2905
2876
|
|
|
2906
2877
|
### `self-update` - Upgrade cwcli Itself
|
|
2907
2878
|
|
|
@@ -3044,6 +3015,28 @@ cwcli ls --json | jq '.[] | select(.status=="running")'
|
|
|
3044
3015
|
cwcli inspect frappe-one --json | jq '.bench_instances[0].sites'
|
|
3045
3016
|
```
|
|
3046
3017
|
|
|
3018
|
+
### Running as root or in CI
|
|
3019
|
+
|
|
3020
|
+
Bench commands run inside the container as its `frappe` user, and every file they write to the bind-mounted workspace is owned by that user's uid on the host.
|
|
3021
|
+
`cwcli init`, `start`, `restart`, `scale`, and `new-bench` align that uid to the user running cwcli, so the workspace stays owned by you and `cwcli rm` can delete it directly.
|
|
3022
|
+
In two cases that uid would break bench, so cwcli uses uid 1000 (the image's own `frappe` uid) instead, with a one-time warning from `init`:
|
|
3023
|
+
|
|
3024
|
+
- The invoking user is root (uid 0), as on a GitLab shell runner or another root CI job.
|
|
3025
|
+
- The uid already belongs to another account in the image, such as `systemd-network` (998) or `redis` (100). A shared install's `cwcli` service account and a runner's system user often have a uid in this range.
|
|
3026
|
+
|
|
3027
|
+
Both cases need no configuration.
|
|
3028
|
+
As root, you can choose the uid yourself with `cwcli init --uid <n>`; it applies to that `init` run and its end-of-init start only.
|
|
3029
|
+
A non-root user may pass only their own uid, and `init` refuses any other uid with a usage error before it creates anything.
|
|
3030
|
+
In the second case, the bench files do not belong to you, so `cwcli rm` cannot delete them as you.
|
|
3031
|
+
`cwcli rm` therefore deletes the project directory through a short-lived root container, the same way it does on a shared install.
|
|
3032
|
+
|
|
3033
|
+
**Repairing an instance an older cwcli left broken:** older releases could give `frappe` uid 0 (before 3.2.0, on a root host) or a system account's uid, so `bench` was not on its `PATH` and the bench files were owned by that account.
|
|
3034
|
+
Upgrade cwcli and run `cwcli start <project>` as the same user as before.
|
|
3035
|
+
When `frappe` is aligned to a uid other than yours (a root host or a fallback), or `start` moves `frappe` to a new uid, `start` gives `frappe` ownership of every bench it starts that another uid owns, with `chown -R`, so no file is deleted.
|
|
3036
|
+
This also repairs a bench that one `sudo cwcli start` left owned by uid 1000: the next plain `cwcli start` gives it back to you.
|
|
3037
|
+
If you remove that instance with `cwcli rm` before then, `rm` deletes those bench files through the same short-lived root container.
|
|
3038
|
+
A bench whose `bench init` never finished must still be created again with `cwcli init`.
|
|
3039
|
+
|
|
3047
3040
|
### For agents: the `cwcli axi` surface
|
|
3048
3041
|
|
|
3049
3042
|
`cwcli axi` is an agent-facing surface built for autonomous tools that drive cwcli through shell execution.
|
|
@@ -3277,7 +3270,7 @@ These are agent-only for now: there is no human `cwcli migrate`, `cwcli run-test
|
|
|
3277
3270
|
|
|
3278
3271
|
`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`.
|
|
3279
3272
|
|
|
3280
|
-
`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) 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.
|
|
3273
|
+
`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.
|
|
3281
3274
|
|
|
3282
3275
|
`--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.
|
|
3283
3276
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "caffeinated-whale-cli"
|
|
7
|
-
version = "3.
|
|
7
|
+
version = "3.8.0"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name = "Christopher McKay", email = "mckay.christopher73@outlook.com" },
|
|
10
10
|
]
|
|
@@ -25,7 +25,10 @@ classifiers = [
|
|
|
25
25
|
|
|
26
26
|
dependencies = [
|
|
27
27
|
"docker>=7.1.0",
|
|
28
|
-
|
|
28
|
+
# typer 0.29 replaced its Click-based parameter classes (TyperArgument has no
|
|
29
|
+
# `.type`, TyperOption no `.is_flag`), which crashes every `cwcli axi <verb>
|
|
30
|
+
# --help` that has parameters. Cap below it until cwcli is ported to that API.
|
|
31
|
+
"typer>=0.16.0,<0.29",
|
|
29
32
|
# cwcli imports click directly (commands/config.py: `config edit` -> click.edit).
|
|
30
33
|
# typer used to pull it in transitively, but typer 0.27 no longer guarantees
|
|
31
34
|
# that, so it must be declared. Floor matches typer's own click>=8.0.0 range and
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "3.8.0"
|
|
@@ -2949,7 +2949,8 @@ def axi_init(
|
|
|
2949
2949
|
"host's own uid/gid. Mainly for a root-uid host (e.g. a CI runner running as uid 0): "
|
|
2950
2950
|
"aligning to 0 would collide with the container's own root user and break bench's PATH, "
|
|
2951
2951
|
"so that case already falls back to a safe default automatically (reported in `warnings`); "
|
|
2952
|
-
"pass --uid to choose a specific uid instead. Must be a positive, non-root
|
|
2952
|
+
"as root, pass --uid to choose a specific uid instead. Must be a positive, non-root "
|
|
2953
|
+
"integer; a non-root user may pass only their own uid.",
|
|
2953
2954
|
),
|
|
2954
2955
|
complete_setup: bool = typer.Option(
|
|
2955
2956
|
False,
|
|
@@ -3092,7 +3093,6 @@ def axi_init(
|
|
|
3092
3093
|
project,
|
|
3093
3094
|
port=port,
|
|
3094
3095
|
bench_parent=bench_parent,
|
|
3095
|
-
uid=uid,
|
|
3096
3096
|
db_root_password=db_root,
|
|
3097
3097
|
on_event=_init_narrate,
|
|
3098
3098
|
)
|
|
@@ -456,7 +456,7 @@ _ACTION_LINES = {
|
|
|
456
456
|
"[green]Startup enabled. Auto-inspect will start automatically on system boot.[/green]"
|
|
457
457
|
),
|
|
458
458
|
"hook.removed": "[green]Startup configuration removed.[/green]",
|
|
459
|
-
"hook.repaired": "[dim]
|
|
459
|
+
"hook.repaired": "[dim]Rewrote the stale start-on-boot unit against this cwcli.[/dim]",
|
|
460
460
|
}
|
|
461
461
|
|
|
462
462
|
|
|
@@ -617,7 +617,7 @@ _CRED_ACTION_LINES = {
|
|
|
617
617
|
"projects.hardened": "[dim]Tightened the projects directory to owner-only (0700).[/dim]",
|
|
618
618
|
"hook.installed": "[green]Boot startup installed.[/green]",
|
|
619
619
|
"hook.removed": "[green]Boot startup removed.[/green]",
|
|
620
|
-
"hook.repaired": "[dim]
|
|
620
|
+
"hook.repaired": "[dim]Rewrote the stale start-on-boot unit against this cwcli.[/dim]",
|
|
621
621
|
"daemon.restarted": "[green]Credential bridge daemon restarted.[/green]",
|
|
622
622
|
}
|
|
623
623
|
|
|
@@ -867,14 +867,14 @@ def start_auto_inspect(
|
|
|
867
867
|
"""
|
|
868
868
|
_warn_deprecated("cwcli config auto-inspect start", "cwcli config auto-inspect enable")
|
|
869
869
|
try:
|
|
870
|
+
actions: list[str] = []
|
|
871
|
+
warnings: list[Message] = []
|
|
872
|
+
core_ai.repair_boot_hook(actions, warnings)
|
|
873
|
+
for warning in warnings:
|
|
874
|
+
console.print(f"[yellow]Warning: {warning.text}[/yellow]")
|
|
870
875
|
if auto_inspect.is_running():
|
|
871
|
-
actions: list[str] = []
|
|
872
|
-
warnings: list[Message] = []
|
|
873
|
-
core_ai.repair_boot_hook(actions, warnings)
|
|
874
876
|
console.print("[yellow]Auto-inspect background process is already running.[/yellow]")
|
|
875
877
|
console.print(f"[cyan]Process ID: {auto_inspect.get_pid()}[/cyan]")
|
|
876
|
-
for warning in warnings:
|
|
877
|
-
console.print(f"[yellow]Warning: {warning.text}[/yellow]")
|
|
878
878
|
return
|
|
879
879
|
|
|
880
880
|
config = config_utils.get_auto_inspect_config()
|
|
@@ -884,10 +884,8 @@ def start_auto_inspect(
|
|
|
884
884
|
)
|
|
885
885
|
raise typer.Exit(code=1)
|
|
886
886
|
|
|
887
|
-
|
|
887
|
+
core_ai.start()
|
|
888
888
|
console.print("[green]Auto-inspect background process started.[/green]")
|
|
889
|
-
for warning in result.warnings:
|
|
890
|
-
console.print(f"[yellow]Warning: {warning.text}[/yellow]")
|
|
891
889
|
console.print(
|
|
892
890
|
f"[cyan]Running projects will be inspected every {config['interval']} seconds.[/cyan]"
|
|
893
891
|
)
|
|
@@ -600,8 +600,9 @@ def init(
|
|
|
600
600
|
help="Override the uid/gid the container 'frappe' user is aligned to, instead of the "
|
|
601
601
|
"host's own uid/gid. Mainly for a root-uid host (e.g. a CI runner running as uid 0): "
|
|
602
602
|
"aligning to 0 would collide with the container's own root user and break bench's PATH, "
|
|
603
|
-
"so that case already falls back to a safe default automatically; pass --uid to
|
|
604
|
-
"specific uid instead. Must be a positive, non-root integer
|
|
603
|
+
"so that case already falls back to a safe default automatically; as root, pass --uid to "
|
|
604
|
+
"choose a specific uid instead. Must be a positive, non-root integer; a non-root user may "
|
|
605
|
+
"pass only their own uid.",
|
|
605
606
|
),
|
|
606
607
|
) -> None:
|
|
607
608
|
"""
|
|
@@ -643,7 +644,7 @@ def init(
|
|
|
643
644
|
cwcli init my-project --version 16.26.3
|
|
644
645
|
cwcli init my-project --frappe-branch version-16 --admin-password mypass
|
|
645
646
|
cwcli init my-project --frappe-url https://github.com/me/frappe --frappe-branch my-feature
|
|
646
|
-
cwcli init my-project --uid 1001
|
|
647
|
+
sudo cwcli init my-project --uid 1001
|
|
647
648
|
"""
|
|
648
649
|
# Reject an invalid --uid before ANY project dir / container work. A usage
|
|
649
650
|
# error (exit 2), the same shape Typer gives a non-numeric --uid at parse time.
|
|
@@ -716,7 +717,6 @@ def init(
|
|
|
716
717
|
bench_parent=bench_parent,
|
|
717
718
|
bench_image_tag=bench_image_tag,
|
|
718
719
|
stream_output=verbose,
|
|
719
|
-
uid=uid,
|
|
720
720
|
db_root_password=db_root_password,
|
|
721
721
|
on_event=renderer,
|
|
722
722
|
)
|
|
@@ -732,7 +732,6 @@ def init(
|
|
|
732
732
|
bench_image_tag=bench_image_tag,
|
|
733
733
|
auto_start=True,
|
|
734
734
|
stream_output=verbose,
|
|
735
|
-
uid=uid,
|
|
736
735
|
db_root_password=db_root_password,
|
|
737
736
|
on_event=renderer,
|
|
738
737
|
)
|
|
@@ -47,6 +47,12 @@ def new_bench(
|
|
|
47
47
|
"-a",
|
|
48
48
|
help="An extra app (git URL or name) to fetch and install on the first site (repeatable).",
|
|
49
49
|
),
|
|
50
|
+
app_refs: list[str] = typer.Option(
|
|
51
|
+
None,
|
|
52
|
+
"--app-ref",
|
|
53
|
+
help="The branch, tag or commit one --app is fetched at, as APP=REF with APP "
|
|
54
|
+
"exactly as given to --app (repeatable).",
|
|
55
|
+
),
|
|
50
56
|
admin_password: str = typer.Option(
|
|
51
57
|
None,
|
|
52
58
|
"--admin-password",
|
|
@@ -80,7 +86,17 @@ def new_bench(
|
|
|
80
86
|
Examples:
|
|
81
87
|
CWCLI_ADMIN_PASSWORD=... cwcli new-bench my-project bench-v15 --version 15 --erpnext
|
|
82
88
|
cwcli new-bench my-project hrms-bench --app https://github.com/frappe/hrms
|
|
89
|
+
cwcli new-bench my-project hrms-bench --app hrms --app-ref hrms=version-16-hotfix
|
|
83
90
|
"""
|
|
91
|
+
refs: dict[str, str] = {}
|
|
92
|
+
for value in app_refs if isinstance(app_refs, list) else []:
|
|
93
|
+
app, sep, at = str(value).rpartition("=")
|
|
94
|
+
if not sep or not app.strip() or not at.strip():
|
|
95
|
+
stderr_console.print(
|
|
96
|
+
f"[bold red]Error:[/bold red] --app-ref takes APP=REF, got '{value}'."
|
|
97
|
+
)
|
|
98
|
+
raise typer.Exit(code=2)
|
|
99
|
+
refs[app.strip()] = at.strip()
|
|
84
100
|
ensure_containers_running(project_name, require_running=True, verbose=verbose, auto_start=yes)
|
|
85
101
|
password = admin_password or os.environ.get("CWCLI_ADMIN_PASSWORD")
|
|
86
102
|
if not password:
|
|
@@ -110,6 +126,7 @@ def new_bench(
|
|
|
110
126
|
frappe_url=frappe_url,
|
|
111
127
|
install_erpnext=erpnext,
|
|
112
128
|
apps=list(apps or []),
|
|
129
|
+
refs=refs,
|
|
113
130
|
db_root_password=db_root_password or os.environ.get("CWCLI_DB_ROOT_PASSWORD"),
|
|
114
131
|
with_deps=with_deps is True,
|
|
115
132
|
dep_sources=deps_ui.parse_dep_sources(
|
|
@@ -2354,7 +2354,11 @@ class _Handler(BaseHTTPRequestHandler):
|
|
|
2354
2354
|
re-plans before it acts, so a remote that moves in between cannot slip by.
|
|
2355
2355
|
|
|
2356
2356
|
``target`` (repeatable) is a repository URL or a bench app's name; ``ref`` the
|
|
2357
|
-
branch for the targets
|
|
2357
|
+
branch for the targets - one value for all of them, or one per target in the
|
|
2358
|
+
same order (an empty one leaves that target's ref to the plan); ``checkout=1``
|
|
2359
|
+
plans a bench app asked for at another ref as a checkout of the bench's copy
|
|
2360
|
+
(New site), not as read from that copy; ``site``
|
|
2361
|
+
(repeatable) filters the sites; ``new_site``
|
|
2358
2362
|
names a site about to be created; ``dep_source`` (repeatable ``app=url``)
|
|
2359
2363
|
answers an ambiguous source. ``new_bench=1`` with ``version`` and ``erpnext``
|
|
2360
2364
|
plans against a bench that does not exist yet.
|
|
@@ -2366,13 +2370,18 @@ class _Handler(BaseHTTPRequestHandler):
|
|
|
2366
2370
|
if not targets:
|
|
2367
2371
|
self._send_error(400, ErrorKind.USAGE.value, "plan.target_required", "no target")
|
|
2368
2372
|
return
|
|
2369
|
-
ref
|
|
2373
|
+
# Re-read `ref` keeping blanks: parse_qs drops an empty value, and an empty ref
|
|
2374
|
+
# is how one target of several says "the plan picks mine".
|
|
2375
|
+
raw_refs = parse_qs(urlparse(self.path).query, keep_blank_values=True).get("ref") or []
|
|
2376
|
+
refs = [_optional_str(value) for value in raw_refs]
|
|
2377
|
+
if len(refs) != len(targets):
|
|
2378
|
+
refs = [refs[0] if refs else None] * len(targets)
|
|
2370
2379
|
dep_sources = {}
|
|
2371
2380
|
for value in query.get("dep_source") or []:
|
|
2372
2381
|
app_name, sep, url = str(value).partition("=")
|
|
2373
2382
|
if sep and app_name.strip() and url.strip():
|
|
2374
2383
|
dep_sources[app_name.strip()] = url.strip()
|
|
2375
|
-
pairs = [(t.strip(), ref) for t in targets]
|
|
2384
|
+
pairs = [(t.strip(), ref) for t, ref in zip(targets, refs, strict=True)]
|
|
2376
2385
|
try:
|
|
2377
2386
|
if one("new_bench"):
|
|
2378
2387
|
version = one("version") or "16"
|
|
@@ -2400,6 +2409,7 @@ class _Handler(BaseHTTPRequestHandler):
|
|
|
2400
2409
|
fetch_only=one("fetch_only") in ("1", "true"),
|
|
2401
2410
|
dep_sources=dep_sources,
|
|
2402
2411
|
ignore_frappe_range=one("ignore_frappe_range") in ("1", "true"),
|
|
2412
|
+
checkout_held=one("checkout") in ("1", "true"),
|
|
2403
2413
|
)
|
|
2404
2414
|
except CwcliError as e:
|
|
2405
2415
|
self._send_core_error(e)
|
|
@@ -39,6 +39,7 @@ import typer
|
|
|
39
39
|
from rich.live import Live
|
|
40
40
|
from rich.table import Table
|
|
41
41
|
|
|
42
|
+
from ..core import auto_inspect as core_auto_inspect
|
|
42
43
|
from ..core import docker as core_docker
|
|
43
44
|
from ..core import maintenance as core_maintenance
|
|
44
45
|
from ..core import resolvers
|
|
@@ -124,7 +125,12 @@ def status(
|
|
|
124
125
|
exits 1 if any site still answers maintenance mode or its state could not be read.
|
|
125
126
|
"""
|
|
126
127
|
if project_name is None:
|
|
127
|
-
|
|
128
|
+
try:
|
|
129
|
+
render_instances_summary(verbose=verbose)
|
|
130
|
+
finally:
|
|
131
|
+
# Host-wide, so the "how is everything" read names it too, Docker or not.
|
|
132
|
+
for w in core_auto_inspect.stale_boot_unit_warnings():
|
|
133
|
+
stderr_console.print(f"[yellow]{w.text}[/yellow]")
|
|
128
134
|
raise typer.Exit(code=0)
|
|
129
135
|
|
|
130
136
|
if site and not clear_maintenance:
|
|
@@ -153,7 +159,7 @@ def status(
|
|
|
153
159
|
# The not-cwcli-supervised hint and the maintenance/scheduler faults are
|
|
154
160
|
# rendered by _render_detail (in BOTH modes), so don't also echo them
|
|
155
161
|
# here as warnings - they would double up.
|
|
156
|
-
if warning.code in ("supervisor.not_cwcli", *_BENCH_FAULT_CODES):
|
|
162
|
+
if warning.code in ("supervisor.not_cwcli", STALE_UNIT_CODE, *_BENCH_FAULT_CODES):
|
|
157
163
|
continue
|
|
158
164
|
stderr_console.print(f"[dim]{warning.text}[/dim]")
|
|
159
165
|
_render_detail(report, verbose, result.warnings)
|
|
@@ -461,6 +467,7 @@ def _web_line(bench: BenchStatus, verbose: bool, host_target: str | None) -> str
|
|
|
461
467
|
# Faults the core reports per bench (``detail["bench_path"]``), rendered under that
|
|
462
468
|
# bench's heading with the core's own text, so the remedy is written in one place.
|
|
463
469
|
_BENCH_FAULT_CODES = ("status.maintenance_mode", "status.scheduler_paused")
|
|
470
|
+
STALE_UNIT_CODE = "startup.unit_stale"
|
|
464
471
|
|
|
465
472
|
|
|
466
473
|
def _render_detail(report: StatusReport, verbose: bool, warnings: Sequence[Message] = ()) -> None:
|
|
@@ -516,6 +523,11 @@ def _render_detail(report: StatusReport, verbose: bool, warnings: Sequence[Messa
|
|
|
516
523
|
bits.append(f"rss={p.rss_kb}KB")
|
|
517
524
|
detail = " " + " ".join(bits) if bits else ""
|
|
518
525
|
stderr_console.print(f" {p.label:<16} {mark}{detail}")
|
|
526
|
+
# A stale start-on-boot unit fails at every boot (or every few seconds, on an old
|
|
527
|
+
# unit with no restart limit); host-wide, so after the benches, without --verbose.
|
|
528
|
+
for w in warnings:
|
|
529
|
+
if w.code == STALE_UNIT_CODE:
|
|
530
|
+
stderr_console.print(f"[yellow]{w.text}[/yellow]")
|
|
519
531
|
|
|
520
532
|
|
|
521
533
|
def _render_table(report: StatusReport) -> Table:
|