caffeinated-whale-cli 3.6.1__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.
Files changed (213) hide show
  1. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/PKG-INFO +68 -14
  2. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/README.md +66 -12
  3. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/pyproject.toml +5 -2
  4. caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/__init__.py +1 -0
  5. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/axi.py +2 -2
  6. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/config.py +8 -10
  7. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/init.py +4 -5
  8. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/new_bench.py +17 -0
  9. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/serve.py +17 -4
  10. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/status.py +208 -14
  11. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/update.py +5 -5
  12. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/app_catalog.py +127 -27
  13. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/app_deps.py +130 -30
  14. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/apps.py +51 -22
  15. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/auto_inspect.py +61 -10
  16. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/bench_ops.py +97 -16
  17. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/community.py +6 -1
  18. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/credbridge.py +36 -5
  19. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/docker.py +172 -92
  20. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/doctor.py +22 -2
  21. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/fleet.py +52 -2
  22. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/git_refs.py +50 -11
  23. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/hosts.py +4 -0
  24. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/init.py +41 -38
  25. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/inspect.py +6 -8
  26. caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/core/maintenance.py +1001 -0
  27. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/new_bench.py +5 -1
  28. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/new_site.py +31 -12
  29. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/publish.py +87 -15
  30. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/rm.py +54 -9
  31. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/self_update.py +2 -1
  32. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/setup.py +18 -0
  33. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/status.py +112 -69
  34. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/supervision.py +7 -1
  35. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/update.py +6 -2
  36. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/update_preflight.py +8 -5
  37. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/jobs.py +33 -34
  38. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/cred_daemon.py +84 -0
  39. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/db_utils.py +6 -3
  40. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/startup.py +285 -59
  41. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Advisories-CBgZMwoM.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Advisories-BmT8oQfh.js +1 -1
  42. caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/AppNameCell-B1rmwEVF.js +1 -0
  43. caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Apps-Dcw4ZQiF.js +1 -0
  44. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Backups-CXylE2hz.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Backups-COF5nXgk.js +1 -1
  45. caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Bench-DyRSgptU.js +3 -0
  46. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Breadcrumbs.vue_vue_type_script_setup_true_lang-BpVXcqf6.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
  47. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/FollowPane-C8wxDC1C.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/FollowPane-BRuO-biQ.js +1 -1
  48. caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Instance-DiYaGfOA.js +1 -0
  49. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Instances-CJfx2228.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Instances-ClZeUBnc.js +1 -1
  50. caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Job-Dq8lo9yT.js +3 -0
  51. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/JobState-CGY7L4t8.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/JobState-C_7qvU8N.js +1 -1
  52. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Jobs-mqf4ySNT.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Jobs-BgVEdmxi.js +1 -1
  53. 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 -0
  54. caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/MaintenanceAlert-DqFT6z9a.js +1 -0
  55. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/PageHead-ywkLInll.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/PageHead-p47Rxiwi.js +1 -1
  56. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/PageHeader.vue_vue_type_script_setup_true_lang-BdNq_puu.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
  57. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/PerformancePanel-BuHUhl3r.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/PerformancePanel-DZeEuIqh.js +1 -1
  58. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/RemoteHostBadge-DnzlCsvD.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/RemoteHostBadge-7hTGaukh.js +1 -1
  59. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Schedules-CNxjmssz.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Schedules-Btf72D4d.js +1 -1
  60. caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Site-CGpOIcRr.js +9 -0
  61. caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/Sites-CfAww7bp.js +3 -0
  62. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/TabButtons.vue_vue_type_script_setup_true_lang-BP3gtvhb.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
  63. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/TimeSeries-CFzuYIvo.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/TimeSeries-DUCEf3GZ.js +1 -1
  64. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/UpdatePill-CMG2Wd6w.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/UpdatePill-ChMXZ5uW.js +1 -1
  65. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/index-D3Z22wSo.css → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/index-JnUfx8-w.css +1 -1
  66. caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/index-TTAPNjEG.js +39 -0
  67. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/set-menu-BN1T1yXA.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/set-menu-BUx20_jn.js +1 -1
  68. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/tabs-DftXRAc4.js → caffeinated_whale_cli-3.8.0/src/caffeinated_whale_cli/webui/dist/assets/tabs-BZusINW8.js +1 -1
  69. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/index.html +2 -2
  70. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli.egg-info/SOURCES.txt +29 -28
  71. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/__init__.py +0 -1
  72. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/AppNameCell-BObY_ijk.js +0 -1
  73. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Apps-BPPyCuW1.js +0 -1
  74. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Bench-CBUzHhFz.js +0 -3
  75. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/DevModeBadge-ByEvdhaS.js +0 -1
  76. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Instance-B7fJ6p1L.js +0 -1
  77. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Job-ByQ4ybGX.js +0 -3
  78. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/ListRows.vue_vue_type_script_setup_true_lang-hOfO_scP.js +0 -1
  79. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Site-5FDMZIun.js +0 -9
  80. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/Sites-C5CVzP_x.js +0 -1
  81. caffeinated_whale_cli-3.6.1/src/caffeinated_whale_cli/webui/dist/assets/index-CyatF_BF.js +0 -39
  82. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/LICENSE +0 -0
  83. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/setup.cfg +0 -0
  84. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/__main__.py +0 -0
  85. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/bridge.py +0 -0
  86. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/__init__.py +0 -0
  87. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/admin.py +0 -0
  88. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/apps.py +0 -0
  89. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/backup.py +0 -0
  90. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/backups.py +0 -0
  91. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/db_access.py +0 -0
  92. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/deps_ui.py +0 -0
  93. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/dev_mode.py +0 -0
  94. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/doctor.py +0 -0
  95. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/inspect.py +0 -0
  96. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/integrations.py +0 -0
  97. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/label.py +0 -0
  98. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/list.py +0 -0
  99. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/logs.py +0 -0
  100. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/new_site.py +0 -0
  101. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/open.py +0 -0
  102. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/remote.py +0 -0
  103. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/restart.py +0 -0
  104. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/restore.py +0 -0
  105. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/rm.py +0 -0
  106. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/rm_bench.py +0 -0
  107. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/rm_site.py +0 -0
  108. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/run.py +0 -0
  109. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/scale.py +0 -0
  110. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/schedule.py +0 -0
  111. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/self_update.py +0 -0
  112. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/setup.py +0 -0
  113. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/start.py +0 -0
  114. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/stop.py +0 -0
  115. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/ui.py +0 -0
  116. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/unlock.py +0 -0
  117. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/utils.py +0 -0
  118. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/commands/where.py +0 -0
  119. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/__init__.py +0 -0
  120. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/accounts.py +0 -0
  121. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/advisories.py +0 -0
  122. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/backup.py +0 -0
  123. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/backup_crypto.py +0 -0
  124. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/backup_drill.py +0 -0
  125. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/backup_store.py +0 -0
  126. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/bench_read.py +0 -0
  127. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/cloudflare.py +0 -0
  128. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/config.py +0 -0
  129. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/cred_bridge.py +2 -2
  130. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/daemon_recovery.py +0 -0
  131. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/db_access.py +0 -0
  132. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/db_password.py +0 -0
  133. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/dev_mode.py +0 -0
  134. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/directory.py +0 -0
  135. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/editors.py +0 -0
  136. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/envelope.py +0 -0
  137. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/errors.py +0 -0
  138. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/exec_stream.py +0 -0
  139. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/failure_causes.py +0 -0
  140. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/integrations.py +0 -0
  141. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/label.py +0 -0
  142. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/ldap_client.py +0 -0
  143. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/list.py +0 -0
  144. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/logs.py +0 -0
  145. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/metrics.py +0 -0
  146. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/npm.py +0 -0
  147. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/open.py +0 -0
  148. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/protocol.py +0 -0
  149. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/remote_access.py +0 -0
  150. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/resolvers.py +0 -0
  151. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/restart.py +0 -0
  152. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/restore.py +0 -0
  153. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/rm_bench.py +0 -0
  154. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/rm_site.py +0 -0
  155. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/run.py +0 -0
  156. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/s3.py +0 -0
  157. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/scale.py +0 -0
  158. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/schedules.py +0 -0
  159. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/site_icons.py +0 -0
  160. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/site_logs.py +0 -0
  161. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/start.py +0 -0
  162. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/stop.py +0 -0
  163. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/transfer.py +0 -0
  164. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/unlock.py +0 -0
  165. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/updates.py +0 -0
  166. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/url.py +0 -0
  167. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/version.py +0 -0
  168. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/webapi.py +0 -0
  169. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/core/where.py +0 -0
  170. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/main.py +0 -0
  171. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/update_notice.py +0 -0
  172. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/__init__.py +0 -0
  173. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/agent_hooks.py +0 -0
  174. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/auto_inspect.py +0 -0
  175. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/bench_labels.py +0 -0
  176. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/bench_sites.py +0 -0
  177. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/cache.py +0 -0
  178. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/completion_utils.py +0 -0
  179. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/config_utils.py +0 -0
  180. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/console.py +0 -0
  181. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/daemon_identity.py +0 -0
  182. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/docker_utils.py +0 -0
  183. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/port_utils.py +0 -0
  184. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/sendme_utils.py +0 -0
  185. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/shared_home.py +0 -0
  186. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/signals.py +0 -0
  187. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/tips.py +0 -0
  188. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/toon.py +0 -0
  189. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/utils/vscode_utils.py +0 -0
  190. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/__init__.py +0 -0
  191. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/Inter-Italic.var-BGHziHgI.woff2 +0 -0
  192. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/Inter.var-C9xDBOS3.woff2 +0 -0
  193. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/ListRows-CejsiiPF.css +0 -0
  194. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/code-insiders--L5huIRx.svg +0 -0
  195. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/code-ofeWxTsy.svg +0 -0
  196. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/cursor-jGcLH-b0.svg +0 -0
  197. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-cyrillic-ext-opsz-normal-CfYZpDVp.woff2 +0 -0
  198. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-cyrillic-opsz-normal-BFQXbQ-f.woff2 +0 -0
  199. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-greek-ext-opsz-normal-BmPQvyvo.woff2 +0 -0
  200. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-greek-opsz-normal-BM0NlUE_.woff2 +0 -0
  201. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-latin-ext-opsz-normal-DpK-iCPk.woff2 +0 -0
  202. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-latin-opsz-normal-BwkfbSeq.woff2 +0 -0
  203. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/inter-vietnamese-opsz-normal-Ci9T9ieq.woff2 +0 -0
  204. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-cyrillic-ext-wght-normal-EocZY2iu.woff2 +0 -0
  205. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
  206. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
  207. {caffeinated_whale_cli-3.6.1 → 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
  208. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  209. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
  210. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/assets/opsz-DreOFYE_.css +0 -0
  211. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/csp.json +0 -0
  212. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/logo-whale.png +0 -0
  213. {caffeinated_whale_cli-3.6.1 → caffeinated_whale_cli-3.8.0}/src/caffeinated_whale_cli/webui/dist/theme-boot.js +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: caffeinated-whale-cli
3
- Version: 3.6.1
3
+ Version: 3.8.0
4
4
  Summary: A CLI tool to help manage Frappe Docker instances.
5
5
  Author-email: Christopher McKay <mckay.christopher73@outlook.com>
6
6
  License: MIT
@@ -18,7 +18,7 @@ Requires-Python: >=3.10
18
18
  Description-Content-Type: text/markdown
19
19
  License-File: LICENSE
20
20
  Requires-Dist: docker>=7.1.0
21
- Requires-Dist: typer>=0.16.0
21
+ Requires-Dist: typer<0.29,>=0.16.0
22
22
  Requires-Dist: click>=8.0.0
23
23
  Requires-Dist: rich>=14.0.0
24
24
  Requires-Dist: requests>=2.26.0
@@ -196,6 +196,7 @@ The per-user SQLite cache is regenerable (`cwcli inspect`) and deliberately not
196
196
  - **`cwcli` group membership is the trust boundary.** Anyone in the group can read every instance's cache, read the rm/rm-site backups (which contain full database dumps), edit the shared config, and - with `--cred-bridge` - ask the machine-wide bridge for a credential. This is the same "docker group ≈ root-ish capability" trade every shared dev tool makes. Keep membership deliberate.
197
197
  - **The credential bridge in shared mode serves one machine-owned, read-only service-account token** to any group member's container git, so its audit log records the host and project but **not which human** triggered a fetch (they all present as the service account). Provision that account with a read-only deploy token; rotate it in one place if it leaks.
198
198
  - **The shared credential is also the default for cwcli's own fetches.** `cwcli init --frappe-url <private fork>`, `apps install`, `apps update`, and `apps checkout` first wire the instance into the machine-wide bridge, so a member who never signed in to `gh`/`glab` personally can still fetch a private repo. A member's own `gh`/`glab` sign-in is only the automatic fallback, used when the shared credential answers nothing for that host (for example a host missing from `allowed_hosts`, or the bridge daemon is down), and cwcli prints one line on stderr when it falls back.
199
+ - **The web UI's app catalog reads the shared credential first, too.** The bridge daemon serves one machine-wide socket in the shared run directory (group-gated like the per-instance ones), and the catalog's forge scan, an app's branch list, and its dependency read all ask it before the account running `cwcli ui`, so the Apps page shows the same repositories for every member; the GitLab hosts it checks are the account's own `glab` hosts plus every non-GitHub host in `allowed_hosts`, and a host only `allowed_hosts` names is listed once a credential answers for it. cwcli's own `gh`/`glab` calls always run from the filesystem root, never from the directory `cwcli ui` was started in, so a repository the service account cannot read no longer breaks them.
199
200
  - The group-owned socket (`0660 root:cwcli`) closes the world-connectable `0666` socket that could otherwise leak the first user's token to a second user on the box. A uid outside the `cwcli` group cannot reach it.
200
201
 
201
202
  Run `cwcli doctor` to verify the shared install (group present, tree modes, service account).
@@ -268,7 +269,7 @@ cwcli init [OPTIONS] [PROJECT_NAME]
268
269
  | `--auto-start` | Automatically start containers if not running |
269
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 |
270
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 |
271
- | `--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, and non-numeric values 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 |
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 |
272
273
  | `-v`, `--verbose` | Show verbose output with streaming command execution |
273
274
 
274
275
  **What It Does:**
@@ -279,7 +280,7 @@ cwcli init [OPTIONS] [PROJECT_NAME]
279
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
280
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
281
282
  6. Pulls Docker images and starts containers
282
- 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). On a **root host** (uid 0, a common CI-runner shape) the container `frappe` user is **not** remapped to 0 - that would collide with the container's own root user and break bench's `PATH` (`bench init` fails with exit 127) - so it falls back to the image's default uid (1000) and says so once in a warning; root can still remove those files, so `cwcli rm` keeps working. Pass `--uid <n>` to align to a specific uid instead
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))
283
284
  8. Pins the correct Python version via `PYENV_VERSION` for the branch (installs via pyenv if missing)
284
285
  9. Pins the correct Node.js version via nvm for older branches (installs via nvm if missing)
285
286
  10. Installs `yarn` globally for the activated Node.js version (older branches only)
@@ -461,6 +462,7 @@ cwcli new-bench [OPTIONS] PROJECT_NAME BENCH_NAME
461
462
  | `--frappe-url TEXT` | A Frappe fork to build from (private forks use the credential bridge) |
462
463
  | `--erpnext` | Install ERPNext on the first site |
463
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) |
464
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 |
465
467
  | `--ignore-frappe-range` | Install an extra app although its declared Frappe range does not fit the new bench |
466
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) |
@@ -2147,9 +2149,12 @@ cwcli status [OPTIONS] [PROJECT_NAME]
2147
2149
  | Option | Description |
2148
2150
  |--------|-------------|
2149
2151
  | `--bench` | Report ONE bench: its numeric index or label. Omit it to report every bench |
2152
+ | `-p`, `--path` | Report ONE bench by its directory (lower-level alternative to `--bench`) |
2150
2153
  | `-v`, `--verbose` | Show the per-process detail and the web HTTP probe on stderr |
2151
2154
  | `-w`, `--watch` | Live, continuously-refreshing per-process view (Ctrl-C to exit) |
2152
2155
  | `--interval` | Seconds between `--watch` refreshes (default 2, floored at 1s) |
2156
+ | `--clear-maintenance` | Take every site found in maintenance mode out of it without asking (see below); exits 1 if it is refused, the maintenance state of a bench or a site could not be read (for example, the instance is stopped or a site config is not valid JSON), or a site still answers 503; not combined with `--watch` (exit 2) |
2157
+ | `--site` | With `--clear-maintenance`: take only this site out of maintenance mode by turning off its own flag; it never touches the bench-wide flags, and a site the bench holds in maintenance is reported and exits 1. Without `--clear-maintenance` it is a usage error (exit 2) |
2153
2158
 
2154
2159
  **Aggregate values** (printed on stdout, one token, exit 0). Each bench carries its
2155
2160
  own; the stdout token is the **instance** fold over them (see below):
@@ -2212,12 +2217,20 @@ hint to run `cwcli start` to bring it under cwcli's supervisor. In this mode the
2212
2217
  per-process supervisord `state` is unavailable (there is no supervisord to ask);
2213
2218
  `up` comes straight from `ps`. `status` only reads - it never launches supervisord.
2214
2219
 
2215
- **Maintenance mode is called out plainly.**
2216
- A site stuck in maintenance mode answers HTTP 503 to every user with no other signal - the state a `migrate` / `apps update` killed mid-run (a closed terminal, a `kill`, a service stop) leaves behind.
2217
- When a bench's site is in maintenance mode, `status` prints `MAINTENANCE MODE ON` for that site (even without `-v`, since it is a fault, not detail) and names the way out (`cwcli run <project> --site <site> set-maintenance-mode off`); `cwcli axi status` carries it as `maintenance_mode` plus a `status.maintenance_mode` warning.
2218
- It is read live the way Frappe reads it, not inferred from the 503: the bench's `sites/common_site_config.json` first, with the site's own `site_config.json` overriding it.
2219
- A failed `bench update` (the `cwcli apps update <project> frappe` path) leaves `maintenance_mode` and `pause_scheduler` set in that bench-wide file, which holds down every site on the bench that does not override them.
2220
- `status` reports each one it finds there (`status.maintenance_mode` and `status.scheduler_paused`) with the bench-wide way out, `cwcli run <project> set-config --global --parse maintenance_mode 0` (and the same for `pause_scheduler`); `set-maintenance-mode off` would bring back only the one site.
2220
+ **Maintenance mode is called out plainly, and `status` offers to take sites out of it.**
2221
+ A site stuck in maintenance mode answers HTTP 503 (`SessionStopped`) to every user with no other signal - the state a `migrate` / `apps update` killed mid-run (a closed terminal, a `kill`, an OOM kill, a reboot) or a failed `bench update` leaves behind.
2222
+ `status` reads maintenance mode for every site of every bench it reports, the way Frappe answers it, not from one file:
2223
+ the bench's `sites/common_site_config.json` first, with each site's own `site_config.json` overriding it;
2224
+ and, when the web server is `bench serve` with a default site (`bench use`), every request is answered as that default site, so a site whose own file says `maintenance_mode: 0` still answers 503 while the default site inherits a bench-wide 1.
2225
+ When something is in maintenance, `status` also asks each site over HTTP (`/api/method/ping` with its `Host`), because Frappe can keep answering from its config cache for up to a minute after a file changes.
2226
+ It prints one `MAINTENANCE MODE` fault per bench (even without `-v`) naming the affected sites, the write that holds them (the bench-wide `maintenance_mode`, with `pause_scheduler` when `bench update` set both, or a site's own flag), and who set it: cwcli records the maintenance mode it turns on, so a flag left by an interrupted cwcli `migrate` or `apps update` names that operation and its job, while a flag with no record is reported as possibly set on purpose.
2227
+ On an interactive terminal `status` then asks whether to take the sites out of maintenance mode.
2228
+ `--clear-maintenance` does it without asking (the way for scripts and agents; a non-TTY is never asked and the fault names this flag).
2229
+ Taking them out clears the bench-wide flags with `bench set-config --global --parse <flag> 0` (resuming a scheduler paused with them) and each site's own flag with `set-maintenance-mode off`, then waits until no site answers Frappe's ping with 503 (SessionStopped) any more; `--clear-maintenance` exits 1 if a site still does.
2230
+ A site that does not answer at all, because its web server is not running, is not waited for: cwcli reports that it could not check that site.
2231
+ It is never offered, and `--clear-maintenance` refuses with exit 1, while anything that sets maintenance mode still runs on the bench: the cwcli operation that turned it on, an in-container `bench migrate`/`update`/`restore`, or a held migrate lock.
2232
+ `cwcli axi status` carries the per-bench report as `maintenance` (with `down`, `bench_flags`, `owners` and `busy`) beside `maintenance_mode`, plus the `status.maintenance_mode` and `status.scheduler_paused` warnings.
2233
+ The web UI shows the same fault on the instance, bench and site pages and the Sites list, with a button that runs the same clear as a tracked job.
2221
2234
  These reads are skipped in the `--watch` loop (which makes no web probe).
2222
2235
 
2223
2236
  **Per-bench, per-process detail (stderr):** one sub-block per bench, headed by its
@@ -2303,7 +2316,7 @@ While the daemon runs it polls process health for every running instance; the we
2303
2316
  That check is a bare TCP connect to the bench's web port, not an HTTP request, so polling writes nothing to the bench's web access log; the Bench page shows its verdict as `Listening` or `Not listening` next to the web port, or `unknown` while the latest health probe has failed and the page is showing the last successful probe's readings.
2304
2317
  It refuses any request whose `Host` is not this machine, so another site in your browser cannot read or drive it.
2305
2318
 
2306
- **What it can do:** everything the CLI reads (`ls`, `status`, `inspect`, `where`, `doctor`, `logs`, `axi url`, `config show`) and the safe lifecycle set: start, stop and restart an instance or a bench, restart one process, set a bench label, unlock a site, take a site out of maintenance mode, widen the port range (the same core confirmation `cwcli scale` asks for, typed back as the instance name), and check out an app ref without `--reset`.
2319
+ **What it can do:** everything the CLI reads (`ls`, `status`, `inspect`, `where`, `doctor`, `logs`, `axi url`, `config show`) and the safe lifecycle set: start, stop and restart an instance or a bench, restart one process, set a bench label, unlock a site, take sites out of maintenance mode, widen the port range (the same core confirmation `cwcli scale` asks for, typed back as the instance name), and check out an app ref without `--reset`.
2307
2320
  These lifecycle changes run as jobs too, so their steps and outcome remain visible after navigation.
2308
2321
  When an action needs a stopped instance running, the page offers to start it first: an action on a bench, site or app starts that bench (`cwcli start <project> --bench <n>`), so a multi-bench instance never asks which bench, and an instance-level action starts only the containers, never a bench.
2309
2322
  Remove bench on a stopped instance starts only its containers, and stops them again if the removal does not complete.
@@ -2313,6 +2326,8 @@ The long-job forms cover `init`, `apps install`, `apps update`, `apps checkout`,
2313
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`.
2314
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.
2315
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`).
2316
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.
2317
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.
2318
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.
@@ -2371,6 +2386,7 @@ The host transport is the exception: different hosts may use different transport
2371
2386
  See `integrations` below for the terminal commands, the declaration a repository needs, and where the code is installed.
2372
2387
 
2373
2388
  **Publishing a site at its own domain:** with Cloudflare DNS, Nginx Proxy Manager or both turned on, **New site** offers "Publish it at a public address".
2389
+ A site publishes with the integrations of the machine its instance is on: a remote host's instance (see `remote` below) uses that host's own Cloudflare DNS and Nginx Proxy Manager, set up from the hub's Settings > Integrations with that host picked, and the dialog says so.
2374
2390
  With Cloudflare on, the site name becomes a name plus a zone the token can see, so a typo cannot land in another zone, and a read-only preflight checks each part before anything is created: the bench's published port, whether the name is free in the zone (or already cwcli's), and whether a proxy host cwcli can see already uses it; with Nginx Proxy Manager alone it shows what the name resolves to now.
2375
2391
  A failing preflight row keeps **Create site** disabled, and the `new-site` job runs the same preflight first, so a name that cannot be published never leaves a site behind.
2376
2392
  The site is created exactly as without publishing; as soon as it exists a second job, **Publish site** (the card follows it as "part 2 of 2"), writes the A record, makes the proxy host, requests the certificate, then checks that `https://<site>/api/method/ping` answers.
@@ -2498,10 +2514,17 @@ An action on a remote instance goes to that machine's own daemon through the hub
2498
2514
  The link states: `connected` (live, actions allowed), `connecting`, `unreachable` (the host stopped answering: its instances keep their last-known state as `unknown` with a last-seen time, actions are disabled, and nothing is started, stopped or retried because a host went quiet), `cwcli not running there`, `no longer accepts this hub`, `host key changed`, `different cwcli version` (reads work, actions wait until both sides speak the same web UI protocol; the message names the side to update), `integration off` and `service account only` (on a shared install, a group member's own web UI on the shared home: remote hosts run from the service account's web UI, the only one that can read the hub key, so this one lists them and dials none; a member opted back to a private home with `CWCLI_HOME` runs a hub of its own).
2499
2515
  A dropped packet never flashes a host to unknown: one immediate re-probe decides.
2500
2516
  A remote instance's page has the same live process readings and web check as a local one: while a tab has it open, the hub holds that host's stream with the instance as its focus.
2501
- Backups, schedules, the apps catalog, publishing a site at a public address and the restore and transfer dialogs stay each machine's own; a remote site's backups show that machine's sets with Back up now, Verify, Download and Delete.
2517
+ Backups, schedules, the apps catalog and the restore and transfer dialogs stay each machine's own; a remote site's backups show that machine's sets with Back up now, Verify, Download and Delete.
2502
2518
  Drop site on a remote site asks that machine, as the dialog opens, whether the site is published there, and offers "Also unpublish it" (ticked when it is), so the unpublish runs on the machine that published it.
2503
2519
  When that machine cannot be read, or the page does not know the site's bench yet, the box is offered unticked with a note that its publication state could not be read.
2504
2520
 
2521
+ **Each remote host's own edge, set up from the hub.** A remote runs its own Nginx Proxy Manager and Cloudflare setup, and the hub is where it is managed: Settings > Integrations has a machine picker (shown once a host is added), and with a remote picked the panel lists that host's OWN official integrations and sets them up through the hub's forward.
2522
+ Test connection, Detect (the remote's own container discovery) and Test and turn on all run on that host; the secrets typed are stored encrypted on that host and never on the hub, which relays only the setup form and the test result, and no second store exists on the hub.
2523
+ Changing a machine's integrations is an Admin's act there, so the remote must have granted the hub the Admin cap: with an Operator (or Viewer) grant the panel says that configuring that host's integrations needs the Admin cap and names the exact command its owner runs there, `cwcli remote allow --hub <hub name> --key "<hub public key>" --max-role admin` (which replaces the earlier grant), with a Check now button for when it has been run.
2524
+ A host whose link is not connected (unreachable, host key changed, cwcli not running there, a different cwcli version, no longer accepting the hub) is named with the same advice as the Remote hosts panel, never a silent empty list.
2525
+ Community integrations are installed on each machine by its own Admin; the picker never offers them for a remote.
2526
+ Publishing then follows the instance: on a remote instance, New site's "Publish it at a public address" uses that host's own Cloudflare DNS and Nginx Proxy Manager (its zones, address, access lists and preflight are read from that host, and the sentence under the box names it), the Sites list's Public address column and globe menu show and drive each remote site's publication from that host's own store (Publish, Retry what is missing, Check for drift and Unpublish run there), the site's page states whose integrations published it, and a publish job's page shows "Integration settings: <host>'s own".
2527
+
2505
2528
  **Security.** The hub forwards only `/api/v1/` paths, never a remote's sign-in, stream or hosts routes, and relays every answer as DATA: JSON, a download as an attachment or an image under a sandboxing policy, each with `X-Content-Type-Options: nosniff`, never a cookie and never a page (a remote can never serve code into the hub's origin).
2506
2529
  A remote that is itself a hub keeps its own remote hosts to itself: the stream it serves through its bridge carries its own instances and jobs, never its hosts.
2507
2530
  The hub builds every `ssh` argument list itself, validates the host and user it was given and puts `--` before them.
@@ -2636,6 +2659,7 @@ when the tool is signed in to none of them; a signed-out host beside a
2636
2659
  signed-in one is listed with its `auth login --hostname` command.
2637
2660
  An enabled but stopped auto-inspect or credential-bridge daemon is a `warn`
2638
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`).
2639
2663
 
2640
2664
  **Exit codes:** `0` when every check is pass/warn (a warning never blocks -
2641
2665
  doctor is a chainable preflight gate), `1` when any check fails.
@@ -2881,7 +2905,15 @@ These verbs remain as hidden aliases with byte-identical behavior plus a one-lin
2881
2905
 
2882
2906
  **Boot-unit note:** startup units installed before this change (systemd/LaunchAgent/schtasks) exec `cwcli config auto-inspect start` verbatim.
2883
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.
2884
- Re-running `cwcli config auto-inspect enable --startup` rewrites the unit against the current executable path.
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).
2885
2917
 
2886
2918
  ### `self-update` - Upgrade cwcli Itself
2887
2919
 
@@ -3024,6 +3056,28 @@ cwcli ls --json | jq '.[] | select(.status=="running")'
3024
3056
  cwcli inspect frappe-one --json | jq '.bench_instances[0].sites'
3025
3057
  ```
3026
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
+
3027
3081
  ### For agents: the `cwcli axi` surface
3028
3082
 
3029
3083
  `cwcli axi` is an agent-facing surface built for autonomous tools that drive cwcli through shell execution.
@@ -3257,7 +3311,7 @@ These are agent-only for now: there is no human `cwcli migrate`, `cwcli run-test
3257
3311
 
3258
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`.
3259
3313
 
3260
- `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.
3261
3315
 
3262
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.
3263
3317
 
@@ -155,6 +155,7 @@ The per-user SQLite cache is regenerable (`cwcli inspect`) and deliberately not
155
155
  - **`cwcli` group membership is the trust boundary.** Anyone in the group can read every instance's cache, read the rm/rm-site backups (which contain full database dumps), edit the shared config, and - with `--cred-bridge` - ask the machine-wide bridge for a credential. This is the same "docker group ≈ root-ish capability" trade every shared dev tool makes. Keep membership deliberate.
156
156
  - **The credential bridge in shared mode serves one machine-owned, read-only service-account token** to any group member's container git, so its audit log records the host and project but **not which human** triggered a fetch (they all present as the service account). Provision that account with a read-only deploy token; rotate it in one place if it leaks.
157
157
  - **The shared credential is also the default for cwcli's own fetches.** `cwcli init --frappe-url <private fork>`, `apps install`, `apps update`, and `apps checkout` first wire the instance into the machine-wide bridge, so a member who never signed in to `gh`/`glab` personally can still fetch a private repo. A member's own `gh`/`glab` sign-in is only the automatic fallback, used when the shared credential answers nothing for that host (for example a host missing from `allowed_hosts`, or the bridge daemon is down), and cwcli prints one line on stderr when it falls back.
158
+ - **The web UI's app catalog reads the shared credential first, too.** The bridge daemon serves one machine-wide socket in the shared run directory (group-gated like the per-instance ones), and the catalog's forge scan, an app's branch list, and its dependency read all ask it before the account running `cwcli ui`, so the Apps page shows the same repositories for every member; the GitLab hosts it checks are the account's own `glab` hosts plus every non-GitHub host in `allowed_hosts`, and a host only `allowed_hosts` names is listed once a credential answers for it. cwcli's own `gh`/`glab` calls always run from the filesystem root, never from the directory `cwcli ui` was started in, so a repository the service account cannot read no longer breaks them.
158
159
  - The group-owned socket (`0660 root:cwcli`) closes the world-connectable `0666` socket that could otherwise leak the first user's token to a second user on the box. A uid outside the `cwcli` group cannot reach it.
159
160
 
160
161
  Run `cwcli doctor` to verify the shared install (group present, tree modes, service account).
@@ -227,7 +228,7 @@ cwcli init [OPTIONS] [PROJECT_NAME]
227
228
  | `--auto-start` | Automatically start containers if not running |
228
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 |
229
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 |
230
- | `--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, and non-numeric values 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 |
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 |
231
232
  | `-v`, `--verbose` | Show verbose output with streaming command execution |
232
233
 
233
234
  **What It Does:**
@@ -238,7 +239,7 @@ cwcli init [OPTIONS] [PROJECT_NAME]
238
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
239
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
240
241
  6. Pulls Docker images and starts containers
241
- 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). On a **root host** (uid 0, a common CI-runner shape) the container `frappe` user is **not** remapped to 0 - that would collide with the container's own root user and break bench's `PATH` (`bench init` fails with exit 127) - so it falls back to the image's default uid (1000) and says so once in a warning; root can still remove those files, so `cwcli rm` keeps working. Pass `--uid <n>` to align to a specific uid instead
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))
242
243
  8. Pins the correct Python version via `PYENV_VERSION` for the branch (installs via pyenv if missing)
