machineconfig 3.7__py3-none-any.whl → 7.69__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.
Potentially problematic release.
This version of machineconfig might be problematic. Click here for more details.
- machineconfig/__init__.py +0 -28
- machineconfig/cluster/remote/distribute.py +0 -1
- machineconfig/cluster/remote/file_manager.py +0 -2
- machineconfig/cluster/remote/script_execution.py +1 -2
- machineconfig/cluster/sessions_managers/{enhanced_command_runner.py → helpers/enhanced_command_runner.py} +4 -6
- machineconfig/cluster/sessions_managers/helpers/load_balancer_helper.py +145 -0
- machineconfig/cluster/sessions_managers/utils/load_balancer.py +53 -0
- machineconfig/cluster/sessions_managers/utils/maker.py +69 -0
- machineconfig/cluster/sessions_managers/wt_local.py +128 -330
- machineconfig/cluster/sessions_managers/wt_local_manager.py +53 -187
- machineconfig/cluster/sessions_managers/wt_remote.py +51 -43
- machineconfig/cluster/sessions_managers/wt_remote_manager.py +49 -197
- machineconfig/cluster/sessions_managers/wt_utils/layout_generator.py +6 -19
- machineconfig/cluster/sessions_managers/wt_utils/manager_persistence.py +52 -0
- machineconfig/cluster/sessions_managers/wt_utils/monitoring_helpers.py +50 -0
- machineconfig/cluster/sessions_managers/wt_utils/status_reporter.py +4 -2
- machineconfig/cluster/sessions_managers/wt_utils/status_reporting.py +76 -0
- machineconfig/cluster/sessions_managers/wt_utils/wt_helpers.py +199 -0
- machineconfig/cluster/sessions_managers/zellij_local.py +81 -375
- machineconfig/cluster/sessions_managers/zellij_local_manager.py +22 -172
- machineconfig/cluster/sessions_managers/zellij_remote.py +40 -41
- machineconfig/cluster/sessions_managers/zellij_remote_manager.py +13 -10
- machineconfig/cluster/sessions_managers/zellij_utils/example_usage.py +4 -8
- machineconfig/cluster/sessions_managers/zellij_utils/layout_generator.py +5 -20
- machineconfig/cluster/sessions_managers/zellij_utils/process_monitor.py +3 -9
- machineconfig/cluster/sessions_managers/zellij_utils/status_reporter.py +3 -1
- machineconfig/cluster/sessions_managers/zellij_utils/zellij_local_helper.py +298 -0
- machineconfig/cluster/sessions_managers/zellij_utils/zellij_local_helper_restart.py +77 -0
- machineconfig/cluster/sessions_managers/zellij_utils/zellij_local_helper_with_panes.py +228 -0
- machineconfig/cluster/sessions_managers/zellij_utils/zellij_local_manager_helper.py +165 -0
- machineconfig/jobs/{python → installer}/check_installations.py +7 -21
- machineconfig/jobs/installer/custom/boxes.py +61 -0
- machineconfig/jobs/installer/custom/gh.py +128 -0
- machineconfig/jobs/{python_custom_installers → installer/custom}/hx.py +84 -18
- machineconfig/jobs/installer/custom_dev/alacritty.py +86 -0
- machineconfig/jobs/installer/custom_dev/brave.py +82 -0
- machineconfig/jobs/installer/custom_dev/bypass_paywall.py +59 -0
- machineconfig/jobs/installer/custom_dev/cloudflare_warp_cli.py +23 -0
- machineconfig/jobs/installer/custom_dev/code.py +63 -0
- machineconfig/jobs/{python_custom_installers/dev → installer/custom_dev}/cursor.py +7 -7
- machineconfig/jobs/installer/custom_dev/dubdb_adbc.py +30 -0
- machineconfig/jobs/installer/custom_dev/espanso.py +117 -0
- machineconfig/jobs/installer/custom_dev/goes.py +68 -0
- machineconfig/jobs/installer/custom_dev/lvim.py +89 -0
- machineconfig/jobs/installer/custom_dev/nerdfont.py +111 -0
- machineconfig/jobs/installer/custom_dev/nerfont_windows_helper.py +149 -0
- machineconfig/jobs/installer/custom_dev/redis.py +88 -0
- machineconfig/jobs/installer/custom_dev/sysabc.py +145 -0
- machineconfig/jobs/installer/custom_dev/wezterm.py +92 -0
- machineconfig/jobs/{python_custom_installers/dev → installer/custom_dev}/winget.py +2 -3
- machineconfig/jobs/installer/installer_data.json +3440 -0
- machineconfig/jobs/{python_custom_installers/scripts/linux → installer/linux_scripts}/brave.sh +4 -14
- machineconfig/jobs/{python_custom_installers/scripts/linux/warp-cli.sh → installer/linux_scripts/cloudflare_warp_cli.sh} +5 -17
- machineconfig/jobs/{python_custom_installers/scripts/linux → installer/linux_scripts}/docker.sh +6 -18
- machineconfig/jobs/installer/linux_scripts/docker_start.sh +37 -0
- machineconfig/jobs/{python_custom_installers/scripts/linux → installer/linux_scripts}/edge.sh +3 -11
- machineconfig/jobs/{linux/msc → installer/linux_scripts}/lid.sh +2 -8
- machineconfig/jobs/{python_custom_installers/scripts/linux → installer/linux_scripts}/nerdfont.sh +5 -17
- machineconfig/jobs/{linux/msc → installer/linux_scripts}/network.sh +2 -8
- machineconfig/jobs/installer/linux_scripts/ngrok.sh +6 -0
- machineconfig/jobs/installer/linux_scripts/q.sh +9 -0
- machineconfig/jobs/{python_custom_installers/scripts/linux → installer/linux_scripts}/redis.sh +6 -17
- machineconfig/jobs/{python_custom_installers/scripts/linux → installer/linux_scripts}/vscode.sh +5 -17
- machineconfig/jobs/{python_custom_installers/scripts/linux → installer/linux_scripts}/wezterm.sh +4 -12
- machineconfig/jobs/installer/package_groups.py +255 -0
- machineconfig/logger.py +0 -1
- machineconfig/profile/backup.toml +49 -0
- machineconfig/profile/bash_shell_profiles.md +11 -0
- machineconfig/profile/create_helper.py +74 -0
- machineconfig/profile/create_links.py +288 -0
- machineconfig/profile/create_links_export.py +100 -0
- machineconfig/profile/create_shell_profile.py +136 -0
- machineconfig/profile/mapper.toml +258 -0
- machineconfig/scripts/__init__.py +0 -4
- machineconfig/scripts/linux/{share_cloud.sh → other/share_cloud.sh} +14 -25
- machineconfig/scripts/linux/wrap_mcfg +47 -0
- machineconfig/scripts/nu/wrap_mcfg.nu +69 -0
- machineconfig/scripts/python/agents.py +198 -0
- machineconfig/scripts/python/ai/command_runner/command_runner.sh +9 -0
- machineconfig/scripts/python/ai/command_runner/prompt.txt +9 -0
- machineconfig/scripts/python/ai/generate_files.py +307 -42
- machineconfig/scripts/python/ai/{mcinit.py → initai.py} +3 -38
- machineconfig/scripts/python/ai/scripts/lint_and_type_check.ps1 +114 -0
- machineconfig/scripts/python/ai/scripts/lint_and_type_check.sh +88 -22
- machineconfig/scripts/python/ai/solutions/_shared.py +9 -1
- machineconfig/scripts/python/ai/solutions/copilot/instructions/python/dev.instructions.md +4 -1
- machineconfig/scripts/python/ai/solutions/copilot/prompts/pyright_fix.md +16 -0
- machineconfig/scripts/python/ai/solutions/gemini/settings.json +1 -1
- machineconfig/scripts/python/ai/solutions/generic.py +27 -4
- machineconfig/scripts/python/ai/vscode_tasks.py +37 -0
- machineconfig/scripts/python/cloud.py +29 -0
- machineconfig/scripts/python/croshell.py +129 -198
- machineconfig/scripts/python/define.py +31 -0
- machineconfig/scripts/python/devops.py +45 -131
- machineconfig/scripts/python/devops_navigator.py +6 -0
- machineconfig/scripts/python/env_manager/__init__.py +1 -0
- machineconfig/scripts/python/env_manager/path_manager_backend.py +47 -0
- machineconfig/scripts/python/env_manager/path_manager_tui.py +228 -0
- machineconfig/scripts/python/fire_jobs.py +166 -235
- machineconfig/scripts/python/ftpx.py +164 -100
- machineconfig/scripts/python/helpers/ast_search.py +74 -0
- machineconfig/scripts/python/helpers/repo_rag.py +325 -0
- machineconfig/scripts/python/helpers/symantic_search.py +25 -0
- machineconfig/scripts/python/helpers_agents/agentic_frameworks/fire_crush.json +14 -0
- machineconfig/scripts/python/helpers_agents/agentic_frameworks/fire_crush.py +37 -0
- machineconfig/scripts/python/helpers_agents/agentic_frameworks/fire_cursor_agents.py +22 -0
- machineconfig/scripts/python/helpers_agents/agentic_frameworks/fire_gemini.py +42 -0
- machineconfig/scripts/python/helpers_agents/agentic_frameworks/fire_qwen.py +30 -0
- machineconfig/scripts/python/helpers_agents/fire_agents_help_launch.py +110 -0
- machineconfig/scripts/python/helpers_agents/fire_agents_helper_types.py +34 -0
- machineconfig/scripts/python/helpers_agents/fire_agents_load_balancer.py +22 -0
- machineconfig/scripts/python/helpers_agents/templates/prompt.txt +6 -0
- machineconfig/scripts/python/helpers_agents/templates/template.ps1 +14 -0
- machineconfig/scripts/python/helpers_agents/templates/template.sh +24 -0
- machineconfig/scripts/python/{cloud_copy.py → helpers_cloud/cloud_copy.py} +52 -39
- machineconfig/scripts/python/{cloud_mount.py → helpers_cloud/cloud_mount.py} +13 -18
- machineconfig/scripts/python/helpers_cloud/cloud_sync.py +81 -0
- machineconfig/scripts/python/{helpers → helpers_cloud}/helpers2.py +3 -3
- machineconfig/scripts/python/helpers_croshell/crosh.py +39 -0
- machineconfig/scripts/python/{scheduler.py → helpers_croshell/scheduler.py} +0 -1
- machineconfig/scripts/python/{start_slidev.py → helpers_croshell/start_slidev.py} +32 -20
- machineconfig/scripts/python/helpers_devops/cli_config.py +95 -0
- machineconfig/scripts/python/helpers_devops/cli_config_dotfile.py +89 -0
- machineconfig/scripts/python/helpers_devops/cli_data.py +25 -0
- machineconfig/scripts/python/helpers_devops/cli_nw.py +134 -0
- machineconfig/scripts/python/helpers_devops/cli_repos.py +182 -0
- machineconfig/scripts/python/helpers_devops/cli_self.py +134 -0
- machineconfig/scripts/python/helpers_devops/cli_share_file.py +137 -0
- machineconfig/scripts/python/helpers_devops/cli_share_server.py +141 -0
- machineconfig/scripts/python/helpers_devops/cli_terminal.py +156 -0
- machineconfig/scripts/python/helpers_devops/cli_utils.py +96 -0
- machineconfig/scripts/python/{devops_backup_retrieve.py → helpers_devops/devops_backup_retrieve.py} +7 -10
- machineconfig/scripts/python/helpers_devops/devops_status.py +511 -0
- machineconfig/scripts/python/helpers_devops/devops_update_repos.py +269 -0
- machineconfig/scripts/python/helpers_devops/themes/choose_pwsh_theme.ps1 +81 -0
- machineconfig/scripts/python/helpers_devops/themes/choose_starship_theme.bash +3 -0
- machineconfig/scripts/python/{choose_wezterm_theme.py → helpers_devops/themes/choose_wezterm_theme.py} +2 -2
- machineconfig/scripts/python/{cloud_manager.py → helpers_fire_command/cloud_manager.py} +0 -2
- machineconfig/scripts/python/{helpers/helpers4.py → helpers_fire_command/file_wrangler.py} +57 -89
- machineconfig/scripts/python/helpers_fire_command/fire_jobs_args_helper.py +145 -0
- machineconfig/scripts/python/helpers_fire_command/fire_jobs_route_helper.py +110 -0
- machineconfig/scripts/python/helpers_msearch/__init__.py +5 -0
- machineconfig/scripts/{linux → python/helpers_msearch/scripts_linux}/fzfag +1 -1
- machineconfig/scripts/{linux → python/helpers_msearch/scripts_linux}/fzfg +1 -1
- machineconfig/scripts/{linux → python/helpers_msearch/scripts_linux}/fzfrga +1 -1
- machineconfig/scripts/python/helpers_navigator/__init__.py +20 -0
- machineconfig/scripts/python/helpers_navigator/command_builder.py +111 -0
- machineconfig/scripts/python/helpers_navigator/command_detail.py +44 -0
- machineconfig/scripts/python/helpers_navigator/command_tree.py +620 -0
- machineconfig/scripts/python/helpers_navigator/data_models.py +28 -0
- machineconfig/scripts/python/helpers_navigator/main_app.py +272 -0
- machineconfig/scripts/python/helpers_navigator/search_bar.py +15 -0
- machineconfig/scripts/python/helpers_repos/action.py +209 -0
- machineconfig/scripts/python/helpers_repos/action_helper.py +150 -0
- machineconfig/scripts/python/{repos_helper_clone.py → helpers_repos/clone.py} +6 -7
- machineconfig/scripts/python/helpers_repos/cloud_repo_sync.py +218 -0
- machineconfig/scripts/python/helpers_repos/count_lines.py +348 -0
- machineconfig/scripts/python/helpers_repos/count_lines_frontend.py +17 -0
- machineconfig/scripts/python/helpers_repos/entrypoint.py +77 -0
- machineconfig/scripts/python/helpers_repos/grource.py +340 -0
- machineconfig/scripts/python/{repos_helper_record.py → helpers_repos/record.py} +7 -4
- machineconfig/scripts/python/helpers_repos/sync.py +66 -0
- machineconfig/scripts/python/{repos_helper_update.py → helpers_repos/update.py} +3 -3
- machineconfig/scripts/python/helpers_sessions/sessions_multiprocess.py +58 -0
- machineconfig/scripts/python/helpers_utils/download.py +152 -0
- machineconfig/scripts/python/helpers_utils/path.py +108 -0
- machineconfig/scripts/python/interactive.py +187 -0
- machineconfig/scripts/python/mcfg_entry.py +63 -0
- machineconfig/scripts/python/msearch.py +40 -0
- machineconfig/scripts/python/{devops_add_identity.py → nw/devops_add_identity.py} +1 -3
- machineconfig/scripts/python/{devops_add_ssh_key.py → nw/devops_add_ssh_key.py} +74 -44
- machineconfig/scripts/{linux → python/nw}/mount_nfs +1 -1
- machineconfig/scripts/python/{mount_nfs.py → nw/mount_nfs.py} +19 -16
- machineconfig/scripts/{linux → python/nw}/mount_nw_drive +1 -2
- machineconfig/scripts/python/{mount_ssh.py → nw/mount_ssh.py} +7 -8
- machineconfig/scripts/python/{onetimeshare.py → nw/onetimeshare.py} +0 -1
- machineconfig/scripts/python/nw/ssh_debug_linux.py +391 -0
- machineconfig/scripts/python/nw/ssh_debug_windows.py +338 -0
- machineconfig/scripts/python/{wifi_conn.py → nw/wifi_conn.py} +1 -51
- machineconfig/scripts/python/nw/wsl_windows_transfer.py +67 -0
- machineconfig/scripts/python/sessions.py +167 -0
- machineconfig/scripts/python/terminal.py +127 -0
- machineconfig/scripts/python/utils.py +66 -0
- machineconfig/scripts/windows/mounts/Restore-ThunderbirdProfile.ps1 +92 -0
- machineconfig/scripts/windows/{mount_nfs.ps1 → mounts/mount_nfs.ps1} +1 -3
- machineconfig/scripts/windows/{mount_ssh.ps1 → mounts/mount_ssh.ps1} +1 -1
- machineconfig/scripts/windows/{share_smb.ps1 → mounts/share_smb.ps1} +0 -6
- machineconfig/scripts/windows/wrap_mcfg.ps1 +60 -0
- machineconfig/settings/broot/br.sh +0 -4
- machineconfig/settings/broot/conf.toml +1 -1
- machineconfig/settings/helix/config.toml +16 -0
- machineconfig/settings/helix/languages.toml +13 -4
- machineconfig/settings/helix/yazi-picker.sh +12 -0
- machineconfig/settings/lf/linux/exe/lfcd.sh +1 -0
- machineconfig/settings/lf/linux/exe/previewer.sh +9 -3
- machineconfig/settings/lf/linux/lfrc +10 -12
- machineconfig/settings/lf/windows/fzf_edit.ps1 +2 -2
- machineconfig/settings/lf/windows/lfcd.ps1 +1 -1
- machineconfig/settings/lf/windows/lfrc +18 -38
- machineconfig/settings/lf/windows/mkfile.ps1 +1 -1
- machineconfig/settings/linters/.ruff.toml +1 -1
- machineconfig/settings/lvim/windows/archive/config_additional.lua +0 -6
- machineconfig/settings/marimo/marimo.toml +80 -0
- machineconfig/settings/marimo/snippets/globalize.py +34 -0
- machineconfig/settings/pistol/pistol.conf +1 -1
- machineconfig/settings/shells/bash/init.sh +55 -31
- machineconfig/settings/shells/nushell/config.nu +1 -34
- machineconfig/settings/shells/nushell/init.nu +127 -0
- machineconfig/settings/shells/pwsh/init.ps1 +61 -43
- machineconfig/settings/shells/starship/starship.toml +16 -0
- machineconfig/settings/shells/wezterm/wezterm.lua +2 -0
- machineconfig/settings/shells/wt/settings.json +32 -17
- machineconfig/settings/shells/zsh/init.sh +89 -0
- machineconfig/settings/svim/linux/init.toml +0 -4
- machineconfig/settings/svim/windows/init.toml +0 -3
- machineconfig/settings/yazi/init.lua +57 -0
- machineconfig/settings/yazi/keymap_linux.toml +79 -0
- machineconfig/settings/yazi/keymap_windows.toml +78 -0
- machineconfig/settings/yazi/shell/yazi_cd.ps1 +33 -0
- machineconfig/settings/yazi/shell/yazi_cd.sh +8 -0
- machineconfig/settings/yazi/yazi.toml +14 -1
- machineconfig/setup_linux/__init__.py +10 -0
- machineconfig/setup_linux/apps_desktop.sh +89 -0
- machineconfig/setup_linux/apps_gui.sh +64 -0
- machineconfig/setup_linux/{nix → others}/cli_installation.sh +9 -29
- machineconfig/setup_linux/ssh/openssh_all.sh +25 -0
- machineconfig/setup_linux/ssh/openssh_wsl.sh +38 -0
- machineconfig/setup_linux/uv.sh +15 -0
- machineconfig/setup_linux/web_shortcuts/interactive.sh +28 -203
- machineconfig/setup_mac/__init__.py +16 -0
- machineconfig/setup_mac/apps_gui.sh +248 -0
- machineconfig/setup_mac/ssh/openssh_setup.sh +114 -0
- machineconfig/setup_mac/uv.sh +36 -0
- machineconfig/setup_windows/__init__.py +8 -0
- machineconfig/setup_windows/others/power_options.ps1 +7 -0
- machineconfig/setup_windows/ssh/add-sshkey.ps1 +29 -0
- machineconfig/setup_windows/ssh/add_identity.ps1 +11 -0
- machineconfig/setup_windows/ssh/openssh-server.ps1 +37 -0
- machineconfig/setup_windows/uv.ps1 +17 -0
- machineconfig/setup_windows/web_shortcuts/interactive.ps1 +28 -189
- machineconfig/setup_windows/web_shortcuts/quick_init.ps1 +17 -0
- machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py +37 -23
- machineconfig/utils/accessories.py +52 -12
- machineconfig/utils/cloud/onedrive/README.md +139 -0
- machineconfig/utils/code.py +140 -93
- machineconfig/utils/files/art/fat_croco.txt +10 -0
- machineconfig/utils/files/art/halfwit_croco.txt +9 -0
- machineconfig/utils/files/art/happy_croco.txt +22 -0
- machineconfig/utils/files/art/water_croco.txt +11 -0
- machineconfig/utils/files/ascii_art.py +118 -0
- machineconfig/utils/files/dbms.py +257 -0
- machineconfig/utils/files/headers.py +68 -0
- machineconfig/utils/files/ouch/decompress.py +45 -0
- machineconfig/utils/files/read.py +95 -0
- machineconfig/utils/installer_utils/github_release_bulk.py +188 -0
- machineconfig/utils/installer_utils/install_from_url.py +180 -0
- machineconfig/utils/installer_utils/installer_class.py +239 -316
- machineconfig/utils/installer_utils/installer_cli.py +186 -0
- machineconfig/utils/installer_utils/{installer_abc.py → installer_locator_utils.py} +90 -5
- machineconfig/utils/installer_utils/installer_runner.py +191 -0
- machineconfig/utils/io.py +77 -24
- machineconfig/utils/links.py +309 -100
- machineconfig/utils/meta.py +255 -0
- machineconfig/utils/notifications.py +1 -1
- machineconfig/utils/options.py +19 -47
- machineconfig/utils/path_extended.py +111 -121
- machineconfig/utils/path_helper.py +75 -22
- machineconfig/utils/procs.py +50 -74
- machineconfig/utils/scheduler.py +94 -97
- machineconfig/utils/scheduling.py +0 -3
- machineconfig/utils/schemas/fire_agents/fire_agents_input.py +5 -17
- machineconfig/utils/schemas/installer/installer_types.py +28 -6
- machineconfig/utils/schemas/layouts/layout_types.py +34 -1
- machineconfig/utils/source_of_truth.py +3 -6
- machineconfig/utils/ssh.py +742 -254
- machineconfig/utils/ssh_utils/utils.py +0 -0
- machineconfig/utils/terminal.py +3 -140
- machineconfig/utils/tst.py +20 -0
- machineconfig/utils/upgrade_packages.py +109 -28
- machineconfig/utils/ve.py +13 -5
- machineconfig-7.69.dist-info/METADATA +124 -0
- machineconfig-7.69.dist-info/RECORD +454 -0
- machineconfig-7.69.dist-info/entry_points.txt +15 -0
- machineconfig/cluster/templates/cli_click.py +0 -102
- machineconfig/cluster/templates/cli_gooey.py +0 -115
- machineconfig/cluster/templates/utils.py +0 -51
- machineconfig/jobs/linux/msc/cli_agents.sh +0 -32
- machineconfig/jobs/python/create_bootable_media.py +0 -16
- machineconfig/jobs/python/python_cargo_build_share.py +0 -59
- machineconfig/jobs/python/python_ve_symlink.py +0 -29
- machineconfig/jobs/python/tasks.py +0 -3
- machineconfig/jobs/python/vscode/api.py +0 -48
- machineconfig/jobs/python/vscode/link_ve.py +0 -63
- machineconfig/jobs/python/vscode/select_interpreter.py +0 -87
- machineconfig/jobs/python/vscode/sync_code.py +0 -58
- machineconfig/jobs/python_custom_installers/archive/ngrok.py +0 -63
- machineconfig/jobs/python_custom_installers/dev/aider.py +0 -37
- machineconfig/jobs/python_custom_installers/dev/alacritty.py +0 -65
- machineconfig/jobs/python_custom_installers/dev/brave.py +0 -71
- machineconfig/jobs/python_custom_installers/dev/bypass_paywall.py +0 -50
- machineconfig/jobs/python_custom_installers/dev/code.py +0 -51
- machineconfig/jobs/python_custom_installers/dev/docker_desktop.py +0 -78
- machineconfig/jobs/python_custom_installers/dev/espanso.py +0 -90
- machineconfig/jobs/python_custom_installers/dev/goes.py +0 -55
- machineconfig/jobs/python_custom_installers/dev/lvim.py +0 -77
- machineconfig/jobs/python_custom_installers/dev/nerdfont.py +0 -68
- machineconfig/jobs/python_custom_installers/dev/redis.py +0 -65
- machineconfig/jobs/python_custom_installers/dev/reverse_proxy.md +0 -31
- machineconfig/jobs/python_custom_installers/dev/wezterm.py +0 -70
- machineconfig/jobs/python_custom_installers/docker.py +0 -74
- machineconfig/jobs/python_custom_installers/gh.py +0 -97
- machineconfig/jobs/python_custom_installers/scripts/linux/docker_start.sh +0 -45
- machineconfig/jobs/python_custom_installers/scripts/linux/pgsql.sh +0 -49
- machineconfig/jobs/python_custom_installers/scripts/linux/timescaledb.sh +0 -85
- machineconfig/jobs/python_custom_installers/warp-cli.py +0 -71
- machineconfig/jobs/python_generic_installers/config.json +0 -603
- machineconfig/jobs/python_generic_installers/config.json.bak +0 -414
- machineconfig/jobs/python_generic_installers/dev/config.archive.json +0 -18
- machineconfig/jobs/python_generic_installers/dev/config.json +0 -825
- machineconfig/jobs/python_generic_installers/dev/config.json.bak +0 -565
- machineconfig/jobs/python_linux_installers/archive/config.json +0 -18
- machineconfig/jobs/python_linux_installers/archive/config.json.bak +0 -10
- machineconfig/jobs/python_linux_installers/config.json +0 -145
- machineconfig/jobs/python_linux_installers/config.json.bak +0 -110
- machineconfig/jobs/python_linux_installers/dev/config.json +0 -276
- machineconfig/jobs/python_linux_installers/dev/config.json.bak +0 -206
- machineconfig/jobs/python_windows_installers/archive/file.json +0 -11
- machineconfig/jobs/python_windows_installers/config.json +0 -82
- machineconfig/jobs/python_windows_installers/config.json.bak +0 -56
- machineconfig/jobs/python_windows_installers/dev/config.json +0 -4
- machineconfig/jobs/python_windows_installers/dev/config.json.bak +0 -3
- machineconfig/jobs/windows/archive/archive_pygraphviz.ps1 +0 -14
- machineconfig/jobs/windows/start_terminal.ps1 +0 -6
- machineconfig/jobs/windows/startup_file.cmd +0 -2
- machineconfig/profile/create.py +0 -169
- machineconfig/profile/shell.py +0 -176
- machineconfig/scripts/cloud/init.sh +0 -119
- machineconfig/scripts/linux/choose_wezterm_theme +0 -3
- machineconfig/scripts/linux/cloud_copy +0 -2
- machineconfig/scripts/linux/cloud_mount +0 -2
- machineconfig/scripts/linux/cloud_repo_sync +0 -2
- machineconfig/scripts/linux/cloud_sync +0 -2
- machineconfig/scripts/linux/croshell +0 -3
- machineconfig/scripts/linux/devops +0 -2
- machineconfig/scripts/linux/fire +0 -2
- machineconfig/scripts/linux/fire_agents +0 -2
- machineconfig/scripts/linux/ftpx +0 -2
- machineconfig/scripts/linux/fzf2g +0 -21
- machineconfig/scripts/linux/fzffg +0 -25
- machineconfig/scripts/linux/gh_models +0 -2
- machineconfig/scripts/linux/kill_process +0 -2
- machineconfig/scripts/linux/mcinit +0 -2
- machineconfig/scripts/linux/programs +0 -21
- machineconfig/scripts/linux/repos +0 -2
- machineconfig/scripts/linux/scheduler +0 -2
- machineconfig/scripts/linux/share_smb +0 -1
- machineconfig/scripts/linux/start_slidev +0 -2
- machineconfig/scripts/linux/start_terminals +0 -3
- machineconfig/scripts/linux/warp-cli.sh +0 -122
- machineconfig/scripts/linux/wifi_conn +0 -2
- machineconfig/scripts/linux/z_ls +0 -104
- machineconfig/scripts/python/ai/solutions/copilot/prompts/allLintersAndTypeCheckers.prompt.md +0 -5
- machineconfig/scripts/python/archive/im2text.py +0 -34
- machineconfig/scripts/python/archive/tmate_conn.py +0 -41
- machineconfig/scripts/python/archive/tmate_start.py +0 -44
- machineconfig/scripts/python/cloud_repo_sync.py +0 -192
- machineconfig/scripts/python/cloud_sync.py +0 -85
- machineconfig/scripts/python/devops_devapps_install.py +0 -202
- machineconfig/scripts/python/devops_update_repos.py +0 -180
- machineconfig/scripts/python/dotfile.py +0 -52
- machineconfig/scripts/python/fire_agents.py +0 -176
- machineconfig/scripts/python/fire_agents_help_launch.py +0 -143
- machineconfig/scripts/python/fire_agents_load_balancer.py +0 -50
- machineconfig/scripts/python/fire_jobs_args_helper.py +0 -84
- machineconfig/scripts/python/fire_jobs_layout_helper.py +0 -66
- machineconfig/scripts/python/get_zellij_cmd.py +0 -15
- machineconfig/scripts/python/gh_models.py +0 -104
- machineconfig/scripts/python/helpers/repo_sync_helpers.py +0 -114
- machineconfig/scripts/python/repos.py +0 -160
- machineconfig/scripts/python/snapshot.py +0 -25
- machineconfig/scripts/python/start_terminals.py +0 -121
- machineconfig/scripts/python/wsl_windows_transfer.py +0 -72
- machineconfig/scripts/windows/choose_wezterm_theme.ps1 +0 -1
- machineconfig/scripts/windows/cloud_copy.ps1 +0 -1
- machineconfig/scripts/windows/cloud_mount.ps1 +0 -1
- machineconfig/scripts/windows/cloud_repo_sync.ps1 +0 -1
- machineconfig/scripts/windows/cloud_sync.ps1 +0 -1
- machineconfig/scripts/windows/croshell.ps1 +0 -1
- machineconfig/scripts/windows/devops.ps1 +0 -1
- machineconfig/scripts/windows/dotfile.ps1 +0 -1
- machineconfig/scripts/windows/fire.ps1 +0 -1
- machineconfig/scripts/windows/ftpx.ps1 +0 -1
- machineconfig/scripts/windows/gpt.ps1 +0 -1
- machineconfig/scripts/windows/grep.ps1 +0 -2
- machineconfig/scripts/windows/kill_process.ps1 +0 -1
- machineconfig/scripts/windows/mcinit.ps1 +0 -1
- machineconfig/scripts/windows/nano.ps1 +0 -3
- machineconfig/scripts/windows/pomodoro.ps1 +0 -1
- machineconfig/scripts/windows/reload_path.ps1 +0 -3
- machineconfig/scripts/windows/repos.ps1 +0 -1
- machineconfig/scripts/windows/scheduler.ps1 +0 -1
- machineconfig/scripts/windows/snapshot.ps1 +0 -1
- machineconfig/scripts/windows/start_slidev.ps1 +0 -1
- machineconfig/scripts/windows/start_terminals.ps1 +0 -1
- machineconfig/scripts/windows/wifi_conn.ps1 +0 -2
- machineconfig/scripts/windows/wsl_rdp_windows_port_forwarding.ps1 +0 -46
- machineconfig/scripts/windows/wsl_ssh_windows_port_forwarding.ps1 +0 -76
- machineconfig/settings/lf/linux/exe/fzf_nano.sh +0 -16
- machineconfig/setup_linux/others/openssh-server_add_pub_key.sh +0 -57
- machineconfig/setup_linux/web_shortcuts/ascii_art.sh +0 -93
- machineconfig/setup_linux/web_shortcuts/croshell.sh +0 -11
- machineconfig/setup_linux/web_shortcuts/ssh.sh +0 -52
- machineconfig/setup_windows/web_shortcuts/all.ps1 +0 -18
- machineconfig/setup_windows/web_shortcuts/ascii_art.ps1 +0 -36
- machineconfig/setup_windows/web_shortcuts/croshell.ps1 +0 -16
- machineconfig/setup_windows/web_shortcuts/ssh.ps1 +0 -11
- machineconfig/setup_windows/wt_and_pwsh/install_nerd_fonts.py +0 -100
- machineconfig/utils/ai/generate_file_checklist.py +0 -68
- machineconfig/utils/installer.py +0 -255
- machineconfig-3.7.dist-info/METADATA +0 -165
- machineconfig-3.7.dist-info/RECORD +0 -432
- machineconfig-3.7.dist-info/entry_points.txt +0 -18
- machineconfig/cluster/{templates → remote}/run_cloud.py +0 -0
- machineconfig/cluster/{templates → remote}/run_cluster.py +0 -0
- machineconfig/cluster/{templates → remote}/run_remote.py +0 -0
- machineconfig/jobs/{python → installer}/__init__.py +0 -0
- machineconfig/jobs/{python_custom_installers → installer/custom_dev}/__init__.py +0 -0
- machineconfig/{setup_windows/wt_and_pwsh → jobs/installer/powershell_scripts}/install_fonts.ps1 +0 -0
- machineconfig/scripts/linux/{share_nfs → other/share_nfs} +0 -0
- machineconfig/scripts/linux/{start_docker → other/start_docker} +0 -0
- machineconfig/scripts/linux/{switch_ip → other/switch_ip} +0 -0
- machineconfig/{jobs/python_generic_installers → scripts/python/helpers_agents}/__init__.py +0 -0
- machineconfig/{jobs/python_linux_installers → scripts/python/helpers_agents/agentic_frameworks}/__init__.py +0 -0
- machineconfig/scripts/python/{fire_agents_help_search.py → helpers_agents/fire_agents_help_search.py} +0 -0
- machineconfig/{jobs/python_linux_installers/dev → scripts/python/helpers_cloud}/__init__.py +0 -0
- machineconfig/scripts/python/{helpers → helpers_cloud}/cloud_helpers.py +1 -1
- /machineconfig/scripts/python/{helpers → helpers_cloud}/helpers5.py +0 -0
- /machineconfig/{jobs/python_windows_installers → scripts/python/helpers_croshell}/__init__.py +0 -0
- /machineconfig/scripts/python/{pomodoro.py → helpers_croshell/pomodoro.py} +0 -0
- /machineconfig/scripts/python/{viewer.py → helpers_croshell/viewer.py} +0 -0
- /machineconfig/scripts/python/{viewer_template.py → helpers_croshell/viewer_template.py} +0 -0
- /machineconfig/{jobs/python_windows_installers/archive → scripts/python/helpers_devops}/__init__.py +0 -0
- /machineconfig/{jobs/python_windows_installers/dev → scripts/python/helpers_devops/themes}/__init__.py +0 -0
- /machineconfig/{jobs/windows/msc/cli_agents.bat → scripts/python/helpers_devops/themes/choose_starship_theme.ps1} +0 -0
- /machineconfig/scripts/python/{helpers → helpers_fire_command}/__init__.py +0 -0
- /machineconfig/scripts/python/{fire_jobs_streamlit_helper.py → helpers_fire_command/fire_jobs_streamlit_helper.py} +0 -0
- /machineconfig/scripts/{linux → python/helpers_msearch/scripts_linux}/skrg +0 -0
- /machineconfig/scripts/{windows → python/helpers_msearch/scripts_windows}/fzfb.ps1 +0 -0
- /machineconfig/scripts/{windows → python/helpers_msearch/scripts_windows}/fzfg.ps1 +0 -0
- /machineconfig/scripts/{windows → python/helpers_msearch/scripts_windows}/fzfrga.bat +0 -0
- /machineconfig/{jobs/windows/msc/cli_agents.ps1 → scripts/python/helpers_sessions/__init__.py} +0 -0
- /machineconfig/scripts/{windows/share_nfs.ps1 → python/nw/__init__.py} +0 -0
- /machineconfig/scripts/{linux → python/nw}/mount_drive +0 -0
- /machineconfig/scripts/python/{mount_nw_drive.py → nw/mount_nw_drive.py} +0 -0
- /machineconfig/scripts/{linux → python/nw}/mount_smb +0 -0
- /machineconfig/scripts/windows/{mount_nw.ps1 → mounts/mount_nw.ps1} +0 -0
- /machineconfig/scripts/windows/{mount_smb.ps1 → mounts/mount_smb.ps1} +0 -0
- /machineconfig/scripts/windows/{share_cloud.cmd → mounts/share_cloud.cmd} +0 -0
- /machineconfig/scripts/windows/{unlock_bitlocker.ps1 → mounts/unlock_bitlocker.ps1} +0 -0
- /machineconfig/setup_linux/{web_shortcuts → others}/android.sh +0 -0
- /machineconfig/{jobs/windows/archive → setup_windows/ssh}/openssh-server_add_key.ps1 +0 -0
- /machineconfig/{jobs/windows/archive → setup_windows/ssh}/openssh-server_copy-ssh-id.ps1 +0 -0
- /machineconfig/{settings/yazi/keymap.toml → utils/files/ouch/__init__.py} +0 -0
- {machineconfig-3.7.dist-info → machineconfig-7.69.dist-info}/WHEEL +0 -0
- {machineconfig-3.7.dist-info → machineconfig-7.69.dist-info}/top_level.txt +0 -0
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
"""Devops Devapps Install"""
|
|
2
|
-
|
|
3
|
-
# import subprocess
|
|
4
|
-
from rich.progress import Progress, SpinnerColumn, TextColumn
|
|
5
|
-
from machineconfig.utils.source_of_truth import LIBRARY_ROOT
|
|
6
|
-
from machineconfig.utils.options import choose_from_options
|
|
7
|
-
from machineconfig.utils.installer import get_installers, install_all
|
|
8
|
-
from platform import system
|
|
9
|
-
from typing import Any, Optional, Literal, TypeAlias, get_args
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
WHICH_CAT: TypeAlias = Literal["AllEssentials", "EssentialsAndOthers", "SystemInstallers", "PrecheckedCloudInstaller"]
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def main(which: Optional[WHICH_CAT | str]) -> None:
|
|
16
|
-
if which is not None and which in get_args(WHICH_CAT): # install by category
|
|
17
|
-
return get_programs_by_category(program_name=which) # type: ignore
|
|
18
|
-
|
|
19
|
-
if which is not None: # install by name
|
|
20
|
-
total_messages: list[str] = []
|
|
21
|
-
for a_which in which.split(",") if type(which) == str else which:
|
|
22
|
-
# Use get_installers to get properly converted installer objects
|
|
23
|
-
all_installers = get_installers(system=system(), dev=False) + get_installers(system=system(), dev=True)
|
|
24
|
-
|
|
25
|
-
# Find installer by exe_name or name
|
|
26
|
-
selected_installer = None
|
|
27
|
-
for installer in all_installers:
|
|
28
|
-
exe_name = installer.installer_data.get("exeName", "")
|
|
29
|
-
app_name = installer.installer_data.get("appName", "")
|
|
30
|
-
if exe_name == a_which or app_name == a_which:
|
|
31
|
-
selected_installer = installer
|
|
32
|
-
break
|
|
33
|
-
|
|
34
|
-
if selected_installer is None:
|
|
35
|
-
available_names = [f"{inst.installer_data.get('exeName', 'unknown')} ({inst.installer_data.get('appName', 'unknown')})" for inst in all_installers[:10]] # Show first 10
|
|
36
|
-
raise ValueError(f"{a_which=} not found. Available installers include: {available_names}")
|
|
37
|
-
|
|
38
|
-
print(f"""
|
|
39
|
-
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
40
|
-
┃ 🔧 Installing: {a_which}
|
|
41
|
-
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━""")
|
|
42
|
-
print(selected_installer)
|
|
43
|
-
message = selected_installer.install_robust(version=None) # finish the task
|
|
44
|
-
total_messages.append(message)
|
|
45
|
-
for a_message in total_messages:
|
|
46
|
-
print(a_message)
|
|
47
|
-
return None
|
|
48
|
-
|
|
49
|
-
# interactive installation
|
|
50
|
-
installers = get_installers(system=system(), dev=False) + get_installers(system=system(), dev=True)
|
|
51
|
-
|
|
52
|
-
# Check installed programs with progress indicator
|
|
53
|
-
with Progress(SpinnerColumn(), TextColumn("[progress.description]{task.description}")) as progress:
|
|
54
|
-
task = progress.add_task("✅ Checking installed programs...", total=len(installers))
|
|
55
|
-
options = []
|
|
56
|
-
for x in installers:
|
|
57
|
-
options.append(x.get_description())
|
|
58
|
-
progress.update(task, advance=1)
|
|
59
|
-
|
|
60
|
-
options += list(get_args(WHICH_CAT))
|
|
61
|
-
# print("s"*1000)
|
|
62
|
-
program_names = choose_from_options(multi=True, msg="", options=options, header="🚀 CHOOSE DEV APP", default="AllEssentials")
|
|
63
|
-
|
|
64
|
-
total_commands = ""
|
|
65
|
-
installation_messages: list[str] = []
|
|
66
|
-
for _an_idx, a_program_name in enumerate(program_names):
|
|
67
|
-
print(f"""
|
|
68
|
-
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
69
|
-
┃ 🔄 Processing: {a_program_name}
|
|
70
|
-
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━""")
|
|
71
|
-
if a_program_name in get_args(WHICH_CAT):
|
|
72
|
-
shell_commands = get_programs_by_category(program_name=a_program_name) # type: ignore
|
|
73
|
-
total_commands += "\n" + shell_commands
|
|
74
|
-
else:
|
|
75
|
-
an_installer = installers[options.index(a_program_name)]
|
|
76
|
-
status_message = an_installer.install_robust(version=None) # finish the task - this returns a status message, not a command
|
|
77
|
-
installation_messages.append(status_message)
|
|
78
|
-
|
|
79
|
-
# Print all installation status messages
|
|
80
|
-
print("\n📊 INSTALLATION SUMMARY:")
|
|
81
|
-
print("=" * 50)
|
|
82
|
-
for message in installation_messages:
|
|
83
|
-
print(message)
|
|
84
|
-
|
|
85
|
-
# Only run shell commands if there are any (from category installations)
|
|
86
|
-
if total_commands.strip():
|
|
87
|
-
import subprocess
|
|
88
|
-
|
|
89
|
-
print("\n🚀 Running additional shell commands...")
|
|
90
|
-
subprocess.run(total_commands, shell=True, check=True)
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
def get_programs_by_category(program_name: WHICH_CAT):
|
|
94
|
-
print(f"""
|
|
95
|
-
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
96
|
-
┃ 📦 Installing Category: {program_name}
|
|
97
|
-
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━""")
|
|
98
|
-
match program_name:
|
|
99
|
-
case "AllEssentials" | "EssentialsAndOthers":
|
|
100
|
-
installers_ = get_installers(dev=False, system=system())
|
|
101
|
-
if program_name == "EssentialsAndOthers":
|
|
102
|
-
installers_ += get_installers(dev=True, system=system())
|
|
103
|
-
install_all(installers=installers_)
|
|
104
|
-
program = ""
|
|
105
|
-
|
|
106
|
-
case "SystemInstallers":
|
|
107
|
-
if system() == "Windows":
|
|
108
|
-
options_system = parse_apps_installer_windows(LIBRARY_ROOT.joinpath("setup_windows/apps.ps1").read_text(encoding="utf-8"))
|
|
109
|
-
elif system() == "Linux":
|
|
110
|
-
options_system_1 = parse_apps_installer_linux(LIBRARY_ROOT.joinpath("setup_linux/apps_dev.sh").read_text(encoding="utf-8"))
|
|
111
|
-
options_system_2 = parse_apps_installer_linux(LIBRARY_ROOT.joinpath("setup_linux/apps.sh").read_text(encoding="utf-8"))
|
|
112
|
-
options_system = {**options_system_1, **options_system_2}
|
|
113
|
-
else:
|
|
114
|
-
raise NotImplementedError(f"❌ System {system()} not supported")
|
|
115
|
-
program_names = choose_from_options(multi=True, msg="", options=sorted(list(options_system.keys())), header="🚀 CHOOSE DEV APP")
|
|
116
|
-
program = ""
|
|
117
|
-
for name in program_names:
|
|
118
|
-
print(f"""
|
|
119
|
-
┌────────────────────────────────────────────────────
|
|
120
|
-
│ ⚙️ Installing: {name}
|
|
121
|
-
└────────────────────────────────────────────────────""")
|
|
122
|
-
sub_program = options_system[name]
|
|
123
|
-
if sub_program.startswith("#winget"):
|
|
124
|
-
sub_program = sub_program[1:]
|
|
125
|
-
program += "\n" + sub_program
|
|
126
|
-
|
|
127
|
-
# case "OtherDevApps":
|
|
128
|
-
# installers = get_installers(dev=True, system=system())
|
|
129
|
-
# options__: list[str] = [x.get_description() for x in tqdm(installers, desc="Checking installed programs")]
|
|
130
|
-
# program_names = choose_from_options(multi=True, msg="", options=sorted(options__) + ["all"], header="CHOOSE DEV APP")
|
|
131
|
-
# if "all" in program_names: program_names = options__
|
|
132
|
-
# program = ""
|
|
133
|
-
# print("Installing:")
|
|
134
|
-
# L(program_names).print()
|
|
135
|
-
# for name in program_names:
|
|
136
|
-
# try:
|
|
137
|
-
# idx = options__.index(name)
|
|
138
|
-
# except ValueError as ve:
|
|
139
|
-
# print(f"{name=}")
|
|
140
|
-
# print(f"{options__=}")
|
|
141
|
-
# raise ve
|
|
142
|
-
# print(f"Installing {name}")
|
|
143
|
-
# sub_program = installers[idx].install_robust(version=None) # finish the task
|
|
144
|
-
|
|
145
|
-
case "PrecheckedCloudInstaller":
|
|
146
|
-
# from machineconfig.jobs.python.check_installations import PrecheckedCloudInstaller
|
|
147
|
-
# ci = PrecheckedCloudInstaller()
|
|
148
|
-
# ci.download_safe_apps(name="AllEssentials")
|
|
149
|
-
# program = ""
|
|
150
|
-
raise NotImplementedError("PrecheckedCloudInstaller is not implemented yet.")
|
|
151
|
-
return program
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
def parse_apps_installer_linux(txt: str) -> dict[str, Any]:
|
|
155
|
-
txts = txt.split("""yes '' | sed 3q; echo "----------------------------- installing """)
|
|
156
|
-
res = {}
|
|
157
|
-
for chunk in txts[1:]:
|
|
158
|
-
try:
|
|
159
|
-
k = chunk.split("----")[0].rstrip().lstrip()
|
|
160
|
-
v = "\n".join(chunk.split("\n")[1:])
|
|
161
|
-
res[k] = v
|
|
162
|
-
except IndexError as e:
|
|
163
|
-
print(f"""
|
|
164
|
-
❌ Error parsing chunk:
|
|
165
|
-
{"-" * 50}
|
|
166
|
-
{chunk}
|
|
167
|
-
{"-" * 50}""")
|
|
168
|
-
raise e
|
|
169
|
-
return res
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
def parse_apps_installer_windows(txt: str) -> dict[str, Any]:
|
|
173
|
-
chunks: list[str] = []
|
|
174
|
-
for idx, item in enumerate(txt.split(sep="winget install")):
|
|
175
|
-
if idx == 0:
|
|
176
|
-
continue
|
|
177
|
-
if idx == 1:
|
|
178
|
-
chunks.append(item)
|
|
179
|
-
else:
|
|
180
|
-
chunks.append("winget install" + item)
|
|
181
|
-
# progs = L(txt.splitlines()).filter(lambda x: x.startswith("winget ") or x.startswith("#winget"))
|
|
182
|
-
res: dict[str, str] = {}
|
|
183
|
-
for a_chunk in chunks:
|
|
184
|
-
try:
|
|
185
|
-
name = a_chunk.split("--name ")[1]
|
|
186
|
-
if "--Id" not in name:
|
|
187
|
-
print(f"⚠️ Warning: {name} does not have an Id, skipping")
|
|
188
|
-
continue
|
|
189
|
-
name = name.split(" --Id ", maxsplit=1)[0].strip('"').strip('"')
|
|
190
|
-
res[name] = a_chunk
|
|
191
|
-
except IndexError as e:
|
|
192
|
-
print(f"""
|
|
193
|
-
❌ Error parsing chunk:
|
|
194
|
-
{"-" * 50}
|
|
195
|
-
{a_chunk}
|
|
196
|
-
{"-" * 50}""")
|
|
197
|
-
raise e
|
|
198
|
-
return res
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
if __name__ == "__main__":
|
|
202
|
-
pass
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
"""Update repositories with fancy output"""
|
|
2
|
-
|
|
3
|
-
import git
|
|
4
|
-
from pathlib import Path
|
|
5
|
-
from machineconfig.scripts.python.repos_helper_update import RepositoryUpdateResult, run_uv_sync, update_repository
|
|
6
|
-
from machineconfig.utils.path_extended import PathExtended as PathExtended
|
|
7
|
-
from machineconfig.utils.source_of_truth import DEFAULTS_PATH
|
|
8
|
-
from machineconfig.utils.io import read_ini
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
def _display_summary(results: list[RepositoryUpdateResult]) -> None:
|
|
12
|
-
"""Display a comprehensive summary of all repository update operations."""
|
|
13
|
-
print("\n" + "=" * 80)
|
|
14
|
-
print("📊 REPOSITORY UPDATE SUMMARY")
|
|
15
|
-
print("=" * 80)
|
|
16
|
-
|
|
17
|
-
# Calculate statistics
|
|
18
|
-
total_repos = len(results)
|
|
19
|
-
successful_repos = sum(1 for r in results if r["status"] == "success")
|
|
20
|
-
error_repos = sum(1 for r in results if r["status"] == "error")
|
|
21
|
-
skipped_repos = sum(1 for r in results if r["status"] == "skipped")
|
|
22
|
-
auth_failed_repos = sum(1 for r in results if r["status"] == "auth_failed")
|
|
23
|
-
|
|
24
|
-
repos_with_changes = sum(1 for r in results if r["commits_changed"])
|
|
25
|
-
repos_with_uncommitted = sum(1 for r in results if r["had_uncommitted_changes"])
|
|
26
|
-
repos_with_dep_changes = sum(1 for r in results if r["dependencies_changed"])
|
|
27
|
-
uv_sync_runs = sum(1 for r in results if r["uv_sync_ran"])
|
|
28
|
-
uv_sync_successes = sum(1 for r in results if r["uv_sync_ran"] and r["uv_sync_success"])
|
|
29
|
-
|
|
30
|
-
# Overview statistics
|
|
31
|
-
print("📈 OVERVIEW:")
|
|
32
|
-
print(f" Total repositories processed: {total_repos}")
|
|
33
|
-
print(f" ✅ Successful updates: {successful_repos}")
|
|
34
|
-
print(f" ❌ Failed updates: {error_repos}")
|
|
35
|
-
print(f" ⏭️ Skipped: {skipped_repos}")
|
|
36
|
-
if auth_failed_repos > 0:
|
|
37
|
-
print(f" 🔐 Authentication failed: {auth_failed_repos}")
|
|
38
|
-
print()
|
|
39
|
-
|
|
40
|
-
print("🔄 CHANGES:")
|
|
41
|
-
print(f" Repositories with new commits: {repos_with_changes}")
|
|
42
|
-
print(f" Repositories with dependency changes: {repos_with_dep_changes}")
|
|
43
|
-
print(f" Repositories with uncommitted changes: {repos_with_uncommitted}")
|
|
44
|
-
print()
|
|
45
|
-
|
|
46
|
-
print("📦 UV SYNC:")
|
|
47
|
-
print(f" uv sync operations attempted: {uv_sync_runs}")
|
|
48
|
-
print(f" uv sync operations successful: {uv_sync_successes}")
|
|
49
|
-
if uv_sync_runs > uv_sync_successes:
|
|
50
|
-
print(f" uv sync operations failed: {uv_sync_runs - uv_sync_successes}")
|
|
51
|
-
print()
|
|
52
|
-
|
|
53
|
-
# Detailed results per repository
|
|
54
|
-
print("📋 DETAILED RESULTS:")
|
|
55
|
-
for result in results:
|
|
56
|
-
repo_name = Path(result["repo_path"]).name
|
|
57
|
-
status_icon = {"success": "✅", "error": "❌", "skipped": "⏭️", "auth_failed": "🔐"}.get(result["status"], "❓")
|
|
58
|
-
print(f" {status_icon} {repo_name}")
|
|
59
|
-
|
|
60
|
-
if result["status"] == "error" and result["error_message"]:
|
|
61
|
-
print(f" 💥 Error: {result['error_message']}")
|
|
62
|
-
|
|
63
|
-
if result["commits_changed"]:
|
|
64
|
-
print(f" 🔄 Updated: {result['commit_before'][:8]} → {result['commit_after'][:8]}")
|
|
65
|
-
elif result["status"] == "success":
|
|
66
|
-
print(" 📍 Already up to date")
|
|
67
|
-
|
|
68
|
-
if result["had_uncommitted_changes"]:
|
|
69
|
-
files_str = ", ".join(result["uncommitted_files"])
|
|
70
|
-
print(f" ⚠️ Had uncommitted changes: {files_str}")
|
|
71
|
-
|
|
72
|
-
if result["dependencies_changed"]:
|
|
73
|
-
changes = []
|
|
74
|
-
if result["pyproject_changed"]:
|
|
75
|
-
changes.append("pyproject.toml")
|
|
76
|
-
print(f" 📋 Dependencies changed: {', '.join(changes)}")
|
|
77
|
-
|
|
78
|
-
if result["uv_sync_ran"]:
|
|
79
|
-
sync_status = "✅" if result["uv_sync_success"] else "❌"
|
|
80
|
-
print(f" 📦 uv sync: {sync_status}")
|
|
81
|
-
|
|
82
|
-
if result["is_machineconfig_repo"] and result["permissions_updated"]:
|
|
83
|
-
print(" 🛠 Updated permissions for machineconfig files")
|
|
84
|
-
|
|
85
|
-
if result["remotes_processed"]:
|
|
86
|
-
print(f" 📡 Processed remotes: {', '.join(result['remotes_processed'])}")
|
|
87
|
-
if result["remotes_skipped"]:
|
|
88
|
-
print(f" ⏭️ Skipped remotes: {', '.join(result['remotes_skipped'])}")
|
|
89
|
-
|
|
90
|
-
print("\n" + "=" * 80)
|
|
91
|
-
|
|
92
|
-
# Final status
|
|
93
|
-
if error_repos == 0 and auth_failed_repos == 0:
|
|
94
|
-
print("🎉 All repositories processed successfully!")
|
|
95
|
-
elif successful_repos > 0:
|
|
96
|
-
print(f"⚠️ {successful_repos}/{total_repos} repositories processed successfully")
|
|
97
|
-
else:
|
|
98
|
-
print("❌ No repositories were successfully processed")
|
|
99
|
-
print("=" * 80)
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
def main(verbose: bool = True, allow_password_prompt: bool = False) -> None:
|
|
103
|
-
"""Main function to update all configured repositories."""
|
|
104
|
-
_ = verbose
|
|
105
|
-
repos: list[PathExtended] = [PathExtended.home() / "code/machineconfig", PathExtended.home() / "code/crocodile"]
|
|
106
|
-
try:
|
|
107
|
-
tmp = read_ini(DEFAULTS_PATH)["general"]["repos"].split(",")
|
|
108
|
-
if tmp[-1] == "":
|
|
109
|
-
tmp = tmp[:-1]
|
|
110
|
-
for item in tmp:
|
|
111
|
-
item_obj = PathExtended(item).expanduser()
|
|
112
|
-
if item_obj not in repos:
|
|
113
|
-
repos.append(item_obj)
|
|
114
|
-
except (FileNotFoundError, KeyError, IndexError):
|
|
115
|
-
print(f"""
|
|
116
|
-
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
117
|
-
┃ 🚫 Configuration Error: Missing {DEFAULTS_PATH} or section [general] or key repos
|
|
118
|
-
┃ ℹ️ Using default repositories instead
|
|
119
|
-
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━""")
|
|
120
|
-
print("""
|
|
121
|
-
┌────────────────────────────────────────────────────────────────
|
|
122
|
-
│ ✨ Example Configuration:
|
|
123
|
-
│
|
|
124
|
-
│ [general]
|
|
125
|
-
│ repos = ~/code/repo1,~/code/repo2
|
|
126
|
-
│ rclone_config_name = onedrivePersonal
|
|
127
|
-
│ email_config_name = Yahoo3
|
|
128
|
-
│ to_email = myemail@email.com
|
|
129
|
-
└────────────────────────────────────────────────────────────────""")
|
|
130
|
-
|
|
131
|
-
# Process repositories
|
|
132
|
-
results: list[RepositoryUpdateResult] = []
|
|
133
|
-
repos_with_changes = []
|
|
134
|
-
|
|
135
|
-
for expanded_path in repos:
|
|
136
|
-
try:
|
|
137
|
-
repo = git.Repo(str(expanded_path), search_parent_directories=True)
|
|
138
|
-
# Update repository and get detailed results
|
|
139
|
-
result = update_repository(repo, allow_password_prompt=allow_password_prompt, auto_sync=True)
|
|
140
|
-
results.append(result)
|
|
141
|
-
|
|
142
|
-
# Keep track of repos with dependency changes for additional uv sync
|
|
143
|
-
if result["dependencies_changed"] and not result["uv_sync_ran"]:
|
|
144
|
-
repos_with_changes.append(Path(repo.working_dir))
|
|
145
|
-
|
|
146
|
-
except Exception as ex:
|
|
147
|
-
# Create a result for failed repos
|
|
148
|
-
error_result: RepositoryUpdateResult = {
|
|
149
|
-
"repo_path": str(expanded_path),
|
|
150
|
-
"status": "error",
|
|
151
|
-
"had_uncommitted_changes": False,
|
|
152
|
-
"uncommitted_files": [],
|
|
153
|
-
"commit_before": "",
|
|
154
|
-
"commit_after": "",
|
|
155
|
-
"commits_changed": False,
|
|
156
|
-
"pyproject_changed": False,
|
|
157
|
-
"dependencies_changed": False,
|
|
158
|
-
"uv_sync_ran": False,
|
|
159
|
-
"uv_sync_success": False,
|
|
160
|
-
"remotes_processed": [],
|
|
161
|
-
"remotes_skipped": [],
|
|
162
|
-
"error_message": str(ex),
|
|
163
|
-
"is_machineconfig_repo": False,
|
|
164
|
-
"permissions_updated": False,
|
|
165
|
-
}
|
|
166
|
-
results.append(error_result)
|
|
167
|
-
print(f"""❌ Repository Error: Path: {expanded_path}
|
|
168
|
-
Exception: {ex}
|
|
169
|
-
{"-" * 50}""")
|
|
170
|
-
|
|
171
|
-
# Run uv sync for repositories where pyproject.toml changed but sync wasn't run yet
|
|
172
|
-
for repo_path in repos_with_changes:
|
|
173
|
-
run_uv_sync(repo_path)
|
|
174
|
-
|
|
175
|
-
# Generate and display summary
|
|
176
|
-
_display_summary(results)
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
if __name__ == "__main__":
|
|
180
|
-
main()
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"""Like yadm and dotter."""
|
|
2
|
-
|
|
3
|
-
from machineconfig.utils.path_extended import PathExtended as PathExtended
|
|
4
|
-
from machineconfig.utils.links import symlink_func
|
|
5
|
-
from machineconfig.utils.source_of_truth import LIBRARY_ROOT, REPO_ROOT
|
|
6
|
-
import argparse
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
def main():
|
|
10
|
-
parser = argparse.ArgumentParser(description="FTP client")
|
|
11
|
-
|
|
12
|
-
parser.add_argument("file", help="file/folder path.", default="")
|
|
13
|
-
# FLAGS
|
|
14
|
-
parser.add_argument("--overwrite", "-o", help="Overwrite.", action="store_true") # default is False
|
|
15
|
-
# optional
|
|
16
|
-
parser.add_argument("-d", "--dest", help="destination folder", default="")
|
|
17
|
-
|
|
18
|
-
args = parser.parse_args()
|
|
19
|
-
orig_path = PathExtended(args.file).expanduser().absolute()
|
|
20
|
-
if args.dest == "":
|
|
21
|
-
if "Local" in str(orig_path):
|
|
22
|
-
junction = orig_path.split(at="Local", sep=-1)[1]
|
|
23
|
-
elif "Roaming" in str(orig_path):
|
|
24
|
-
junction = orig_path.split(at="Roaming", sep=-1)[1]
|
|
25
|
-
elif ".config" in str(orig_path):
|
|
26
|
-
junction = orig_path.split(at=".config", sep=-1)[1]
|
|
27
|
-
else:
|
|
28
|
-
junction = orig_path.rel2home()
|
|
29
|
-
new_path = PathExtended(REPO_ROOT).joinpath(junction)
|
|
30
|
-
else:
|
|
31
|
-
dest_path = PathExtended(args.dest).expanduser().absolute()
|
|
32
|
-
dest_path.mkdir(parents=True, exist_ok=True)
|
|
33
|
-
new_path = dest_path.joinpath(orig_path.name)
|
|
34
|
-
|
|
35
|
-
symlink_func(this=orig_path, to_this=new_path, prioritize_to_this=args.overwrite)
|
|
36
|
-
|
|
37
|
-
print("""
|
|
38
|
-
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
39
|
-
┃ ✅ Symbolic Link Created Successfully
|
|
40
|
-
┃
|
|
41
|
-
┃ 🔄 To enshrine this mapping, add the following to mapper.toml:
|
|
42
|
-
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━""")
|
|
43
|
-
print(f"""
|
|
44
|
-
📝 Edit configuration file: nano {PathExtended(LIBRARY_ROOT)}/symlinks/mapper.toml
|
|
45
|
-
|
|
46
|
-
[{new_path.parent.name}]
|
|
47
|
-
{orig_path.name.split(".")[0]} = {{ this = '{orig_path.collapseuser().as_posix()}', to_this = '{new_path.collapseuser().as_posix()}' }}
|
|
48
|
-
""")
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if __name__ == "__main__":
|
|
52
|
-
main()
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
"""Utility to launch multiple AI agent prompts in a Zellij session.
|
|
2
|
-
|
|
3
|
-
Improved design notes:
|
|
4
|
-
* Clear separation of: input collection, prompt preparation, agent launch.
|
|
5
|
-
* Configurable max agent cap (default 15) with interactive confirmation if exceeded.
|
|
6
|
-
* Added type aliases + docstrings for maintainability.
|
|
7
|
-
* Preserves original core behavior & command generation for each agent type.
|
|
8
|
-
"""
|
|
9
|
-
|
|
10
|
-
from pathlib import Path
|
|
11
|
-
from typing import cast, get_args, Iterable, TypeAlias, Literal
|
|
12
|
-
import json
|
|
13
|
-
import sys
|
|
14
|
-
|
|
15
|
-
from machineconfig.scripts.python.fire_agents_help_launch import prep_agent_launch, get_agents_launch_layout, AGENTS
|
|
16
|
-
from machineconfig.scripts.python.fire_agents_help_search import search_files_by_pattern, search_python_files
|
|
17
|
-
from machineconfig.scripts.python.fire_agents_load_balancer import chunk_prompts, SPLITTING_STRATEGY, DEFAULT_AGENT_CAP
|
|
18
|
-
from machineconfig.utils.options import choose_from_options
|
|
19
|
-
from machineconfig.utils.schemas.layouts.layout_types import TabConfig, LayoutConfig
|
|
20
|
-
from machineconfig.utils.accessories import get_repo_root
|
|
21
|
-
|
|
22
|
-
SEARCH_STRATEGIES: TypeAlias = Literal["file_path", "keyword_search", "filename_pattern"]
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
def _write_list_file(target: Path, files: Iterable[Path]) -> None:
|
|
26
|
-
target.parent.mkdir(parents=True, exist_ok=True)
|
|
27
|
-
target.write_text("\n".join(str(f) for f in files), encoding="utf-8")
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
def get_prompt_material(search_strategy: SEARCH_STRATEGIES, repo_root: Path) -> tuple[Path, str]:
|
|
31
|
-
if search_strategy == "file_path":
|
|
32
|
-
file_path_input = input("Enter path to target file: ").strip()
|
|
33
|
-
if not file_path_input:
|
|
34
|
-
print("No file path provided. Exiting.")
|
|
35
|
-
sys.exit(1)
|
|
36
|
-
target_file_path = Path(file_path_input).expanduser().resolve()
|
|
37
|
-
if not target_file_path.exists() or not target_file_path.is_file():
|
|
38
|
-
print(f"Invalid file path: {target_file_path}")
|
|
39
|
-
sys.exit(1)
|
|
40
|
-
separator = input("Enter separator [\\n]: ").strip() or "\n"
|
|
41
|
-
elif search_strategy == "keyword_search":
|
|
42
|
-
keyword = input("Enter keyword to search recursively for all .py files containing it: ").strip()
|
|
43
|
-
if not keyword:
|
|
44
|
-
print("No keyword supplied. Exiting.")
|
|
45
|
-
sys.exit(1)
|
|
46
|
-
matching_files = search_python_files(repo_root, keyword)
|
|
47
|
-
if not matching_files:
|
|
48
|
-
print(f"💥 No .py files found containing keyword: {keyword}")
|
|
49
|
-
sys.exit(1)
|
|
50
|
-
for idx, mf in enumerate(matching_files):
|
|
51
|
-
print(f"{idx:>3}: {mf}")
|
|
52
|
-
print(f"\nFound {len(matching_files)} .py files containing keyword: {keyword}")
|
|
53
|
-
target_file_path = repo_root / ".ai" / "target_file.txt"
|
|
54
|
-
_write_list_file(target_file_path, matching_files)
|
|
55
|
-
separator = "\n"
|
|
56
|
-
elif search_strategy == "filename_pattern":
|
|
57
|
-
pattern = input("Enter filename pattern (e.g., '*.py', '*test*', 'config.*'): ").strip()
|
|
58
|
-
if not pattern:
|
|
59
|
-
print("No pattern supplied. Exiting.")
|
|
60
|
-
sys.exit(1)
|
|
61
|
-
matching_files = search_files_by_pattern(repo_root, pattern)
|
|
62
|
-
if not matching_files:
|
|
63
|
-
print(f"💥 No files found matching pattern: {pattern}")
|
|
64
|
-
sys.exit(1)
|
|
65
|
-
for idx, mf in enumerate(matching_files):
|
|
66
|
-
print(f"{idx:>3}: {mf}")
|
|
67
|
-
print(f"\nFound {len(matching_files)} files matching pattern: {pattern}")
|
|
68
|
-
target_file_path = repo_root / ".ai" / "target_file.txt"
|
|
69
|
-
_write_list_file(target_file_path, matching_files)
|
|
70
|
-
separator = "\n"
|
|
71
|
-
else:
|
|
72
|
-
raise ValueError(f"Unknown search strategy: {search_strategy}")
|
|
73
|
-
return target_file_path, separator
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
def main(): # noqa: C901 - (complexity acceptable for CLI glue)
|
|
77
|
-
repo_root = get_repo_root(Path.cwd())
|
|
78
|
-
if repo_root is None:
|
|
79
|
-
print("💥 Could not determine the repository root. Please run this script from within a git repository.")
|
|
80
|
-
sys.exit(1)
|
|
81
|
-
print(f"Operating @ {repo_root}")
|
|
82
|
-
|
|
83
|
-
search_strategy = cast(SEARCH_STRATEGIES, choose_from_options(multi=False, msg="Choose one option", header="Choose search strategy:", options=get_args(SEARCH_STRATEGIES)))
|
|
84
|
-
splitting_strategy = cast(SPLITTING_STRATEGY, choose_from_options(multi=False, msg="Choose one option", header="Choose prompt splitting strategy:", options=get_args(SPLITTING_STRATEGY)))
|
|
85
|
-
agent_selected = cast(AGENTS, choose_from_options(multi=False, msg="Choose one option", header="Select agent type", options=get_args(AGENTS)))
|
|
86
|
-
print("Enter prefix prompt (end with Ctrl-D / Ctrl-Z):")
|
|
87
|
-
prompt_prefix = "\n".join(sys.stdin.readlines())
|
|
88
|
-
job_name = input("Enter job name [AI_AGENTS]: ") or "AI_Agents"
|
|
89
|
-
keep_material_in_separate_file_input = input("Keep prompt material in separate file? [y/N]: ").strip().lower() == "y"
|
|
90
|
-
|
|
91
|
-
prompt_material_path, separator = get_prompt_material(search_strategy=search_strategy, repo_root=repo_root)
|
|
92
|
-
match splitting_strategy:
|
|
93
|
-
case "agent_cap":
|
|
94
|
-
agent_cap_input = input(f"Enter maximum number of agents/splits [default: {DEFAULT_AGENT_CAP}]: ").strip()
|
|
95
|
-
agent_cap = int(agent_cap_input) if agent_cap_input else DEFAULT_AGENT_CAP
|
|
96
|
-
task_rows = None
|
|
97
|
-
case "task_rows":
|
|
98
|
-
task_rows_input: str = input("Enter number of rows/tasks per agent [13]: ").strip() or "13"
|
|
99
|
-
task_rows = int(task_rows_input)
|
|
100
|
-
agent_cap = None
|
|
101
|
-
prompt_material_re_splitted = chunk_prompts(prompt_material_path, splitting_strategy, agent_cap=agent_cap, task_rows=task_rows, joiner=separator)
|
|
102
|
-
|
|
103
|
-
agents_dir = prep_agent_launch(repo_root=repo_root, prompts_material=prompt_material_re_splitted, keep_material_in_separate_file=keep_material_in_separate_file_input, prompt_prefix=prompt_prefix, agent=agent_selected, job_name=job_name)
|
|
104
|
-
layoutfile = get_agents_launch_layout(session_root=agents_dir)
|
|
105
|
-
|
|
106
|
-
regenerate_py_code = f"""
|
|
107
|
-
#!/usr/bin/env uv run --python 3.13 --with machineconfig
|
|
108
|
-
#!/usr/bin/env uv run --project $HOME/code/machineconfig
|
|
109
|
-
|
|
110
|
-
from machineconfig.scripts.python.fire_agents import *
|
|
111
|
-
|
|
112
|
-
repo_root = Path("{repo_root}")
|
|
113
|
-
search_strategy = "{search_strategy}"
|
|
114
|
-
splitting_strategy = "{splitting_strategy}"
|
|
115
|
-
agent_selected = "{agent_selected}"
|
|
116
|
-
prompt_prefix = '''{prompt_prefix}'''
|
|
117
|
-
job_name = "{job_name}"
|
|
118
|
-
keep_material_in_separate_file_input = {keep_material_in_separate_file_input}
|
|
119
|
-
separator = "{separator}"
|
|
120
|
-
prompt_material_path = Path("{prompt_material_path}")
|
|
121
|
-
agent_cap = {agent_cap}
|
|
122
|
-
task_rows = {task_rows}
|
|
123
|
-
|
|
124
|
-
prompt_material_re_splitted = chunk_prompts(prompt_material_path, splitting_strategy, agent_cap=agent_cap, task_rows=task_rows, joiner=separator)
|
|
125
|
-
agents_dir = prep_agent_launch(repo_root=repo_root, prompts_material=prompt_material_re_splitted, keep_material_in_separate_file=keep_material_in_separate_file_input, prompt_prefix=prompt_prefix, agent=agent_selected, job_name=job_name)
|
|
126
|
-
layout = get_agents_launch_layout(session_root=agents_dir)
|
|
127
|
-
|
|
128
|
-
(agents_dir / "aa_agents_relaunch.py").write_text(data=regenerate_py_code, encoding="utf-8")
|
|
129
|
-
(agents_dir / "layout.json").write_text(data=json.dumps(layout, indent=2), encoding="utf-8")
|
|
130
|
-
|
|
131
|
-
if len(layout["layoutTabs"]) > 25:
|
|
132
|
-
print("Too many agents (>25) to launch. Skipping launch.")
|
|
133
|
-
sys.exit(0)
|
|
134
|
-
manager = ZellijLocalManager(session_layouts=[layout])
|
|
135
|
-
manager.start_all_sessions()
|
|
136
|
-
manager.run_monitoring_routine()
|
|
137
|
-
|
|
138
|
-
"""
|
|
139
|
-
(agents_dir / "aa_agents_relaunch.py").write_text(data=regenerate_py_code, encoding="utf-8")
|
|
140
|
-
(agents_dir / "layout.json").write_text(data=json.dumps(layoutfile, indent=2), encoding="utf-8")
|
|
141
|
-
|
|
142
|
-
MAX_TABS = 10
|
|
143
|
-
if len(layoutfile["layouts"][0]["layoutTabs"]) > MAX_TABS:
|
|
144
|
-
print(f"Too many tabs (>{MAX_TABS}) to launch. Skipping launch.")
|
|
145
|
-
sys.exit(0)
|
|
146
|
-
from machineconfig.cluster.sessions_managers.zellij_local_manager import ZellijLocalManager
|
|
147
|
-
|
|
148
|
-
manager = ZellijLocalManager(session_layouts=layoutfile["layouts"])
|
|
149
|
-
manager.start_all_sessions(poll_interval=2, poll_seconds=2)
|
|
150
|
-
manager.run_monitoring_routine(wait_ms=2000)
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
def split_too_many_tabs_to_run_in_sequential_sessions(layout_tabs: list[TabConfig], every: int):
|
|
154
|
-
from machineconfig.utils.accessories import split
|
|
155
|
-
from machineconfig.cluster.sessions_managers.zellij_local_manager import ZellijLocalManager
|
|
156
|
-
|
|
157
|
-
for idx, layout_tabs_chunk in enumerate(split(layout_tabs, every=every)):
|
|
158
|
-
a_layout_file: LayoutConfig = {"layoutName": f"split_{idx}", "layoutTabs": layout_tabs_chunk}
|
|
159
|
-
manager = ZellijLocalManager(session_layouts=[a_layout_file])
|
|
160
|
-
manager.start_all_sessions(poll_interval=2, poll_seconds=2)
|
|
161
|
-
manager.run_monitoring_routine(wait_ms=2000)
|
|
162
|
-
manager.kill_all_sessions()
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
def split_too_many_layouts_to_run_in_sequential_sessions(layouts: list[LayoutConfig], every: int):
|
|
166
|
-
from machineconfig.utils.accessories import split
|
|
167
|
-
from machineconfig.cluster.sessions_managers.zellij_local_manager import ZellijLocalManager
|
|
168
|
-
|
|
169
|
-
for _idx, layout_chunk in enumerate(split(layouts, every=every)):
|
|
170
|
-
manager = ZellijLocalManager(session_layouts=layout_chunk)
|
|
171
|
-
manager.start_all_sessions(poll_interval=2, poll_seconds=2)
|
|
172
|
-
manager.run_monitoring_routine(wait_ms=2000)
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
if __name__ == "__main__": # pragma: no cover
|
|
176
|
-
main()
|