machineconfig 7.98__py3-none-any.whl → 8.61__py3-none-any.whl

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 (353) hide show
  1. machineconfig/cluster/remote/run_cluster.py +1 -1
  2. machineconfig/cluster/remote/run_remote.py +1 -1
  3. machineconfig/cluster/sessions_managers/utils/maker.py +10 -8
  4. machineconfig/cluster/sessions_managers/wt_local.py +1 -1
  5. machineconfig/cluster/sessions_managers/wt_local_manager.py +1 -1
  6. machineconfig/cluster/sessions_managers/zellij_local.py +1 -1
  7. machineconfig/cluster/sessions_managers/zellij_local_manager.py +1 -1
  8. machineconfig/jobs/installer/checks/check_installations.py +133 -0
  9. machineconfig/jobs/installer/checks/install_utils.py +132 -0
  10. machineconfig/jobs/installer/checks/report_utils.py +39 -0
  11. machineconfig/jobs/installer/checks/vt_utils.py +89 -0
  12. machineconfig/jobs/installer/installer_data.json +271 -152
  13. machineconfig/jobs/installer/linux_scripts/docker.sh +6 -9
  14. machineconfig/jobs/installer/package_groups.py +11 -9
  15. machineconfig/jobs/installer/{custom → python_scripts}/boxes.py +1 -2
  16. machineconfig/jobs/installer/{custom_dev → python_scripts}/brave.py +1 -1
  17. machineconfig/jobs/installer/{custom_dev → python_scripts}/code.py +10 -8
  18. machineconfig/jobs/installer/{custom → python_scripts}/hx.py +30 -13
  19. machineconfig/jobs/installer/{custom_dev → python_scripts}/nerdfont.py +1 -1
  20. machineconfig/jobs/installer/{custom_dev → python_scripts}/nerfont_windows_helper.py +6 -5
  21. machineconfig/jobs/installer/{custom_dev → python_scripts}/sysabc.py +28 -43
  22. machineconfig/jobs/installer/{custom_dev → python_scripts}/wezterm.py +1 -1
  23. machineconfig/jobs/installer/{custom → python_scripts}/yazi.py +39 -19
  24. machineconfig/jobs/scripts/powershell_scripts/cmatrix.ps1 +52 -0
  25. machineconfig/jobs/scripts_dynamic/a.py +428 -0
  26. machineconfig/logger.py +1 -1
  27. machineconfig/profile/create_helper.py +21 -10
  28. machineconfig/profile/create_links.py +77 -20
  29. machineconfig/profile/create_links_export.py +63 -58
  30. machineconfig/profile/create_shell_profile.py +14 -0
  31. machineconfig/profile/mapper_data.toml +45 -0
  32. machineconfig/profile/mapper_dotfiles.toml +249 -0
  33. machineconfig/scripts/python/agents.py +76 -171
  34. machineconfig/scripts/python/ai/initai.py +3 -1
  35. machineconfig/scripts/python/ai/scripts/__init__.py +1 -0
  36. machineconfig/scripts/python/ai/scripts/lint_and_type_check.ps1 +2 -0
  37. machineconfig/scripts/python/ai/scripts/lint_and_type_check.sh +8 -6
  38. machineconfig/scripts/python/ai/solutions/claude/claude.py +1 -1
  39. machineconfig/scripts/python/ai/solutions/cline/cline.py +1 -1
  40. machineconfig/scripts/python/ai/solutions/copilot/github_copilot.py +1 -1
  41. machineconfig/scripts/python/ai/solutions/copilot/instructions/python/dev.instructions.md +29 -0
  42. machineconfig/scripts/python/ai/solutions/crush/crush.py +1 -1
  43. machineconfig/scripts/python/ai/solutions/cursor/cursors.py +1 -1
  44. machineconfig/scripts/python/ai/solutions/gemini/gemini.py +1 -1
  45. machineconfig/scripts/python/ai/solutions/gemini/settings.json +3 -0
  46. machineconfig/scripts/python/ai/{solutions → utils}/generic.py +2 -15
  47. machineconfig/scripts/python/ai/utils/vscode_tasks.py +6 -3
  48. machineconfig/scripts/python/cloud.py +58 -11
  49. machineconfig/scripts/python/croshell.py +4 -155
  50. machineconfig/scripts/python/devops.py +57 -38
  51. machineconfig/scripts/python/devops_navigator.py +17 -3
  52. machineconfig/scripts/python/fire_jobs.py +10 -193
  53. machineconfig/scripts/python/ftpx.py +5 -224
  54. machineconfig/scripts/python/graph/cli_graph.json +8743 -0
  55. machineconfig/scripts/python/{env_manager → helper_env}/path_manager_tui.py +2 -2
  56. machineconfig/scripts/python/{env_manager → helpers/helper_env}/env_manager_tui.py +1 -1
  57. machineconfig/scripts/python/helpers/helper_env/path_manager_tui.py +228 -0
  58. machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/agentic_frameworks/fire_crush.py +1 -1
  59. machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/agentic_frameworks/fire_cursor_agents.py +1 -1
  60. machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/agentic_frameworks/fire_gemini.py +1 -1
  61. machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/agentic_frameworks/fire_qwen.py +1 -1
  62. machineconfig/scripts/python/helpers/helpers_agents/agents_impl.py +168 -0
  63. machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/fire_agents_help_launch.py +10 -7
  64. machineconfig/scripts/python/helpers/helpers_agents/privacy/configs/aichat/config.yaml +5 -0
  65. machineconfig/scripts/python/helpers/helpers_agents/privacy/configs/aider/.aider.conf.yml +2 -0
  66. machineconfig/scripts/python/helpers/helpers_agents/privacy/configs/copilot/config.yml +1 -0
  67. machineconfig/scripts/python/helpers/helpers_agents/privacy/configs/crush/crush.json +10 -0
  68. machineconfig/scripts/python/helpers/helpers_agents/privacy/configs/gemini/settings.json +12 -0
  69. machineconfig/scripts/python/helpers/helpers_agents/privacy/privacy.py +109 -0
  70. machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/templates/template.sh +3 -1
  71. machineconfig/scripts/python/{helpers_cloud → helpers/helpers_cloud}/cloud_copy.py +6 -6
  72. machineconfig/scripts/python/{helpers_cloud → helpers/helpers_cloud}/cloud_mount.py +10 -5
  73. machineconfig/scripts/python/{helpers_cloud → helpers/helpers_cloud}/cloud_sync.py +4 -4
  74. machineconfig/scripts/python/{helpers_cloud → helpers/helpers_cloud}/helpers2.py +1 -1
  75. machineconfig/scripts/python/helpers/helpers_croshell/croshell_impl.py +229 -0
  76. machineconfig/scripts/python/{helpers_croshell → helpers/helpers_croshell}/scheduler.py +4 -4
  77. machineconfig/scripts/python/{helpers_croshell → helpers/helpers_croshell}/start_slidev.py +7 -6
  78. machineconfig/scripts/python/helpers/helpers_devops/backup_config.py +149 -0
  79. machineconfig/scripts/python/helpers/helpers_devops/cli_backup_retrieve.py +262 -0
  80. machineconfig/scripts/python/helpers/helpers_devops/cli_config.py +130 -0
  81. machineconfig/scripts/python/helpers/helpers_devops/cli_config_dotfile.py +274 -0
  82. machineconfig/scripts/python/helpers/helpers_devops/cli_config_mount.py +77 -0
  83. machineconfig/scripts/python/helpers/helpers_devops/cli_data.py +71 -0
  84. machineconfig/scripts/python/helpers/helpers_devops/cli_nw.py +285 -0
  85. machineconfig/scripts/python/helpers/helpers_devops/cli_repos.py +274 -0
  86. machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/cli_self.py +84 -33
  87. machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/cli_share_file.py +44 -30
  88. machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/cli_share_server.py +26 -43
  89. machineconfig/scripts/python/helpers/helpers_devops/cli_share_temp.py +69 -0
  90. machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/cli_share_terminal.py +12 -6
  91. machineconfig/scripts/python/helpers/helpers_devops/cli_ssh.py +167 -0
  92. machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/devops_status.py +12 -6
  93. machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/devops_update_repos.py +1 -1
  94. machineconfig/scripts/python/{interactive.py → helpers/helpers_devops/interactive.py} +64 -50
  95. machineconfig/scripts/python/helpers/helpers_devops/mount_helpers/commands.py +25 -0
  96. machineconfig/scripts/python/helpers/helpers_devops/mount_helpers/device_entry.py +17 -0
  97. machineconfig/scripts/python/helpers/helpers_devops/mount_helpers/devices.py +17 -0
  98. machineconfig/scripts/python/helpers/helpers_devops/mount_helpers/linux.py +103 -0
  99. machineconfig/scripts/python/helpers/helpers_devops/mount_helpers/macos.py +100 -0
  100. machineconfig/scripts/python/helpers/helpers_devops/mount_helpers/selection.py +47 -0
  101. machineconfig/scripts/python/helpers/helpers_devops/mount_helpers/utils.py +28 -0
  102. machineconfig/scripts/python/helpers/helpers_devops/mount_helpers/windows.py +91 -0
  103. machineconfig/scripts/python/helpers/helpers_devops/run_script.py +197 -0
  104. machineconfig/scripts/python/helpers/helpers_devops/themes/choose_starship_theme.ps1 +41 -0
  105. machineconfig/scripts/python/helpers/helpers_devops/themes/choose_starship_theme.sh +48 -0
  106. machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/themes/choose_wezterm_theme.py +3 -3
  107. machineconfig/scripts/python/{helpers_fire_command → helpers/helpers_fire_command}/file_wrangler.py +1 -0
  108. machineconfig/scripts/python/{helpers_fire_command → helpers/helpers_fire_command}/fire_jobs_args_helper.py +1 -0
  109. machineconfig/scripts/python/helpers/helpers_fire_command/fire_jobs_impl.py +233 -0
  110. machineconfig/scripts/python/{helpers_fire_command → helpers/helpers_fire_command}/fire_jobs_route_helper.py +3 -3
  111. machineconfig/scripts/python/helpers/helpers_fire_command/fire_jobs_streamlit_helper.py +0 -0
  112. machineconfig/scripts/python/helpers/helpers_msearch/msearch_impl.py +248 -0
  113. machineconfig/scripts/python/{helpers_msearch → helpers/helpers_msearch}/scripts_linux/fzfg +4 -3
  114. machineconfig/scripts/python/helpers/helpers_msearch/scripts_linux/search_with_context.sh +48 -0
  115. machineconfig/scripts/python/{helpers_msearch → helpers/helpers_msearch}/scripts_windows/fzfg.ps1 +2 -7
  116. machineconfig/scripts/python/helpers/helpers_navigator/__init__.py +20 -0
  117. machineconfig/scripts/python/helpers/helpers_navigator/cli_graph_loader.py +234 -0
  118. machineconfig/scripts/python/{helpers_navigator → helpers/helpers_navigator}/command_builder.py +61 -13
  119. machineconfig/scripts/python/helpers/helpers_navigator/command_detail.py +153 -0
  120. machineconfig/scripts/python/helpers/helpers_navigator/command_tree.py +45 -0
  121. machineconfig/scripts/python/{helpers_navigator → helpers/helpers_navigator}/data_models.py +18 -11
  122. machineconfig/scripts/python/{helpers_navigator → helpers/helpers_navigator}/main_app.py +5 -5
  123. machineconfig/scripts/python/helpers/helpers_network/__init__.py +0 -0
  124. machineconfig/scripts/python/{helpers_network → helpers/helpers_network}/address.py +52 -10
  125. machineconfig/scripts/python/helpers/helpers_network/address_switch.py +78 -0
  126. machineconfig/scripts/python/helpers/helpers_network/ftpx_impl.py +276 -0
  127. machineconfig/scripts/python/helpers/helpers_network/ssh/__init__.py +0 -0
  128. machineconfig/scripts/python/helpers/helpers_network/ssh/ssh_add_identity.py +73 -0
  129. machineconfig/scripts/python/helpers/helpers_network/ssh/ssh_add_key_windows.py +23 -0
  130. machineconfig/scripts/python/helpers/helpers_network/ssh/ssh_add_ssh_key.py +169 -0
  131. machineconfig/scripts/python/helpers/helpers_network/ssh/ssh_cloud_init.py +33 -0
  132. machineconfig/scripts/python/helpers/helpers_network/ssh/ssh_debug_linux.py +338 -0
  133. machineconfig/scripts/python/helpers/helpers_network/ssh/ssh_debug_linux_utils.py +35 -0
  134. machineconfig/scripts/python/helpers/helpers_network/ssh/ssh_debug_windows.py +245 -0
  135. machineconfig/scripts/python/helpers/helpers_network/ssh/ssh_debug_windows_utils.py +34 -0
  136. machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/action.py +3 -3
  137. machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/action_helper.py +3 -3
  138. machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/cloud_repo_sync.py +120 -37
  139. machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/grource.py +3 -2
  140. machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/record.py +33 -13
  141. machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/repo_analyzer_2.py +63 -19
  142. machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/update.py +0 -6
  143. machineconfig/scripts/python/helpers/helpers_search/script_help.py +81 -0
  144. machineconfig/scripts/python/helpers/helpers_sessions/__init__.py +0 -0
  145. machineconfig/scripts/python/helpers/helpers_sessions/attach_impl.py +87 -0
  146. machineconfig/scripts/python/helpers/helpers_sessions/sessions_impl.py +114 -0
  147. machineconfig/scripts/python/{helpers_sessions → helpers/helpers_sessions}/sessions_multiprocess.py +1 -2
  148. machineconfig/scripts/python/helpers/helpers_sessions/utils.py +69 -0
  149. machineconfig/scripts/python/{helpers_utils → helpers/helpers_utils}/download.py +1 -1
  150. machineconfig/scripts/python/{helpers_devops/cli_utils.py → helpers/helpers_utils/pdf.py} +2 -2
  151. machineconfig/scripts/python/{helpers_utils/path.py → helpers/helpers_utils/python.py} +65 -40
  152. machineconfig/scripts/python/helpers/helpers_utils/specs.py +246 -0
  153. machineconfig/scripts/python/mcfg_entry.py +126 -48
  154. machineconfig/scripts/python/msearch.py +16 -61
  155. machineconfig/scripts/python/sessions.py +137 -191
  156. machineconfig/scripts/python/utils.py +104 -24
  157. machineconfig/settings/atuin/config.toml +294 -0
  158. machineconfig/settings/atuin/themes/catppuccin-mocha-mauve.toml +12 -0
  159. machineconfig/settings/linters/.ruff.toml +2 -1
  160. machineconfig/settings/mprocs/windows/mprocs.yaml +2 -2
  161. machineconfig/settings/shells/bash/init.sh +6 -10
  162. machineconfig/settings/shells/nushell/config.nu +23 -1
  163. machineconfig/settings/shells/nushell/env.nu +22 -48
  164. machineconfig/settings/shells/nushell/init.nu +64 -240
  165. machineconfig/settings/shells/pwsh/init.ps1 +71 -5
  166. machineconfig/settings/shells/pwsh/search_pwsh_history.ps1 +99 -0
  167. machineconfig/settings/shells/wezterm/wezterm.lua +4 -0
  168. machineconfig/settings/shells/wt/settings.json +31 -37
  169. machineconfig/settings/shells/zsh/init.sh +25 -5
  170. machineconfig/settings/television/cable_unix/bash-history.toml +1 -1
  171. machineconfig/settings/television/cable_windows/pwsh-history.toml +1 -1
  172. machineconfig/settings/tv/config.toml +234 -0
  173. machineconfig/settings/tv/themes/catppuccin-mocha-sky.toml +22 -0
  174. machineconfig/settings/wsl/.wslconfig +5 -30
  175. machineconfig/settings/wt/__init__.py +0 -0
  176. machineconfig/settings/yazi/yazi_linux.toml +18 -8
  177. machineconfig/settings/zellij/__init__.py +0 -0
  178. machineconfig/settings/zellij/config.kdl +0 -295
  179. machineconfig/settings/zellij/layouts/__init__.py +0 -0
  180. machineconfig/settings/zellij/layouts/st.kdl +39 -9
  181. machineconfig/settings/zellij/layouts/st2.kdl +6 -2
  182. machineconfig/setup_linux/__init__.py +0 -1
  183. machineconfig/setup_linux/apps_desktop.sh +8 -27
  184. machineconfig/setup_linux/web_shortcuts/interactive.sh +10 -10
  185. machineconfig/setup_linux/web_shortcuts/live_from_github.sh +3 -0
  186. machineconfig/setup_mac/__init__.py +0 -2
  187. machineconfig/setup_windows/__init__.py +2 -5
  188. machineconfig/setup_windows/web_shortcuts/interactive.ps1 +14 -13
  189. machineconfig/setup_windows/web_shortcuts/live_from_github.ps1 +4 -3
  190. machineconfig/setup_windows/web_shortcuts/quick_init.ps1 +3 -3
  191. machineconfig/type_hinting/sql/__init__.py +1 -0
  192. machineconfig/type_hinting/sql/base.py +216 -0
  193. machineconfig/type_hinting/sql/core_schema.py +64 -0
  194. machineconfig/type_hinting/sql/core_schema_typeddict.py +41 -0
  195. machineconfig/type_hinting/sql/typeddict_codegen.py +222 -0
  196. machineconfig/type_hinting/typedict/__init__.py +1 -0
  197. machineconfig/type_hinting/typedict/ast_utils.py +130 -0
  198. machineconfig/type_hinting/typedict/generator_helpers.py +319 -0
  199. machineconfig/type_hinting/typedict/generators.py +231 -0
  200. machineconfig/type_hinting/typedict/polars_schema.py +24 -0
  201. machineconfig/type_hinting/typedict/polars_schema_typeddict.py +63 -0
  202. machineconfig/utils/accessories.py +24 -0
  203. machineconfig/utils/code.py +78 -33
  204. machineconfig/utils/files/ascii_art.py +10 -14
  205. machineconfig/utils/files/headers.py +3 -5
  206. machineconfig/utils/files/read.py +8 -1
  207. machineconfig/utils/installer_utils/github_release_bulk.py +11 -91
  208. machineconfig/utils/installer_utils/github_release_scraper.py +99 -0
  209. machineconfig/utils/installer_utils/install_from_url.py +1 -1
  210. machineconfig/utils/installer_utils/installer_class.py +12 -4
  211. machineconfig/utils/installer_utils/installer_cli.py +7 -17
  212. machineconfig/utils/installer_utils/installer_helper.py +52 -36
  213. machineconfig/utils/installer_utils/installer_locator_utils.py +15 -25
  214. machineconfig/utils/installer_utils/installer_runner.py +4 -4
  215. machineconfig/utils/io.py +25 -8
  216. machineconfig/utils/meta.py +6 -4
  217. machineconfig/utils/options.py +49 -19
  218. machineconfig/utils/options_utils/__init__.py +0 -0
  219. machineconfig/utils/options_utils/options_tv_linux.py +211 -0
  220. machineconfig/utils/options_utils/options_tv_windows.py +88 -0
  221. machineconfig/utils/options_utils/tv_options.py +37 -0
  222. machineconfig/utils/path_extended.py +8 -7
  223. machineconfig/utils/procs.py +35 -27
  224. machineconfig/utils/scheduler.py +8 -2
  225. machineconfig/utils/schemas/fire_agents/fire_agents_input.py +1 -1
  226. machineconfig/utils/schemas/layouts/layout_types.py +10 -0
  227. machineconfig/utils/source_of_truth.py +7 -1
  228. machineconfig/utils/ssh.py +73 -23
  229. machineconfig/utils/ssh_utils/abc.py +1 -1
  230. machineconfig/utils/ssh_utils/copy_from_here.py +19 -14
  231. machineconfig/utils/ssh_utils/copy_to_here.py +2 -1
  232. machineconfig/utils/ssh_utils/utils.py +23 -7
  233. machineconfig/utils/ssh_utils/wsl.py +107 -170
  234. machineconfig/utils/ssh_utils/wsl_helper.py +217 -0
  235. machineconfig/utils/upgrade_packages.py +4 -8
  236. {machineconfig-7.98.dist-info → machineconfig-8.61.dist-info}/METADATA +30 -23
  237. machineconfig-8.61.dist-info/RECORD +539 -0
  238. {machineconfig-7.98.dist-info → machineconfig-8.61.dist-info}/entry_points.txt +0 -1
  239. machineconfig/jobs/installer/check_installations.py +0 -248
  240. machineconfig/profile/backup.toml +0 -49
  241. machineconfig/profile/mapper.toml +0 -263
  242. machineconfig/scripts/linux/other/share_cloud.sh +0 -64
  243. machineconfig/scripts/linux/other/share_nfs +0 -49
  244. machineconfig/scripts/linux/other/start_docker +0 -23
  245. machineconfig/scripts/linux/other/switch_ip +0 -20
  246. machineconfig/scripts/python/helpers/run_py_script.py +0 -79
  247. machineconfig/scripts/python/helpers/tmp_py_scripts/a.py +0 -26
  248. machineconfig/scripts/python/helpers_devops/cli_config.py +0 -105
  249. machineconfig/scripts/python/helpers_devops/cli_config_dotfile.py +0 -89
  250. machineconfig/scripts/python/helpers_devops/cli_data.py +0 -25
  251. machineconfig/scripts/python/helpers_devops/cli_nw.py +0 -214
  252. machineconfig/scripts/python/helpers_devops/cli_repos.py +0 -215
  253. machineconfig/scripts/python/helpers_devops/devops_backup_retrieve.py +0 -80
  254. machineconfig/scripts/python/helpers_devops/themes/choose_starship_theme.bash +0 -3
  255. machineconfig/scripts/python/helpers_navigator/__init__.py +0 -20
  256. machineconfig/scripts/python/helpers_navigator/command_detail.py +0 -44
  257. machineconfig/scripts/python/helpers_navigator/command_tree.py +0 -620
  258. machineconfig/scripts/python/helpers_network/devops_add_identity.py +0 -82
  259. machineconfig/scripts/python/helpers_network/devops_add_ssh_key.py +0 -153
  260. machineconfig/scripts/python/helpers_network/mount_drive +0 -128
  261. machineconfig/scripts/python/helpers_network/mount_nfs +0 -49
  262. machineconfig/scripts/python/helpers_network/mount_nfs.py +0 -85
  263. machineconfig/scripts/python/helpers_network/mount_nw_drive +0 -61
  264. machineconfig/scripts/python/helpers_network/mount_nw_drive.py +0 -48
  265. machineconfig/scripts/python/helpers_network/mount_smb +0 -3
  266. machineconfig/scripts/python/helpers_network/mount_ssh.py +0 -64
  267. machineconfig/scripts/python/helpers_network/ssh_debug_linux.py +0 -391
  268. machineconfig/scripts/python/helpers_network/ssh_debug_windows.py +0 -338
  269. machineconfig/scripts/python/helpers_network/wsl_windows_transfer.py +0 -67
  270. machineconfig/scripts/python/helpers_repos/entrypoint.py +0 -77
  271. machineconfig/scripts/python/terminal.py +0 -133
  272. machineconfig/scripts/windows/mounts/Restore-ThunderbirdProfile.ps1 +0 -92
  273. machineconfig/scripts/windows/mounts/mount_nfs.ps1 +0 -42
  274. machineconfig/scripts/windows/mounts/mount_nw.ps1 +0 -9
  275. machineconfig/scripts/windows/mounts/mount_smb.ps1 +0 -2
  276. machineconfig/scripts/windows/mounts/mount_ssh.ps1 +0 -13
  277. machineconfig/scripts/windows/mounts/share_cloud.cmd +0 -34
  278. machineconfig/scripts/windows/mounts/share_smb.ps1 +0 -16
  279. machineconfig/settings/zellij/config.orig.kdl +0 -295
  280. machineconfig/setup_linux/others/android.sh +0 -2
  281. machineconfig/setup_linux/others/mint_keyboard_shortcuts.sh +0 -30
  282. machineconfig/setup_linux/ssh/openssh_all.sh +0 -25
  283. machineconfig/setup_linux/ssh/openssh_wsl.sh +0 -38
  284. machineconfig/setup_mac/ssh/openssh_setup.sh +0 -114
  285. machineconfig/setup_windows/others/docker.ps1 +0 -7
  286. machineconfig/setup_windows/others/obs.ps1 +0 -4
  287. machineconfig/setup_windows/others/power_options.ps1 +0 -7
  288. machineconfig/setup_windows/ssh/add-sshkey.ps1 +0 -29
  289. machineconfig/setup_windows/ssh/add_identity.ps1 +0 -11
  290. machineconfig/setup_windows/ssh/openssh-server.ps1 +0 -37
  291. machineconfig/setup_windows/ssh/openssh-server_add_key.ps1 +0 -7
  292. machineconfig/setup_windows/ssh/openssh-server_copy-ssh-id.ps1 +0 -14
  293. machineconfig/utils/options_tv.py +0 -119
  294. machineconfig/utils/tst.py +0 -20
  295. machineconfig-7.98.dist-info/RECORD +0 -504
  296. /machineconfig/{jobs/installer/custom_dev → cluster/sessions_managers/wt_utils/examples}/__init__.py +0 -0
  297. /machineconfig/{scripts/python/helpers_agents → jobs/installer/checks}/__init__.py +0 -0
  298. /machineconfig/{scripts/python/helpers_agents/agentic_frameworks → jobs/installer/python_scripts}/__init__.py +0 -0
  299. /machineconfig/jobs/installer/{custom_dev → python_scripts}/alacritty.py +0 -0
  300. /machineconfig/jobs/installer/{custom_dev → python_scripts}/bypass_paywall.py +0 -0
  301. /machineconfig/jobs/installer/{custom_dev → python_scripts}/cloudflare_warp_cli.py +0 -0
  302. /machineconfig/jobs/installer/{custom_dev → python_scripts}/cursor.py +0 -0
  303. /machineconfig/jobs/installer/{custom_dev → python_scripts}/dubdb_adbc.py +0 -0
  304. /machineconfig/jobs/installer/{custom_dev → python_scripts}/espanso.py +0 -0
  305. /machineconfig/jobs/installer/{custom → python_scripts}/gh.py +0 -0
  306. /machineconfig/jobs/installer/{custom_dev → python_scripts}/goes.py +0 -0
  307. /machineconfig/jobs/installer/{custom_dev → python_scripts}/lvim.py +0 -0
  308. /machineconfig/jobs/installer/{custom_dev → python_scripts}/redis.py +0 -0
  309. /machineconfig/jobs/installer/{custom_dev → python_scripts}/winget.py +0 -0
  310. /machineconfig/jobs/{installer/linux_scripts → scripts/bash_scripts}/lid.sh +0 -0
  311. /machineconfig/{scripts/windows/mounts → jobs/scripts/powershell_scripts}/unlock_bitlocker.ps1 +0 -0
  312. /machineconfig/scripts/python/ai/{solutions/_shared.py → utils/shared.py} +0 -0
  313. /machineconfig/scripts/python/{helpers_cloud → graph}/__init__.py +0 -0
  314. /machineconfig/scripts/python/{helpers_croshell → helpers}/__init__.py +0 -0
  315. /machineconfig/scripts/python/{env_manager → helpers/helper_env}/__init__.py +0 -0
  316. /machineconfig/scripts/python/{env_manager → helpers/helper_env}/path_manager_backend.py +0 -0
  317. /machineconfig/scripts/python/{helpers_devops → helpers/helpers_agents}/__init__.py +0 -0
  318. /machineconfig/scripts/python/{helpers_devops/themes → helpers/helpers_agents/agentic_frameworks}/__init__.py +0 -0
  319. /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/agentic_frameworks/fire_crush.json +0 -0
  320. /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/fire_agents_help_search.py +0 -0
  321. /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/fire_agents_helper_types.py +0 -0
  322. /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/fire_agents_load_balancer.py +0 -0
  323. /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/templates/prompt.txt +0 -0
  324. /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/templates/template.ps1 +0 -0
  325. /machineconfig/scripts/python/{helpers_fire_command → helpers/helpers_cloud}/__init__.py +0 -0
  326. /machineconfig/scripts/python/{helpers_cloud → helpers/helpers_cloud}/cloud_helpers.py +0 -0
  327. /machineconfig/scripts/python/{helpers_cloud → helpers/helpers_cloud}/helpers5.py +0 -0
  328. /machineconfig/scripts/python/{helpers_network → helpers/helpers_croshell}/__init__.py +0 -0
  329. /machineconfig/scripts/python/{helpers_croshell → helpers/helpers_croshell}/crosh.py +0 -0
  330. /machineconfig/scripts/python/{helpers_croshell → helpers/helpers_croshell}/pomodoro.py +0 -0
  331. /machineconfig/scripts/python/{helpers_croshell → helpers/helpers_croshell}/viewer.py +0 -0
  332. /machineconfig/scripts/python/{helpers_croshell → helpers/helpers_croshell}/viewer_template.py +0 -0
  333. /machineconfig/scripts/python/{helpers_sessions → helpers/helpers_devops}/__init__.py +0 -0
  334. /machineconfig/{setup_windows/wt_and_pwsh → scripts/python/helpers/helpers_devops/mount_helpers}/__init__.py +0 -0
  335. /machineconfig/scripts/python/{helpers_devops/themes/choose_starship_theme.ps1 → helpers/helpers_devops/themes/__init__.py} +0 -0
  336. /machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/themes/choose_pwsh_theme.ps1 +0 -0
  337. /machineconfig/scripts/python/{helpers_fire_command/f.py → helpers/helpers_fire_command/__init__.py} +0 -0
  338. /machineconfig/scripts/python/{helpers_fire_command → helpers/helpers_fire_command}/cloud_manager.py +0 -0
  339. /machineconfig/scripts/python/{helpers_fire_command/fire_jobs_streamlit_helper.py → helpers/helpers_fire_command/f.py} +0 -0
  340. /machineconfig/scripts/python/{helpers_msearch → helpers/helpers_msearch}/__init__.py +0 -0
  341. /machineconfig/scripts/python/{helpers_navigator → helpers/helpers_navigator}/search_bar.py +0 -0
  342. /machineconfig/scripts/python/{helpers_network → helpers/helpers_network}/onetimeshare.py +0 -0
  343. /machineconfig/scripts/python/{helpers_network → helpers/helpers_network}/wifi_conn.py +0 -0
  344. /machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/clone.py +0 -0
  345. /machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/repo_analyzer_1.py +0 -0
  346. /machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/sync.py +0 -0
  347. /machineconfig/scripts/python/helpers/{ast_search.py → helpers_search/ast_search.py} +0 -0
  348. /machineconfig/scripts/python/helpers/{qr_code.py → helpers_search/qr_code.py} +0 -0
  349. /machineconfig/scripts/python/helpers/{repo_rag.py → helpers_search/repo_rag.py} +0 -0
  350. /machineconfig/scripts/python/helpers/{symantic_search.py → helpers_search/symantic_search.py} +0 -0
  351. /machineconfig/{setup_windows/wt_and_pwsh → settings/wt}/set_wt_settings.py +0 -0
  352. {machineconfig-7.98.dist-info → machineconfig-8.61.dist-info}/WHEEL +0 -0
  353. {machineconfig-7.98.dist-info → machineconfig-8.61.dist-info}/top_level.txt +0 -0