243
244
  9. Pins the correct Node.js version via nvm for older branches (installs via nvm if missing)
244
245
  10. Installs `yarn` globally for the activated Node.js version (older branches only)
@@ -420,6 +421,7 @@ cwcli new-bench [OPTIONS] PROJECT_NAME BENCH_NAME
420
421
  | `--frappe-url TEXT` | A Frappe fork to build from (private forks use the credential bridge) |
421
422
  | `--erpnext` | Install ERPNext on the first site |
422
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) |
423
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 |
424
426
  | `--ignore-frappe-range` | Install an extra app although its declared Frappe range does not fit the new bench |
425
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) |
@@ -2106,9 +2108,12 @@ cwcli status [OPTIONS] [PROJECT_NAME]
2106
2108
  | Option | Description |
2107
2109
  |--------|-------------|
2108
2110
  | `--bench` | Report ONE bench: its numeric index or label. Omit it to report every bench |
2111
+ | `-p`, `--path` | Report ONE bench by its directory (lower-level alternative to `--bench`) |
2109
2112
  | `-v`, `--verbose` | Show the per-process detail and the web HTTP probe on stderr |
2110
2113
  | `-w`, `--watch` | Live, continuously-refreshing per-process view (Ctrl-C to exit) |
2111
2114
  | `--interval` | Seconds between `--watch` refreshes (default 2, floored at 1s) |
2115
+ | `--clear-maintenance` | Take every site found in maintenance mode out of it without asking (see below); exits 1 if it is refused, the maintenance state of a bench or a site could not be read (for example, the instance is stopped or a site config is not valid JSON), or a site still answers 503; not combined with `--watch` (exit 2) |
2116
+ | `--site` | With `--clear-maintenance`: take only this site out of maintenance mode by turning off its own flag; it never touches the bench-wide flags, and a site the bench holds in maintenance is reported and exits 1. Without `--clear-maintenance` it is a usage error (exit 2) |
2112
2117
 
2113
2118
  **Aggregate values** (printed on stdout, one token, exit 0). Each bench carries its
2114
2119
  own; the stdout token is the **instance** fold over them (see below):
@@ -2171,12 +2176,20 @@ hint to run `cwcli start` to bring it under cwcli's supervisor. In this mode the
2171
2176
  per-process supervisord `state` is unavailable (there is no supervisord to ask);
2172
2177
  `up` comes straight from `ps`. `status` only reads - it never launches supervisord.
2173
2178
 
2174
- **Maintenance mode is called out plainly.**
2175
- A site stuck in maintenance mode answers HTTP 503 to every user with no other signal - the state a `migrate` / `apps update` killed mid-run (a closed terminal, a `kill`, a service stop) leaves behind.
2176
- When a bench's site is in maintenance mode, `status` prints `MAINTENANCE MODE ON` for that site (even without `-v`, since it is a fault, not detail) and names the way out (`cwcli run <project> --site <site> set-maintenance-mode off`); `cwcli axi status` carries it as `maintenance_mode` plus a `status.maintenance_mode` warning.
2177
- It is read live the way Frappe reads it, not inferred from the 503: the bench's `sites/common_site_config.json` first, with the site's own `site_config.json` overriding it.
2178
- A failed `bench update` (the `cwcli apps update <project> frappe` path) leaves `maintenance_mode` and `pause_scheduler` set in that bench-wide file, which holds down every site on the bench that does not override them.
2179
- `status` reports each one it finds there (`status.maintenance_mode` and `status.scheduler_paused`) with the bench-wide way out, `cwcli run <project> set-config --global --parse maintenance_mode 0` (and the same for `pause_scheduler`); `set-maintenance-mode off` would bring back only the one site.
2179
+ **Maintenance mode is called out plainly, and `status` offers to take sites out of it.**
2180
+ A site stuck in maintenance mode answers HTTP 503 (`SessionStopped`) to every user with no other signal - the state a `migrate` / `apps update` killed mid-run (a closed terminal, a `kill`, an OOM kill, a reboot) or a failed `bench update` leaves behind.
2181
+ `status` reads maintenance mode for every site of every bench it reports, the way Frappe answers it, not from one file:
2182
+ the bench's `sites/common_site_config.json` first, with each site's own `site_config.json` overriding it;
2183
+ and, when the web server is `bench serve` with a default site (`bench use`), every request is answered as that default site, so a site whose own file says `maintenance_mode: 0` still answers 503 while the default site inherits a bench-wide 1.
2184
+ When something is in maintenance, `status` also asks each site over HTTP (`/api/method/ping` with its `Host`), because Frappe can keep answering from its config cache for up to a minute after a file changes.
2185
+ It prints one `MAINTENANCE MODE` fault per bench (even without `-v`) naming the affected sites, the write that holds them (the bench-wide `maintenance_mode`, with `pause_scheduler` when `bench update` set both, or a site's own flag), and who set it: cwcli records the maintenance mode it turns on, so a flag left by an interrupted cwcli `migrate` or `apps update` names that operation and its job, while a flag with no record is reported as possibly set on purpose.
2186
+ On an interactive terminal `status` then asks whether to take the sites out of maintenance mode.
2187
+ `--clear-maintenance` does it without asking (the way for scripts and agents; a non-TTY is never asked and the fault names this flag).
2188
+ Taking them out clears the bench-wide flags with `bench set-config --global --parse <flag> 0` (resuming a scheduler paused with them) and each site's own flag with `set-maintenance-mode off`, then waits until no site answers Frappe's ping with 503 (SessionStopped) any more; `--clear-maintenance` exits 1 if a site still does.
2189
+ A site that does not answer at all, because its web server is not running, is not waited for: cwcli reports that it could not check that site.
2190
+ It is never offered, and `--clear-maintenance` refuses with exit 1, while anything that sets maintenance mode still runs on the bench: the cwcli operation that turned it on, an in-container `bench migrate`/`update`/`restore`, or a held migrate lock.
2191
+ `cwcli axi status` carries the per-bench report as `maintenance` (with `down`, `bench_flags`, `owners` and `busy`) beside `maintenance_mode`, plus the `status.maintenance_mode` and `status.scheduler_paused` warnings.
2192
+ The web UI shows the same fault on the instance, bench and site pages and the Sites list, with a button that runs the same clear as a tracked job.
2180
2193
  These reads are skipped in the `--watch` loop (which makes no web probe).
2181
2194
 
2182
2195
  **Per-bench, per-process detail (stderr):** one sub-block per bench, headed by its
@@ -2262,7 +2275,7 @@ While the daemon runs it polls process health for every running instance; the we
2262
2275
  That check is a bare TCP connect to the bench's web port, not an HTTP request, so polling writes nothing to the bench's web access log; the Bench page shows its verdict as `Listening` or `Not listening` next to the web port, or `unknown` while the latest health probe has failed and the page is showing the last successful probe's readings.
2263
2276
  It refuses any request whose `Host` is not this machine, so another site in your browser cannot read or drive it.
2264
2277
 
2265
- **What it can do:** everything the CLI reads (`ls`, `status`, `inspect`, `where`, `doctor`, `logs`, `axi url`, `config show`) and the safe lifecycle set: start, stop and restart an instance or a bench, restart one process, set a bench label, unlock a site, take a site out of maintenance mode, widen the port range (the same core confirmation `cwcli scale` asks for, typed back as the instance name), and check out an app ref without `--reset`.
2278
+ **What it can do:** everything the CLI reads (`ls`, `status`, `inspect`, `where`, `doctor`, `logs`, `axi url`, `config show`) and the safe lifecycle set: start, stop and restart an instance or a bench, restart one process, set a bench label, unlock a site, take sites out of maintenance mode, widen the port range (the same core confirmation `cwcli scale` asks for, typed back as the instance name), and check out an app ref without `--reset`.
2266
2279
  These lifecycle changes run as jobs too, so their steps and outcome remain visible after navigation.
2267
2280
  When an action needs a stopped instance running, the page offers to start it first: an action on a bench, site or app starts that bench (`cwcli start <project> --bench <n>`), so a multi-bench instance never asks which bench, and an instance-level action starts only the containers, never a bench.
2268
2281
  Remove bench on a stopped instance starts only its containers, and stops them again if the removal does not complete.
@@ -2272,6 +2285,8 @@ The long-job forms cover `init`, `apps install`, `apps update`, `apps checkout`,
2272
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`.
2273
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.
2274
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`).
2275
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.
2276
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.
2277
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.
@@ -2330,6 +2345,7 @@ The host transport is the exception: different hosts may use different transport
2330
2345
  See `integrations` below for the terminal commands, the declaration a repository needs, and where the code is installed.