@@ -1,42 +1,17 @@
1
1
  from pathlib import Path
2
2
  from typing import Optional, Annotated
3
- from machineconfig.scripts.python.helpers_devops.cli_share_file import share_file_receive, share_file_send
3
+ from machineconfig.scripts.python.helpers.helpers_devops.cli_share_file import share_file_receive, share_file_send
4
+ from machineconfig.utils.accessories import display_with_flashy_style
4
5
  import typer
5
6
 
6
7
 
7
- def display_share_url(local_ip_v4: str, port: int, protocol: str = "http") -> None:
8
- """Display a flashy, unmissable share URL announcement."""
9
- from rich.console import Console
10
- from rich.panel import Panel
11
- from rich.text import Text
12
- from rich.align import Align
13
- console = Console()
14
- # Create the main message with styling
15
- url_text = Text(f"{protocol}://{local_ip_v4}:{port}", style="bold bright_cyan underline")
16
- message = Text.assemble(
17
- ("🚀 ", "bright_red"),
18
- ("Share server is now accessible at: ", "bright_white bold"),
19
- url_text,
20
- (" 🚀", "bright_red")
21
- )
22
- # Create a fancy panel with borders and styling
23
- panel = Panel(
24
- Align.center(message),
25
- title="[bold bright_green]🌐 SHARE SERVER READY 🌐[/bold bright_green]",
26
- subtitle="[italic bright_yellow]⚡ Click the link above to access your shared files! ⚡[/italic bright_yellow]",
27
- border_style="bright_magenta",
28
- padding=(1, 2),
29
- expand=False
30
- )
31
- # Print with extra spacing and attention-grabbing elements
32
- console.print(panel)
33
-
34
-
35
8
  def web_file_explorer(
36
9
  path: Annotated[str, typer.Argument(help="Path to the file or directory to share")],
37
10
  port: Annotated[Optional[int], typer.Option("--port", "-p", help="Port to run the share server on (default: 8080)")] = None,
38
11
  username: Annotated[Optional[str], typer.Option("--username", "-u", help="Username for share access (default: current user)")] = None,
12
+ no_auth: Annotated[bool, typer.Option("--no-auth", "-na", help="Disable authentication for share access")] = False,
39
13
  password: Annotated[Optional[str], typer.Option("--password", "-w", help="Password for share access (default: from ~/dotfiles/creds/passwords/quick_password)")] = None,
14
+ bind_address: Annotated[str, typer.Option("--bind", "-a", help="Address to bind the server to")] = "0.0.0.0",
40
15
  over_internet: Annotated[bool, typer.Option("--over-internet", "-i", help="Expose the share server over the internet using ngrok")] = False,
41
16
  backend: Annotated[str, typer.Option("--backend", "-b", help="Backend to use: filebrowser (default), miniserve, qrcp, or easy-sharing")] = "miniserve",
42
17
  ) -> None:
@@ -48,22 +23,22 @@ def web_file_explorer(
48
23
  install_if_missing(which=backend)
49
24
  if over_internet:
50
25
  install_if_missing(which="ngrok")
51
- if username is None:
52
- import getpass
53
- username = getpass.getuser()
54
-
55
- if password is None:
26
+ if password is None and not no_auth:
56
27
  pwd_path = Path.home().joinpath("dotfiles/creds/passwords/quick_password")
57
28
  if pwd_path.exists():
58
29
  password = pwd_path.read_text(encoding="utf-8").strip()
59
- else:
60
- typer.echo(f"⚠️ WARNING: Password not provided and default password file does not exist.\nPath: {pwd_path}\nUsing default password: 'quick_password' (insecure!)", err=True)
61
- raise typer.Exit(code=1)
30
+ if username is None:
31
+ import getpass
32
+ username = getpass.getuser()
33
+ # else:
34
+ # typer.echo(f"⚠️ WARNING: Password not provided and default password file does not exist.\nPath: {pwd_path}\nUsing default password: 'quick_password' (insecure!)", err=True)
35
+ # raise typer.Exit(code=1)
36
+
62
37
 
63
38
  if port is None:
64
39
  port = 8080
65
40
 
66
- import machineconfig.scripts.python.helpers_network.address as helper
41
+ import machineconfig.scripts.python.helpers.helpers_network.address as helper
67
42
  res = helper.select_lan_ipv4(prefer_vpn=False)
68
43
  if res is None:
69
44
  typer.echo("❌ ERROR: Could not determine local LAN IPv4 address for share server.", err=True)
@@ -71,7 +46,7 @@ def web_file_explorer(
71
46
  local_ip_v4 = res
72
47
 
73
48
  protocol = "http"
74
- display_share_url(local_ip_v4, port, protocol)
49
+ display_with_flashy_style(msg=f"{protocol}://{local_ip_v4}:{port}/", title="Local Network Share URL")
75
50
 
76
51
  path_obj = Path(path).resolve()
77
52
  if not path_obj.exists():
@@ -83,14 +58,22 @@ def web_file_explorer(
83
58
  db_path.parent.mkdir(parents=True, exist_ok=True)
84
59
  command = f"""
85
60
  filebrowser users add {username} "{password}" --database {db_path}
86
- filebrowser --address 0.0.0.0 --port {port} --root "{path_obj}" --database {db_path}
61
+ filebrowser --address {bind_address} --port {port} --root "{path_obj}" --database {db_path}
87
62
  """
88
63
  elif backend == "miniserve":
89
- command = f"""miniserve --port {port} --interfaces 0.0.0.0 --auth {username}:{password} --upload-files --mkdir --enable-tar --enable-tar-gz --enable-zip --qrcode "{path_obj}" """
64
+ if username and password:
65
+ auth_line = f"""--auth "{username}:{password}" """
66
+ else:
67
+ auth_line = ""
68
+ command = f"""miniserve --port {port} --interfaces {bind_address} {auth_line} --upload-files --mkdir --enable-tar --enable-tar-gz --enable-zip --qrcode "{path_obj}" """
90
69
  elif backend == "easy-sharing":
91
- command = f"""easy-sharing --port {port} --username {username} --password "{password}" "{path_obj}" """
70
+ if username is None and password is None:
71
+ auth_line = ""
72
+ else:
73
+ auth_line = f'--username "{username}" --password "{password}"'
74
+ command = f"""easy-sharing --port {port} {auth_line} "{path_obj}" """
92
75
  elif backend == "qrcp":
93
- command = f"""qrcp "{path_obj}" """
76
+ command = f"""qrcp --port {port} --bind {bind_address} "{path_obj}" """
94
77
  else:
95
78
  typer.echo(f"❌ ERROR: Unknown backend '{backend}'", err=True)
96
79
  raise typer.Exit(code=1)
@@ -0,0 +1,69 @@
1
+
2
+ import json
3
+ import sys
4
+ from pathlib import Path
5
+ from typing import Annotated
6
+
7
+ import requests
8
+ import typer
9
+
10
+
11
+ TEMP_BASE_URL: str = "https://temp.sh"
12
+ UPLOAD_ENDPOINT: str = f"{TEMP_BASE_URL}/upload"
13
+
14
+
15
+ def _extract_url(response: requests.Response) -> str:
16
+ content_type = response.headers.get("content-type", "")
17
+ text = response.text.strip()
18
+ if "application/json" in content_type:
19
+ try:
20
+ data = response.json()
21
+ except (json.JSONDecodeError, ValueError):
22
+ data = None
23
+ if isinstance(data, dict):
24
+ url_value = data.get("url") or data.get("link") or data.get("download")
25
+ if isinstance(url_value, str) and url_value.strip() != "":
26
+ return url_value.strip()
27
+ for token in text.split():
28
+ if token.startswith("https://") or token.startswith("http://"):
29
+ return token
30
+ return text
31
+
32
+
33
+ def _upload_file_handle(file_name: str, file_handle: object, content_type: str | None) -> str:
34
+ files: dict[str, tuple[str, object, str] | tuple[str, object]]
35
+ if content_type is None:
36
+ files = {"file": (file_name, file_handle)}
37
+ else:
38
+ files = {"file": (file_name, file_handle, content_type)}
39
+ response = requests.post(UPLOAD_ENDPOINT, files=files) # type: ignore[reportArgumentType]
40
+ response.raise_for_status()
41
+ return _extract_url(response=response)
42
+
43
+
44
+ def upload_file(
45
+ file_path: Annotated[Path, typer.Argument(..., exists=True, dir_okay=False, readable=True)],
46
+ ) -> None:
47
+ try:
48
+ with file_path.open("rb") as file_handle:
49
+ url = _upload_file_handle(file_name=file_path.name, file_handle=file_handle, content_type=None)
50
+ except requests.RequestException as exc:
51
+ typer.echo(f"Upload failed: {exc}")
52
+ raise typer.Exit(1)
53
+ typer.echo(url)
54
+
55
+
56
+ def upload_text(
57
+ text: Annotated[str, typer.Argument(...)],
58
+ ) -> None:
59
+ text_value = text
60
+ if text == "-":
61
+ text_value = sys.stdin.read()
62
+ try:
63
+ payload = text_value.encode("utf-8")
64
+ url = _upload_file_handle(file_name="text.txt", file_handle=payload, content_type="text/plain; charset=utf-8")
65
+ except requests.RequestException as exc:
66
+ typer.echo(f"Upload failed: {exc}")
67
+ raise typer.Exit(1)
68
+ typer.echo(url)
69
+
@@ -46,6 +46,7 @@ def share_terminal(
46
46
  port: Annotated[Optional[int], typer.Option("--port", "-p", help="Port to run the terminal server on (default: 7681)")] = None,
47
47
  username: Annotated[Optional[str], typer.Option("--username", "-u", help="Username for terminal access (default: current user)")] = None,
48
48
  password: Annotated[Optional[str], typer.Option("--password", "-w", help="Password for terminal access (default: from ~/dotfiles/creds/passwords/quick_password)")] = None,
49
+ no_auth: Annotated[bool, typer.Option("--no-auth", "-n", help="Disable authentication (not recommended)")] = False,
49
50
  start_command: Annotated[Optional[str], typer.Option("--start-command", "-s", help="Command to run on terminal start (default: bash/powershell)")] = None,
50
51
  ssl: Annotated[bool, typer.Option("--ssl", "-S", help="Enable SSL")] = False,
51
52
  ssl_cert: Annotated[Optional[str], typer.Option("--ssl-cert", "-C", help="SSL certificate file path")] = None,
@@ -61,12 +62,14 @@ def share_terminal(
61
62
  if username is None:
62
63
  import getpass
63
64
  username = getpass.getuser()
64
- if password is None:
65
+ if password is None and not no_auth:
65
66
  pwd_path = Path.home().joinpath("dotfiles/creds/passwords/quick_password")
66
67
  if pwd_path.exists():
67
68
  password = pwd_path.read_text(encoding="utf-8").strip()
68
69
  else:
69
- raise ValueError("Password not provided and default password file does not exist.")
70
+ # raise ValueError("Password not provided and default password file does not exist.")
71
+ print("❌ Error: Password not provided and default password file does not exist.")
72
+ raise typer.Exit(code=1)
70
73
 
71
74
  if port is None:
72
75
  port = 7681 # Default port for ttyd
@@ -83,14 +86,17 @@ def share_terminal(
83
86
  key_path = Path(ssl_key)
84
87
 
85
88
  if not cert_path.exists():
86
- raise FileNotFoundError(f"SSL certificate file not found: {ssl_cert}")
89
+ print(f"❌ Error: SSL certificate file not found: {ssl_cert}")
90
+ raise typer.Exit(code=1)
87
91
  if not key_path.exists():
88
- raise FileNotFoundError(f"SSL key file not found: {ssl_key}")
92
+ print(f"❌ Error: SSL key file not found: {ssl_key}")
93
+ raise typer.Exit(code=1)
89
94
 
90
95
  if ssl_ca and not Path(ssl_ca).exists():
91
- raise FileNotFoundError(f"SSL CA file not found: {ssl_ca}")
96
+ print(f"❌ Error: SSL CA file not found: {ssl_ca}")
97
+ raise typer.Exit(code=1)
92
98
 
93
- import machineconfig.scripts.python.helpers_network.address as helper
99
+ import machineconfig.scripts.python.helpers.helpers_network.address as helper
94
100
  res = helper.select_lan_ipv4(prefer_vpn=False)
95
101
  if res is None:
96
102
  print("❌ Error: Could not determine local LAN IPv4 address for terminal.")
@@ -0,0 +1,167 @@
1
+ import typer
2
+ from typing import Optional, Annotated
3
+
4
+
5
+ def install_ssh_server() -> None:
6
+ """📡 Install SSH server"""
7
+ import platform
8
+ if platform.system() == "Windows":
9
+ script = _get_windows_ssh_server_install_script()
10
+ elif platform.system() == "Linux" or platform.system() == "Darwin":
11
+ script = """
12
+ sudo nala install openssh-server -y || true # try to install first
13
+ # sudo nala purge openssh-server -y
14
+ # sudo nala install openssh-server -y
15
+ echo "✅ FINISHED installing openssh-server."
16
+ """
17
+ else:
18
+ print(f"❌ Error: Platform {platform.system()} is not supported.")
19
+ raise typer.Exit(code=1)
20
+ from machineconfig.utils.code import run_shell_script
21
+ run_shell_script(script=script, display_script=True, clean_env=False)
22
+
23
+
24
+ def change_ssh_port(port: Annotated[int, typer.Option(..., "--port", "-p", help="SSH port to use")] = 2222) -> None:
25
+ """🔌 Change SSH port (Linux/WSL only, default: 2222)"""
26
+ import platform
27
+ if platform.system() != "Linux":
28
+ print("❌ Error: change_ssh_port requires Linux environment")
29
+ raise typer.Exit(code=1)
30
+ from machineconfig.utils.ssh_utils.wsl import change_ssh_port as _change_ssh_port
31
+ _change_ssh_port(port=port)
32
+
33
+
34
+ def _get_windows_ssh_server_install_script(use_winget: bool = True) -> str:
35
+ install_winget = r'''
36
+ Write-Host "Installing OpenSSH via winget..." -ForegroundColor Cyan
37
+ winget install --no-upgrade --Id Microsoft.OpenSSH.Preview --source winget --accept-package-agreements --accept-source-agreements
38
+ $wingetSshPath = "C:\Program Files\OpenSSH"
39
+ $currentMachinePath = [System.Environment]::GetEnvironmentVariable("Path", "Machine")
40
+ if ($currentMachinePath -notlike "*$wingetSshPath*") {
41
+ Write-Host "Adding OpenSSH to system PATH..." -ForegroundColor Yellow
42
+ [System.Environment]::SetEnvironmentVariable("Path", "$currentMachinePath;$wingetSshPath", "Machine")
43
+ }
44
+ $env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
45
+ '''
46
+ install_capability = r'''
47
+ Write-Host "Installing OpenSSH via Windows Capability..." -ForegroundColor Cyan
48
+ Add-WindowsCapability -Online -Name OpenSSH.Server
49
+ Add-WindowsCapability -Online -Name OpenSSH.Client
50
+ $env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
51
+ '''
52
+ configure_sshd_service = r'''
53
+ $serviceExists = Get-Service -Name sshd -ErrorAction SilentlyContinue
54
+ if (-not $serviceExists) {
55
+ Write-Host "sshd service not found, registering manually..." -ForegroundColor Yellow
56
+ sc.exe create sshd binPath= "$sshdExePath" start= auto
57
+ if ($LASTEXITCODE -ne 0) { throw "Failed to create sshd service" }
58
+ }
59
+ Set-Service -Name sshd -StartupType Automatic
60
+ Start-Service sshd
61
+ Write-Host "sshd service started successfully." -ForegroundColor Green
62
+ '''
63
+ configure_firewall = r'''
64
+ $existingRule = Get-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -ErrorAction SilentlyContinue
65
+ if (-not $existingRule) {
66
+ Write-Host "Creating firewall rule for SSH..." -ForegroundColor Yellow
67
+ New-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -DisplayName "OpenSSH SSH Server" -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 -Program $sshdExePath
68
+ } else {
69
+ Write-Host "Firewall rule already exists." -ForegroundColor Green
70
+ }
71
+ '''
72
+ configure_default_shell = r'''
73
+ Write-Host "Configuring default shell for SSH..." -ForegroundColor Cyan
74
+ $shell = "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
75
+ if (-not (Test-Path "HKLM:\SOFTWARE\OpenSSH")) { New-Item -Path "HKLM:\SOFTWARE\OpenSSH" -Force | Out-Null }
76
+ New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value $shell -PropertyType String -Force | Out-Null
77
+ New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShellCommandOption -Value "/c" -PropertyType String -Force | Out-Null
78
+ Write-Host "Default shell set to: $shell" -ForegroundColor Green
79
+ '''
80
+ configure_ssh_agent = r'''
81
+ Write-Host "Configuring ssh-agent service..." -ForegroundColor Cyan
82
+ $agentService = Get-Service -Name ssh-agent -ErrorAction SilentlyContinue
83
+ if ($agentService) {
84
+ Set-Service -Name ssh-agent -StartupType Automatic
85
+ Start-Service ssh-agent -ErrorAction SilentlyContinue
86
+ Write-Host "ssh-agent service configured and started." -ForegroundColor Green
87
+ } else {
88
+ Write-Host "ssh-agent service not available." -ForegroundColor Yellow
89
+ }
90
+ '''
91
+ ensure_ssh_directory = r'''
92
+ $sshDir = Join-Path $env:USERPROFILE ".ssh"
93
+ if (-not (Test-Path $sshDir)) {
94
+ New-Item -ItemType Directory -Path $sshDir -Force | Out-Null
95
+ Write-Host "Created .ssh directory at: $sshDir" -ForegroundColor Green
96
+ }
97
+ '''
98
+ if use_winget:
99
+ install_method = install_winget
100
+ sshd_exe_path = r'C:\Program Files\OpenSSH\sshd.exe'
101
+ else:
102
+ install_method = install_capability
103
+ sshd_exe_path = r'$env:WINDIR\System32\OpenSSH\sshd.exe'
104
+ return fr'''
105
+ $ErrorActionPreference = "Stop"
106
+ try {{ Set-ExecutionPolicy -Scope CurrentUser Bypass -ErrorAction SilentlyContinue }} catch {{ }}
107
+ Write-Host "========================================" -ForegroundColor Magenta
108
+ Write-Host "OpenSSH Server Installation for Windows" -ForegroundColor Magenta
109
+ Write-Host "========================================" -ForegroundColor Magenta
110
+ {install_method}
111
+ $sshdExePath = "{sshd_exe_path}"
112
+ {configure_sshd_service}
113
+ {configure_firewall}
114
+ {configure_default_shell}
115
+ {configure_ssh_agent}
116
+ {ensure_ssh_directory}
117
+ Write-Host "========================================" -ForegroundColor Magenta
118
+ Write-Host "OpenSSH Server installation complete!" -ForegroundColor Green
119
+ Write-Host "SSH config directory: $env:ProgramData\ssh" -ForegroundColor Cyan
120
+ Write-Host "========================================" -ForegroundColor Magenta
121
+ '''
122
+
123
+
124
+ def add_ssh_key(
125
+ path: Annotated[Optional[str], typer.Option(..., help="Path to the public key file")] = None,
126
+ choose: Annotated[bool, typer.Option(..., "--choose", "-c", help="Choose from available public keys in ~/.ssh/*.pub")] = False,
127
+ value: Annotated[bool, typer.Option(..., "--value", "-v", help="Paste the public key content manually")] = False,
128
+ github: Annotated[Optional[str], typer.Option(..., "--github", "-g", help="Fetch public keys from a GitHub username")] = None,
129
+ ) -> None:
130
+ """🔑 Add SSH public key to this machine so its accessible by owner of corresponding private key."""
131
+ import machineconfig.scripts.python.helpers.helpers_network.ssh.ssh_add_ssh_key as helper
132
+ helper.main(pub_path=path, pub_choose=choose, pub_val=value, from_github=github)
133
+
134
+
135
+ def add_ssh_identity() -> None:
136
+ """🗝️ Add SSH identity (private key) to this machine"""
137
+ import machineconfig.scripts.python.helpers.helpers_network.ssh.ssh_add_identity as helper
138
+ helper.main()
139
+
140
+
141
+ def debug_ssh() -> None:
142
+ """🐛 Debug SSH connection"""
143
+ from platform import system
144
+ if system() == "Linux" or system() == "Darwin":
145
+ import machineconfig.scripts.python.helpers.helpers_network.ssh.ssh_debug_linux as helper
146
+ helper.ssh_debug_linux()
147
+ elif system() == "Windows":
148
+ import machineconfig.scripts.python.helpers.helpers_network.ssh.ssh_debug_windows as helper
149
+ helper.ssh_debug_windows()
150
+ else:
151
+ print(f"❌ Error: Platform {system()} is not supported.")
152
+ raise typer.Exit(code=1)
153
+
154
+
155
+ def get_app() -> typer.Typer:
156
+ ssh_app = typer.Typer(help="🔐 SSH subcommands", no_args_is_help=True, add_help_option=True, add_completion=False)
157
+ ssh_app.command(name="install-server", help="📡 [i] Install SSH server")(install_ssh_server)
158
+ ssh_app.command(name="i", help="Install SSH server", hidden=True)(install_ssh_server)
159
+ ssh_app.command(name="change-port", help="🔌 [p] Change SSH port (Linux/WSL only)")(change_ssh_port)
160
+ ssh_app.command(name="p", help="Change SSH port", hidden=True)(change_ssh_port)
161
+ ssh_app.command(name="add-key", help="🔑 [k] Add SSH public key to this machine", no_args_is_help=True)(add_ssh_key)
162
+ ssh_app.command(name="k", help="Add SSH public key to this machine", hidden=True, no_args_is_help=True)(add_ssh_key)
163
+ ssh_app.command(name="add-identity", help="🗝️ [A] Add SSH identity (private key) to this machine")(add_ssh_identity)
164
+ ssh_app.command(name="A", help="Add SSH identity (private key) to this machine", hidden=True)(add_ssh_identity)
165
+ ssh_app.command(name="debug", help="🐛 [d] Debug SSH connection")(debug_ssh)
166
+ ssh_app.command(name="d", help="Debug SSH connection", hidden=True)(debug_ssh)
167
+ return ssh_app
@@ -11,7 +11,7 @@ from rich.table import Table
11
11
  from rich.text import Text
12
12
 
13
13
  from machineconfig.utils.path_extended import PathExtended
14
- from machineconfig.utils.source_of_truth import CONFIG_ROOT, DEFAULTS_PATH, LIBRARY_ROOT
14
+ from machineconfig.utils.source_of_truth import CONFIG_ROOT, DEFAULTS_PATH
15
15
 
16
16
 
17
17
  console = Console()
@@ -137,7 +137,7 @@ def _check_config_files_status() -> dict[str, Any]:
137
137
  from machineconfig.profile.create_links import read_mapper
138
138
 
139
139
  try:
140
- mapper = read_mapper()
140
+ mapper = read_mapper(repo="library")
141
141
  public_configs = list(mapper.get("public", {}).keys())
142
142
  private_configs = list(mapper.get("private", {}).keys())
143
143
 
@@ -205,10 +205,16 @@ def _check_backup_config() -> dict[str, Any]:
205
205
  cloud_config = "Not configured"
206
206
 
207
207
  try:
208
- backup_file = LIBRARY_ROOT.joinpath("profile/backup.toml")
208
+ from machineconfig.scripts.python.helpers.helpers_devops.backup_config import LIBRARY_BACKUP_PATH
209
+ backup_file = LIBRARY_BACKUP_PATH
209
210
  if backup_file.exists():
210
211
  backup_data = tomllib.loads(backup_file.read_text(encoding="utf-8"))
211
- backup_items = list(backup_data.keys())
212
+ backup_items: list[str] = []
213
+ for group_name, entries in backup_data.items():
214
+ if isinstance(entries, dict):
215
+ backup_items.extend([f"{group_name}.{entry_name}" for entry_name in entries.keys()])
216
+ else:
217
+ backup_items.append(str(group_name))
212
218
  backup_items_count = len(backup_items)
213
219
  else:
214
220
  backup_items = []
@@ -466,8 +472,8 @@ def main() -> None:
466
472
  console.print("\n")
467
473
 
468
474
  # system_info = _check_system_info()
469
- # from machineconfig.scripts.python.helpers_devops.devops_system_info import _check_system_info
470
- from machineconfig.scripts.python.helpers_utils.path import get_machine_specs
475
+ # from machineconfig.scripts.python.helpers.helpers_devops.devops_system_info import _check_system_info
476
+ from machineconfig.scripts.python.helpers.helpers_utils.python import get_machine_specs
471
477
  system_info = get_machine_specs()
472
478
  from typing import cast
473
479
  system_info = cast(dict[str, str], system_info)
@@ -9,7 +9,7 @@ from rich.panel import Panel
9
9
  from rich.table import Table
10
10
  from rich.text import Text
11
11
 
12
- from machineconfig.scripts.python.helpers_repos.update import RepositoryUpdateResult, run_uv_sync, update_repository
12
+ from machineconfig.scripts.python.helpers.helpers_repos.update import RepositoryUpdateResult, run_uv_sync, update_repository
13
13
  from machineconfig.utils.io import read_ini
14
14
  from machineconfig.utils.source_of_truth import DEFAULTS_PATH
15
15
 
@@ -2,17 +2,6 @@
2
2
  """
3
3
  Interactive Machine Configuration Setup Script
4
4
 
5
- A Python version of the interactive installation script that uses questionary
6
- for better user experience with checkbox selections.
7
-
8
-
9
- # echo # 📧 Thunderbird Setup Note:
10
- # Run after installing Thunderbird and starting it once:
11
- # cd ~/AppData/Roaming/ThunderBird/Profiles
12
- # $res = ls
13
- # $name = $res[0].Name
14
- # mv $backup_folder $name
15
- #
16
5
 
17
6
 
18
7
  """
@@ -63,31 +52,6 @@ def display_header() -> None:
63
52
  console.print()
64
53
  console.print(Align.center(Text(bug_report, style="dim white")))
65
54
  console.print()
66
- def display_completion_message() -> None:
67
- completion_text = Text("INSTALLATION COMPLETE", style="bold green")
68
- subtitle_text = Text("System setup finished successfully", style="italic green")
69
- console.print(Panel(f"✨ {completion_text}\n{subtitle_text}\n\n🎉 Your system has been configured successfully!\n🔄 You may need to reboot to apply all changes.", border_style="green", padding=(1, 2)))
70
- def display_dotfiles_instructions() -> None:
71
- header_text = Text("DOTFILES MIGRATION", style="bold yellow")
72
- subtitle_text = Text("Configuration transfer options", style="italic yellow")
73
- instructions = """
74
- 🖱️ [bold blue]Method 1: USING MOUSE WITHOUT KB OR BROWSER SHARE[/bold blue]
75
- On original machine, run:
76
- [dim]cd ~/dotfiles/creds/msc
77
- easy-sharing . --password rew --username al[/dim]
78
- Then open brave on new machine to get MouseWithoutBorders password
79
-
80
- 🔐 [bold blue]Method 2: USING SSH[/bold blue]
81
- FROM REMOTE, RUN:
82
- [dim]fptx ~/dotfiles $USER@$(hostname):^ -z
83
- # OR, using IP address if router has not yet found the hostname:
84
- fptx ~/dotfiles $USER@$(hostname -I | awk '{print $1}'):^ -z[/dim]
85
-
86
- ☁️ [bold blue]Method 3: USING INTERNET SECURE SHARE[/bold blue]
87
- [dim]cd ~
88
- cloud_copy SHARE_URL . --config ss[/dim]
89
- (requires symlinks to be created first)"""
90
- console.print(Panel(f"📂 {header_text}\n{subtitle_text}\n\n{instructions}", border_style="yellow", padding=(1, 2)))
91
55
 
92
56
 
93
57
  def get_installation_choices() -> list[str]:
@@ -117,12 +81,12 @@ def execute_installations(selected_options: list[str]) -> None:
117
81
  except Exception as e:
118
82
  console.print(f"❌ Error installing CLI applications: {e}", style="bold red")
119
83
  if platform.system() != "Windows":
120
- run_shell_script(". $HOME/.bashrc")
84
+ run_shell_script(". $HOME/.bashrc", display_script=True, clean_env=False)
121
85
 
122
86
  if "install_machineconfig" in selected_options:
123
87
  console.print(Panel("🐍 [bold green]PYTHON ENVIRONMENT[/bold green]\n[italic]Virtual environment setup[/italic]", border_style="green"))
124
- from machineconfig.scripts.python.helpers_devops.cli_self import install
125
- install()
88
+ from machineconfig.scripts.python.helpers.helpers_devops.cli_self import install
89
+ install(copy_assets=True, dev=False)
126
90
 
127
91
  if "install_ssh_server" in selected_options:
128
92
  console.print(Panel("🔒 [bold red]SSH SERVER[/bold red]\n[italic]Remote access setup[/italic]", border_style="red"))
@@ -131,9 +95,9 @@ def execute_installations(selected_options: list[str]) -> None:
131
95
  Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
132
96
  Start-Service sshd
133
97
  Set-Service -Name sshd -StartupType 'Automatic'"""
134
- run_shell_script(f'powershell -Command "{powershell_script}"')
98
+ run_shell_script(f'powershell -Command "{powershell_script}"', display_script=True, clean_env=False)
135
99
  else:
136
- run_shell_script("sudo nala install openssh-server -y")
100
+ run_shell_script("sudo nala install openssh-server -y", display_script=True, clean_env=False)
137
101
 
138
102
  if "install_shell_profile" in selected_options:
139
103
  console.print(Panel("🐚 [bold green]SHELL PROFILE[/bold green]\n[italic]Shell configuration setup[/italic]", border_style="green"))
@@ -142,27 +106,71 @@ Set-Service -Name sshd -StartupType 'Automatic'"""
142
106
  from machineconfig.profile.create_shell_profile import create_default_shell_profile
143
107
  create_default_shell_profile()
144
108
  console.print("✅ Shell profile configured successfully", style="bold green")
145
- from machineconfig.profile.create_links_export import main_public_from_parser
146
- main_public_from_parser(method="copy", on_conflict="overwrite-default-path", which="all", interactive=False)
109
+ from machineconfig.profile.create_links_export import main_from_parser
110
+ main_from_parser(sensitivity="public", method="copy", on_conflict="overwrite-default-path", which="all")
147
111
  if platform.system() == "Windows":
148
- from machineconfig.jobs.installer.custom_dev.nerfont_windows_helper import install_nerd_fonts
112
+ from machineconfig.jobs.installer.python_scripts.nerfont_windows_helper import install_nerd_fonts
149
113
  install_nerd_fonts()
150
- from machineconfig.setup_windows.wt_and_pwsh.set_wt_settings import main as set_wt_settings_main
114
+ from machineconfig.settings.wt.set_wt_settings import main as set_wt_settings_main
151
115
  set_wt_settings_main()
152
116
  except Exception as e:
153
117
  console.print(f"❌ Error configuring shell profile: {e}", style="bold red")
154
118
 
119
+ if "retrieve_repositories" in selected_options or "retrieve_data" in selected_options:
120
+ # we cannot proceed before dotfiles are in place
121
+ if Path.home().joinpath("dotfiles").exists():
122
+ console.print("✅ Dotfiles directory found.", style="bold green")
123
+ else:
124
+ header_text = Text("DOTFILES MIGRATION", style="bold yellow")
125
+ subtitle_text = Text("Configuration transfer options", style="italic yellow")
126
+ instructions = """
127
+ On remote, run:
128
+ devops config export-dotfiles --password pwd
129
+ On new machine, run:
130
+ devops config import-dotfiles --password pwd
131
+ """
132
+ console.print(Panel(f"📂 {header_text}\n{subtitle_text}\n\n{instructions}", border_style="yellow", padding=(1, 2)))
133
+ i_sorted_it_out = "I have sorted out dotfiles migration already and want to proceed."
134
+ exit_now = "Exit now and sort out dotfiles migration first."
135
+ fetch_over_lan = "I already exposed dotfiles over LAN, let's fetch them now."
136
+ fetch_over_ssh = "I wanted to bring them using SSH SCP now."
137
+ options: list[str] = [
138
+ i_sorted_it_out,
139
+ exit_now,
140
+ fetch_over_lan,
141
+ fetch_over_ssh,
142
+ ]
143
+ answer = questionary.select("⚠️ DOTFILES NOT FOUND. How do you want to proceed?", choices=options).ask()
144
+ if answer == i_sorted_it_out:
145
+ console.print("✅ Proceeding as per user confirmation.", style="bold green")
146
+ elif answer == exit_now:
147
+ console.print("❌ Exiting for dotfiles migration.", style="bold red")
148
+ sys.exit(0)
149
+ elif answer == fetch_over_lan:
150
+ from machineconfig.scripts.python.helpers.helpers_devops.cli_config_dotfile import import_dotfiles
151
+ import_dotfiles(use_ssh=False)
152
+ elif answer == fetch_over_ssh:
153
+ from machineconfig.scripts.python.helpers.helpers_devops.cli_config_dotfile import import_dotfiles
154
+ import_dotfiles(use_ssh=True)
155
+ if not Path.home().joinpath("dotfiles").exists():
156
+ console.print("❌ Dotfiles directory still not found after attempted import. Exiting...", style="bold red")
157
+ sys.exit(1)
158
+ # devops config sync --sensitivity public --method symlink --on-conflict overwrite-default-path --which all
159
+ # devops config sync --sensitivity private --method symlink --on-conflict overwrite-default-path --which all
160
+ from machineconfig.profile.create_links_export import main_from_parser
161
+ main_from_parser(sensitivity="private", method="symlink", on_conflict="overwrite-default-path", which="all")
162
+
155
163
  if "retrieve_repositories" in selected_options:
156
164
  console.print(Panel("📚 [bold bright_magenta]REPOSITORIES[/bold bright_magenta]\n[italic]Project code retrieval[/italic]", border_style="bright_magenta"))
157
- from machineconfig.scripts.python.helpers_devops import cli_repos
158
- cli_repos.clone(directory=str(Path.home() / "code"), cloud="odg1")
165
+ from machineconfig.scripts.python.helpers.helpers_devops import cli_repos
166
+ cli_repos.clone(interactive=True)
159
167
 
160
168
  if "retrieve_data" in selected_options:
161
169
  console.print(Panel("💾 [bold bright_cyan]DATA RETRIEVAL[/bold bright_cyan]\n[italic]Backup restoration[/italic]", border_style="bright_cyan"))
162
170
  console.print("🔧 Retrieving backup data", style="bold cyan")
163
171
  try:
164
- from machineconfig.scripts.python.helpers_devops.devops_backup_retrieve import main_backup_retrieve
165
- main_backup_retrieve(direction="RETRIEVE", cloud=None, which=None)
172
+ from machineconfig.scripts.python.helpers.helpers_devops.cli_backup_retrieve import main_backup_retrieve
173
+ main_backup_retrieve(direction="RETRIEVE", cloud=None, which=None, repo="all")
166
174
  console.print("✅ Backup data retrieved successfully", style="bold green")
167
175
  except Exception as e:
168
176
  console.print(f"❌ Error retrieving backup data: {e}", style="bold red")
@@ -180,7 +188,13 @@ def main() -> None:
180
188
  console.print("❌ Installation cancelled.", style="bold red")
181
189
  sys.exit(0)
182
190
  execute_installations(selected_options=selected_options)
183
- display_completion_message()
191
+ completion_text = Text("INSTALLATION COMPLETE", style="bold green")
192
+ subtitle_text = Text("System setup finished successfully", style="italic green")
193
+ console.print(Panel(f"✨ {completion_text}\n{subtitle_text}\n\n🎉 Your system has been configured successfully!\n🔄 You may need to reboot to apply all changes.", border_style="green", padding=(1, 2)))
194
+
195
+ from machineconfig.profile.create_shell_profile import reload_shell_profile_and_exit
196
+ reload_shell_profile_and_exit()
197
+
184
198
 
185
199
 
186
200
  if __name__ == "__main__":
@@ -0,0 +1,25 @@
1
+ import subprocess
2
+
3
+
4
+ def run_command(command: list[str]) -> subprocess.CompletedProcess[str]:
5
+ result = subprocess.run(command, capture_output=True, text=True, check=False)
6
+ return result
7
+
8
+
9
+ def run_command_sudo(command: list[str]) -> subprocess.CompletedProcess[str]:
10
+ result = subprocess.run(["sudo", *command], capture_output=True, text=True, check=False)
11
+ return result
12
+
13
+
14
+ def run_powershell(command: str) -> subprocess.CompletedProcess[str]:
15
+ result = subprocess.run(["powershell", "-NoProfile", "-Command", command], capture_output=True, text=True, check=False)
16
+ return result
17
+
18
+
19
+ def ensure_ok(result: subprocess.CompletedProcess[str], context: str) -> str:
20
+ if result.returncode != 0:
21
+ stderr_value = result.stderr.strip()
22
+ stdout_value = result.stdout.strip()
23
+ error_text = stderr_value if stderr_value != "" else stdout_value
24
+ raise RuntimeError(f"{context} failed: {error_text}")
25
+ return result.stdout