2331
2346
 
2332
2347
  **Publishing a site at its own domain:** with Cloudflare DNS, Nginx Proxy Manager or both turned on, **New site** offers "Publish it at a public address".
2348
+ A site publishes with the integrations of the machine its instance is on: a remote host's instance (see `remote` below) uses that host's own Cloudflare DNS and Nginx Proxy Manager, set up from the hub's Settings > Integrations with that host picked, and the dialog says so.
2333
2349
  With Cloudflare on, the site name becomes a name plus a zone the token can see, so a typo cannot land in another zone, and a read-only preflight checks each part before anything is created: the bench's published port, whether the name is free in the zone (or already cwcli's), and whether a proxy host cwcli can see already uses it; with Nginx Proxy Manager alone it shows what the name resolves to now.
2334
2350
  A failing preflight row keeps **Create site** disabled, and the `new-site` job runs the same preflight first, so a name that cannot be published never leaves a site behind.
2335
2351
  The site is created exactly as without publishing; as soon as it exists a second job, **Publish site** (the card follows it as "part 2 of 2"), writes the A record, makes the proxy host, requests the certificate, then checks that `https://<site>/api/method/ping` answers.
@@ -2457,10 +2473,17 @@ An action on a remote instance goes to that machine's own daemon through the hub
2457
2473
  The link states: `connected` (live, actions allowed), `connecting`, `unreachable` (the host stopped answering: its instances keep their last-known state as `unknown` with a last-seen time, actions are disabled, and nothing is started, stopped or retried because a host went quiet), `cwcli not running there`, `no longer accepts this hub`, `host key changed`, `different cwcli version` (reads work, actions wait until both sides speak the same web UI protocol; the message names the side to update), `integration off` and `service account only` (on a shared install, a group member's own web UI on the shared home: remote hosts run from the service account's web UI, the only one that can read the hub key, so this one lists them and dials none; a member opted back to a private home with `CWCLI_HOME` runs a hub of its own).
2458
2474
  A dropped packet never flashes a host to unknown: one immediate re-probe decides.
2459
2475
  A remote instance's page has the same live process readings and web check as a local one: while a tab has it open, the hub holds that host's stream with the instance as its focus.
2460
- Backups, schedules, the apps catalog, publishing a site at a public address and the restore and transfer dialogs stay each machine's own; a remote site's backups show that machine's sets with Back up now, Verify, Download and Delete.
2476
+ Backups, schedules, the apps catalog and the restore and transfer dialogs stay each machine's own; a remote site's backups show that machine's sets with Back up now, Verify, Download and Delete.
2461
2477
  Drop site on a remote site asks that machine, as the dialog opens, whether the site is published there, and offers "Also unpublish it" (ticked when it is), so the unpublish runs on the machine that published it.
2462
2478
  When that machine cannot be read, or the page does not know the site's bench yet, the box is offered unticked with a note that its publication state could not be read.
2463
2479
 
2480
+ **Each remote host's own edge, set up from the hub.** A remote runs its own Nginx Proxy Manager and Cloudflare setup, and the hub is where it is managed: Settings > Integrations has a machine picker (shown once a host is added), and with a remote picked the panel lists that host's OWN official integrations and sets them up through the hub's forward.
2481
+ Test connection, Detect (the remote's own container discovery) and Test and turn on all run on that host; the secrets typed are stored encrypted on that host and never on the hub, which relays only the setup form and the test result, and no second store exists on the hub.
2482
+ Changing a machine's integrations is an Admin's act there, so the remote must have granted the hub the Admin cap: with an Operator (or Viewer) grant the panel says that configuring that host's integrations needs the Admin cap and names the exact command its owner runs there, `cwcli remote allow --hub <hub name> --key "<hub public key>" --max-role admin` (which replaces the earlier grant), with a Check now button for when it has been run.
2483
+ A host whose link is not connected (unreachable, host key changed, cwcli not running there, a different cwcli version, no longer accepting the hub) is named with the same advice as the Remote hosts panel, never a silent empty list.
2484
+ Community integrations are installed on each machine by its own Admin; the picker never offers them for a remote.
2485
+ Publishing then follows the instance: on a remote instance, New site's "Publish it at a public address" uses that host's own Cloudflare DNS and Nginx Proxy Manager (its zones, address, access lists and preflight are read from that host, and the sentence under the box names it), the Sites list's Public address column and globe menu show and drive each remote site's publication from that host's own store (Publish, Retry what is missing, Check for drift and Unpublish run there), the site's page states whose integrations published it, and a publish job's page shows "Integration settings: <host>'s own".
2486
+
2464
2487
  **Security.** The hub forwards only `/api/v1/` paths, never a remote's sign-in, stream or hosts routes, and relays every answer as DATA: JSON, a download as an attachment or an image under a sandboxing policy, each with `X-Content-Type-Options: nosniff`, never a cookie and never a page (a remote can never serve code into the hub's origin).
2465
2488
  A remote that is itself a hub keeps its own remote hosts to itself: the stream it serves through its bridge carries its own instances and jobs, never its hosts.
2466
2489
  The hub builds every `ssh` argument list itself, validates the host and user it was given and puts `--` before them.
@@ -2595,6 +2618,7 @@ when the tool is signed in to none of them; a signed-out host beside a
2595
2618
  signed-in one is listed with its `auth login --hostname` command.
2596
2619
  An enabled but stopped auto-inspect or credential-bridge daemon is a `warn`
2597
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`).
2598
2622
 
2599
2623
  **Exit codes:** `0` when every check is pass/warn (a warning never blocks -
2600
2624
  doctor is a chainable preflight gate), `1` when any check fails.
@@ -2840,7 +2864,15 @@ These verbs remain as hidden aliases with byte-identical behavior plus a one-lin
2840
2864
 
2841
2865
  **Boot-unit note:** startup units installed before this change (systemd/LaunchAgent/schtasks) exec `cwcli config auto-inspect start` verbatim.
2842
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.
2843
- Re-running `cwcli config auto-inspect enable --startup` rewrites the unit against the current executable path.
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).
2844
2876
 
2845
2877
  ### `self-update` - Upgrade cwcli Itself
2846
2878
 
@@ -2983,6 +3015,28 @@ cwcli ls --json | jq '.[] | select(.status=="running")'
2983
3015
  cwcli inspect frappe-one --json | jq '.bench_instances[0].sites'
2984
3016
  ```
2985
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
+
2986
3040
  ### For agents: the `cwcli axi` surface
2987
3041
 
2988
3042
  `cwcli axi` is an agent-facing surface built for autonomous tools that drive cwcli through shell execution.
@@ -3216,7 +3270,7 @@ These are agent-only for now: there is no human `cwcli migrate`, `cwcli run-test
3216
3270
 
3217
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`.
3218
3272
 
3219
- `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.
3220
3274
 
3221
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.
3222
3276
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "caffeinated-whale-cli"
7
- version = "3.6.1"
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
- "typer>=0.16.0",
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 integer.",
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]Repaired the boot unit so it no longer stops a running daemon.[/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]Repaired the boot unit so it no longer stops a running daemon.[/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
- result = core_ai.start()
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
  )