machineconfig 6.23__py3-none-any.whl → 8.12__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/cluster/remote/cloud_manager.py +1 -1
- machineconfig/cluster/remote/distribute.py +0 -1
- machineconfig/cluster/remote/file_manager.py +0 -2
- machineconfig/cluster/sessions_managers/{utils → helpers}/enhanced_command_runner.py +4 -6
- machineconfig/cluster/sessions_managers/utils/load_balancer.py +1 -1
- machineconfig/cluster/sessions_managers/utils/maker.py +69 -0
- machineconfig/cluster/sessions_managers/wt_local.py +16 -221
- machineconfig/cluster/sessions_managers/wt_local_manager.py +55 -193
- machineconfig/cluster/sessions_managers/wt_remote_manager.py +42 -198
- 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_reporting.py +76 -0
- machineconfig/cluster/sessions_managers/wt_utils/wt_helpers.py +199 -0
- machineconfig/cluster/sessions_managers/zellij_local.py +3 -3
- machineconfig/cluster/sessions_managers/zellij_local_manager.py +5 -3
- machineconfig/cluster/sessions_managers/zellij_remote.py +2 -2
- machineconfig/cluster/sessions_managers/zellij_remote_manager.py +3 -2
- machineconfig/cluster/sessions_managers/zellij_utils/example_usage.py +2 -2
- machineconfig/cluster/sessions_managers/zellij_utils/process_monitor.py +3 -7
- machineconfig/cluster/sessions_managers/{helpers → zellij_utils}/zellij_local_helper_with_panes.py +1 -1
- machineconfig/jobs/installer/check_installations.py +0 -1
- machineconfig/jobs/installer/installer_data.json +1408 -201
- machineconfig/jobs/installer/linux_scripts/q.sh +10 -7
- machineconfig/jobs/installer/linux_scripts/redis.sh +1 -0
- machineconfig/jobs/installer/package_groups.py +63 -92
- machineconfig/jobs/installer/powershell_scripts/install_fonts.ps1 +129 -34
- machineconfig/jobs/installer/python_scripts/boxes.py +61 -0
- machineconfig/jobs/installer/{custom_dev → python_scripts}/brave.py +5 -3
- machineconfig/jobs/installer/python_scripts/cloudflare_warp_cli.py +23 -0
- machineconfig/jobs/installer/{custom_dev → python_scripts}/code.py +4 -1
- machineconfig/jobs/installer/{custom_dev → python_scripts}/dubdb_adbc.py +1 -1
- machineconfig/jobs/installer/{custom → python_scripts}/hx.py +75 -18
- machineconfig/jobs/installer/{custom_dev → python_scripts}/nerdfont.py +2 -2
- machineconfig/jobs/installer/{custom_dev → python_scripts}/nerfont_windows_helper.py +27 -22
- machineconfig/jobs/installer/python_scripts/sysabc.py +139 -0
- machineconfig/jobs/installer/{custom_dev → python_scripts}/wezterm.py +2 -19
- machineconfig/jobs/installer/{custom_dev → python_scripts}/winget.py +10 -14
- machineconfig/jobs/installer/python_scripts/yazi.py +121 -0
- machineconfig/{scripts/python/nw → jobs/scripts/bash_scripts}/mount_nfs +0 -1
- machineconfig/jobs/scripts/powershell_scripts/mount_ssh.ps1 +13 -0
- machineconfig/jobs/scripts/powershell_scripts/obs.ps1 +4 -0
- machineconfig/jobs/scripts_dynamic/a.py +25 -0
- machineconfig/logger.py +0 -1
- machineconfig/profile/create_helper.py +56 -18
- machineconfig/profile/create_links.py +2 -1
- machineconfig/profile/create_links_export.py +64 -18
- machineconfig/profile/create_shell_profile.py +90 -132
- machineconfig/profile/mapper.toml +18 -8
- machineconfig/scripts/__init__.py +0 -4
- machineconfig/scripts/linux/wrap_mcfg +46 -0
- machineconfig/scripts/nu/wrap_mcfg.nu +69 -0
- machineconfig/scripts/python/agents.py +82 -60
- machineconfig/scripts/python/ai/initai.py +1 -19
- machineconfig/scripts/python/ai/scripts/command_runner.ps1 +33 -0
- machineconfig/scripts/python/ai/{command_runner → scripts}/command_runner.sh +1 -1
- machineconfig/scripts/python/ai/scripts/lint_and_type_check.sh +1 -1
- machineconfig/scripts/python/ai/solutions/copilot/{chatmodes/Thinking-Beast-Mode.chatmode.md → agents/Thinking-Beast-Mode.agent.md} +0 -1
- machineconfig/scripts/python/ai/solutions/copilot/{chatmodes/Ultimate-Transparent-Thinking-Beast-Mode.chatmode.md → agents/Ultimate-Transparent-Thinking-Beast-Mode.agent.md} +0 -1
- machineconfig/scripts/python/ai/solutions/copilot/{chatmodes/deepResearch.chatmode.md → agents/deepResearch.agent.md} +2 -2
- machineconfig/scripts/python/ai/solutions/copilot/github_copilot.py +5 -5
- machineconfig/scripts/python/ai/solutions/copilot/instructions/python/dev.instructions.md +4 -0
- machineconfig/scripts/python/ai/solutions/copilot/instructions/python/watch_exec.prompt.md +20 -0
- machineconfig/scripts/python/ai/solutions/generic.py +1 -1
- machineconfig/scripts/python/ai/{generate_files.py → utils/generate_files.py} +2 -2
- machineconfig/scripts/python/ai/{vscode_tasks.py → utils/vscode_tasks.py} +7 -2
- machineconfig/scripts/python/cloud.py +14 -9
- machineconfig/scripts/python/croshell.py +135 -117
- machineconfig/scripts/python/devops.py +48 -25
- machineconfig/scripts/python/devops_navigator.py +1 -5
- machineconfig/scripts/python/env_manager/env_manager_tui.py +204 -0
- machineconfig/scripts/python/env_manager/path_manager_tui.py +18 -9
- machineconfig/scripts/python/fire_jobs.py +127 -118
- machineconfig/scripts/python/ftpx.py +44 -17
- machineconfig/scripts/python/helpers/ast_search.py +74 -0
- machineconfig/scripts/python/helpers/qr_code.py +166 -0
- machineconfig/scripts/python/helpers/repo_rag.py +325 -0
- machineconfig/scripts/python/helpers/symantic_search.py +25 -0
- machineconfig/scripts/python/{helpers_fire → helpers_agents}/agentic_frameworks/fire_crush.json +1 -1
- machineconfig/scripts/python/helpers_agents/agentic_frameworks/fire_crush.py +39 -0
- machineconfig/scripts/python/{helpers_fire → helpers_agents}/agentic_frameworks/fire_cursor_agents.py +3 -4
- machineconfig/scripts/python/helpers_agents/agentic_frameworks/fire_gemini.py +55 -0
- machineconfig/scripts/python/helpers_agents/agentic_frameworks/fire_qwen.py +30 -0
- machineconfig/scripts/python/{helpers_fire → helpers_agents}/fire_agents_help_launch.py +37 -15
- machineconfig/scripts/python/helpers_agents/fire_agents_helper_types.py +41 -0
- machineconfig/scripts/python/helpers_agents/privacy/configs/aichat/config.yaml +5 -0
- machineconfig/scripts/python/helpers_agents/privacy/configs/aider/.aider.conf.yml +2 -0
- machineconfig/scripts/python/helpers_agents/privacy/configs/copilot/config.yml +1 -0
- machineconfig/scripts/python/helpers_agents/privacy/configs/crush/crush.json +10 -0
- machineconfig/scripts/python/helpers_agents/privacy/configs/gemini/settings.json +12 -0
- machineconfig/scripts/python/helpers_agents/privacy/privacy.py +109 -0
- machineconfig/scripts/python/helpers_agents/templates/prompt.txt +10 -0
- machineconfig/scripts/python/helpers_agents/templates/template.sh +34 -0
- machineconfig/scripts/python/{cloud_helpers → helpers_cloud}/cloud_copy.py +28 -21
- machineconfig/scripts/python/{cloud_helpers → helpers_cloud}/cloud_mount.py +19 -17
- machineconfig/scripts/python/{cloud_helpers → helpers_cloud}/cloud_sync.py +12 -11
- machineconfig/scripts/python/{cloud_helpers → helpers_cloud}/helpers2.py +1 -1
- machineconfig/scripts/python/helpers_croshell/crosh.py +39 -0
- machineconfig/scripts/python/{croshell_helpers → helpers_croshell}/start_slidev.py +6 -7
- machineconfig/scripts/python/helpers_devops/cli_config.py +105 -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 +221 -0
- machineconfig/scripts/python/{devops_helpers → helpers_devops}/cli_repos.py +60 -36
- machineconfig/scripts/python/helpers_devops/cli_self.py +172 -0
- machineconfig/scripts/python/helpers_devops/cli_share_file.py +137 -0
- machineconfig/scripts/python/helpers_devops/cli_share_server.py +142 -0
- machineconfig/scripts/python/{devops_helpers/cli_terminal.py → helpers_devops/cli_share_terminal.py} +15 -17
- machineconfig/scripts/python/{devops_helpers → helpers_devops}/devops_backup_retrieve.py +7 -10
- machineconfig/scripts/python/{devops_helpers → helpers_devops}/devops_status.py +7 -19
- machineconfig/scripts/python/{devops_helpers → helpers_devops}/devops_update_repos.py +1 -1
- machineconfig/scripts/python/helpers_devops/run_script.py +168 -0
- machineconfig/scripts/python/helpers_devops/themes/choose_starship_theme.bash +3 -0
- machineconfig/scripts/python/{devops_helpers → helpers_devops}/themes/choose_wezterm_theme.py +1 -1
- machineconfig/scripts/python/{helpers_fire/helpers4.py → helpers_fire_command/file_wrangler.py} +57 -20
- machineconfig/scripts/python/helpers_fire_command/fire_jobs_args_helper.py +2 -0
- machineconfig/scripts/python/helpers_fire_command/fire_jobs_route_helper.py +26 -16
- machineconfig/scripts/python/helpers_msearch/__init__.py +5 -0
- machineconfig/scripts/{linux → python/helpers_msearch/scripts_linux}/fzfg +3 -3
- machineconfig/scripts/python/helpers_msearch/scripts_windows/fzfg.ps1 +59 -0
- machineconfig/scripts/python/helpers_navigator/__init__.py +20 -0
- machineconfig/scripts/python/{helper_navigator → helpers_navigator}/command_builder.py +1 -1
- machineconfig/scripts/python/{helper_navigator → helpers_navigator}/command_detail.py +1 -1
- machineconfig/scripts/python/{helper_navigator → helpers_navigator}/command_tree.py +160 -23
- machineconfig/scripts/python/{helper_navigator → helpers_navigator}/main_app.py +5 -5
- machineconfig/scripts/python/helpers_network/address.py +176 -0
- machineconfig/scripts/python/helpers_network/address_switch.py +78 -0
- machineconfig/scripts/python/{nw → helpers_network}/mount_nfs.py +2 -2
- machineconfig/scripts/python/{nw → helpers_network}/mount_ssh.py +1 -1
- machineconfig/scripts/python/{nw/devops_add_identity.py → helpers_network/ssh_add_identity.py} +35 -1
- machineconfig/scripts/python/{nw/devops_add_ssh_key.py → helpers_network/ssh_add_ssh_key.py} +26 -7
- machineconfig/scripts/python/{nw → helpers_network}/ssh_debug_linux.py +7 -7
- machineconfig/scripts/python/{nw → helpers_network}/ssh_debug_windows.py +4 -4
- machineconfig/scripts/python/{nw → helpers_network}/wifi_conn.py +1 -53
- machineconfig/scripts/python/helpers_repos/action.py +209 -0
- machineconfig/scripts/python/helpers_repos/action_helper.py +150 -0
- machineconfig/scripts/python/{repos_helpers → helpers_repos}/clone.py +0 -1
- machineconfig/scripts/python/helpers_repos/cloud_repo_sync.py +80 -37
- machineconfig/scripts/python/{repos_helpers → helpers_repos}/entrypoint.py +5 -5
- machineconfig/scripts/python/helpers_repos/grource.py +2 -2
- machineconfig/scripts/python/{repos_helpers → helpers_repos}/record.py +3 -2
- machineconfig/scripts/python/helpers_repos/repo_analyzer_1.py +160 -0
- machineconfig/scripts/python/{repos_helpers/count_lines.py → helpers_repos/repo_analyzer_2.py} +113 -192
- machineconfig/scripts/python/{repos_helpers → helpers_repos}/sync.py +5 -5
- machineconfig/scripts/python/{sessions_helpers → helpers_sessions}/sessions_multiprocess.py +19 -13
- machineconfig/scripts/python/helpers_utils/download.py +150 -0
- machineconfig/scripts/python/helpers_utils/pdf.py +96 -0
- machineconfig/scripts/python/helpers_utils/python.py +187 -0
- machineconfig/scripts/python/interactive.py +26 -35
- machineconfig/scripts/python/{entry.py → mcfg_entry.py} +24 -10
- machineconfig/scripts/python/msearch.py +72 -0
- machineconfig/scripts/python/sessions.py +101 -38
- machineconfig/scripts/python/terminal.py +136 -0
- machineconfig/scripts/python/utils.py +62 -0
- machineconfig/scripts/windows/wrap_mcfg.ps1 +63 -0
- 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 +3 -2
- machineconfig/settings/lf/linux/lfrc +10 -11
- machineconfig/settings/lf/windows/lfcd.ps1 +1 -1
- machineconfig/settings/lf/windows/lfrc +15 -17
- machineconfig/settings/lf/windows/mkfile.ps1 +1 -1
- machineconfig/settings/linters/.ruff.toml +1 -1
- machineconfig/settings/marimo/marimo.toml +80 -0
- machineconfig/settings/marimo/snippets/globalize.py +34 -0
- machineconfig/settings/shells/bash/init.sh +57 -10
- machineconfig/settings/shells/ipy/profiles/default/startup/playext.py +1 -1
- machineconfig/settings/shells/nushell/config.nu +2 -35
- machineconfig/settings/shells/nushell/env.nu +45 -6
- machineconfig/settings/shells/nushell/init.nu +314 -0
- machineconfig/settings/shells/pwsh/init.ps1 +59 -23
- 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/television/cable_unix/alias.toml +8 -0
- machineconfig/settings/television/cable_unix/aws-buckets.toml +14 -0
- machineconfig/settings/television/cable_unix/aws-instances.toml +13 -0
- machineconfig/settings/television/cable_unix/bash-history.toml +8 -0
- machineconfig/settings/television/cable_unix/channels.toml +19 -0
- machineconfig/settings/television/cable_unix/dirs.toml +13 -0
- machineconfig/settings/television/cable_unix/distrobox-list.toml +42 -0
- machineconfig/settings/television/cable_unix/docker-images.toml +13 -0
- machineconfig/settings/television/cable_unix/dotfiles.toml +11 -0
- machineconfig/settings/television/cable_unix/env.toml +17 -0
- machineconfig/settings/television/cable_unix/files.toml +11 -0
- machineconfig/settings/television/cable_unix/fish-history.toml +8 -0
- machineconfig/settings/television/cable_unix/git-branch.toml +11 -0
- machineconfig/settings/television/cable_unix/git-diff.toml +10 -0
- machineconfig/settings/television/cable_unix/git-log.toml +12 -0
- machineconfig/settings/television/cable_unix/git-reflog.toml +12 -0
- machineconfig/settings/television/cable_unix/git-repos.toml +16 -0
- machineconfig/settings/television/cable_unix/guix.toml +20 -0
- machineconfig/settings/television/cable_unix/just-recipes.toml +18 -0
- machineconfig/settings/television/cable_unix/k8s-deployments.toml +36 -0
- machineconfig/settings/television/cable_unix/k8s-pods.toml +50 -0
- machineconfig/settings/television/cable_unix/k8s-services.toml +36 -0
- machineconfig/settings/television/cable_unix/man-pages.toml +24 -0
- machineconfig/settings/television/cable_unix/nu-history.toml +7 -0
- machineconfig/settings/television/cable_unix/procs.toml +20 -0
- machineconfig/settings/television/cable_unix/text.toml +17 -0
- machineconfig/settings/television/cable_unix/tldr.toml +18 -0
- machineconfig/settings/television/cable_unix/zsh-history.toml +9 -0
- machineconfig/settings/television/cable_windows/alias.toml +7 -0
- machineconfig/settings/television/cable_windows/dirs.toml +13 -0
- machineconfig/settings/television/cable_windows/docker-images.toml +13 -0
- machineconfig/settings/television/cable_windows/dotfiles.toml +11 -0
- machineconfig/settings/television/cable_windows/env.toml +17 -0
- machineconfig/settings/television/cable_windows/files.toml +14 -0
- machineconfig/settings/television/cable_windows/git-branch.toml +11 -0
- machineconfig/settings/television/cable_windows/git-diff.toml +10 -0
- machineconfig/settings/television/cable_windows/git-log.toml +11 -0
- machineconfig/settings/television/cable_windows/git-reflog.toml +11 -0
- machineconfig/settings/television/cable_windows/git-repos.toml +15 -0
- machineconfig/settings/television/cable_windows/nu-history.toml +7 -0
- machineconfig/settings/television/cable_windows/pwsh-history.toml +6 -0
- machineconfig/settings/television/cable_windows/text.toml +17 -0
- machineconfig/settings/yazi/init.lua +61 -0
- machineconfig/settings/yazi/keymap_linux.toml +94 -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/theme.toml +4 -0
- machineconfig/settings/yazi/yazi_linux.toml +84 -0
- machineconfig/settings/yazi/yazi_windows.toml +58 -0
- machineconfig/settings/zellij/layouts/st.kdl +39 -8
- machineconfig/setup_linux/__init__.py +2 -2
- machineconfig/setup_linux/apps_desktop.sh +8 -27
- machineconfig/setup_linux/web_shortcuts/interactive.sh +27 -11
- machineconfig/setup_linux/web_shortcuts/live_from_github.sh +31 -0
- 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 +3 -5
- machineconfig/setup_windows/ssh/openssh-server.ps1 +1 -1
- machineconfig/setup_windows/uv.ps1 +8 -1
- machineconfig/setup_windows/web_shortcuts/interactive.ps1 +26 -10
- machineconfig/setup_windows/web_shortcuts/live_from_github.ps1 +30 -0
- machineconfig/setup_windows/web_shortcuts/quick_init.ps1 +17 -0
- machineconfig/utils/accessories.py +7 -5
- machineconfig/utils/code.py +143 -167
- 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 +1 -1
- machineconfig/utils/files/headers.py +6 -11
- machineconfig/utils/files/read.py +3 -9
- machineconfig/utils/installer_utils/github_release_bulk.py +156 -119
- machineconfig/utils/installer_utils/install_from_url.py +183 -0
- machineconfig/utils/installer_utils/installer_class.py +44 -101
- machineconfig/utils/installer_utils/installer_cli.py +175 -0
- machineconfig/utils/installer_utils/installer_helper.py +129 -0
- machineconfig/utils/installer_utils/{installer_abc.py → installer_locator_utils.py} +39 -87
- machineconfig/utils/{installer.py → installer_utils/installer_runner.py} +17 -63
- machineconfig/utils/io.py +77 -4
- machineconfig/utils/links.py +56 -38
- machineconfig/utils/meta.py +235 -145
- machineconfig/utils/options.py +46 -18
- machineconfig/utils/options_tv.py +119 -0
- machineconfig/utils/path_extended.py +46 -97
- machineconfig/utils/path_helper.py +76 -23
- machineconfig/utils/procs.py +10 -23
- machineconfig/utils/scheduler.py +84 -115
- machineconfig/utils/scheduling.py +0 -3
- machineconfig/utils/schemas/fire_agents/fire_agents_input.py +1 -1
- machineconfig/utils/schemas/layouts/layout_types.py +1 -1
- machineconfig/utils/ssh.py +214 -476
- machineconfig/utils/ssh_utils/abc.py +5 -0
- machineconfig/utils/ssh_utils/copy_from_here.py +111 -0
- machineconfig/utils/ssh_utils/copy_to_here.py +303 -0
- machineconfig/utils/ssh_utils/utils.py +142 -0
- machineconfig/utils/ssh_utils/wsl.py +210 -0
- machineconfig/utils/terminal.py +3 -113
- machineconfig/utils/upgrade_packages.py +114 -28
- machineconfig/utils/ve.py +12 -4
- machineconfig-8.12.dist-info/METADATA +132 -0
- machineconfig-8.12.dist-info/RECORD +504 -0
- {machineconfig-6.23.dist-info → machineconfig-8.12.dist-info}/entry_points.txt +5 -1
- machineconfig/jobs/installer/linux_scripts/pgsql.sh +0 -41
- machineconfig/jobs/installer/linux_scripts/timescaledb.sh +0 -71
- machineconfig/jobs/linux/msc/cli_agents.sh +0 -16
- machineconfig/jobs/python/python_ve_symlink.py +0 -37
- machineconfig/jobs/python/vscode/api.py +0 -57
- machineconfig/jobs/windows/archive/archive_pygraphviz.ps1 +0 -12
- machineconfig/jobs/windows/archive/openssh-server_add_key.ps1 +0 -7
- machineconfig/jobs/windows/archive/openssh-server_copy-ssh-id.ps1 +0 -14
- machineconfig/scripts/linux/fzf2g +0 -21
- machineconfig/scripts/linux/fzfag +0 -17
- machineconfig/scripts/linux/fzffg +0 -25
- machineconfig/scripts/linux/fzfrga +0 -21
- machineconfig/scripts/linux/other/share_smb +0 -1
- machineconfig/scripts/linux/other/switch_ip +0 -20
- machineconfig/scripts/linux/skrg +0 -4
- machineconfig/scripts/linux/warp-cli.sh +0 -122
- machineconfig/scripts/linux/z_ls +0 -104
- machineconfig/scripts/python/ai/command_runner/prompt.txt +0 -9
- machineconfig/scripts/python/devops_helpers/cli_config.py +0 -81
- machineconfig/scripts/python/devops_helpers/cli_config_dotfile.py +0 -84
- machineconfig/scripts/python/devops_helpers/cli_data.py +0 -18
- machineconfig/scripts/python/devops_helpers/cli_nw.py +0 -73
- machineconfig/scripts/python/devops_helpers/cli_self.py +0 -117
- machineconfig/scripts/python/devops_helpers/cli_share_server.py +0 -104
- machineconfig/scripts/python/helper_navigator/__init__.py +0 -20
- machineconfig/scripts/python/helpers_fire/agentic_frameworks/fire_crush.py +0 -37
- machineconfig/scripts/python/helpers_fire/agentic_frameworks/fire_gemini.py +0 -44
- machineconfig/scripts/python/helpers_fire/agentic_frameworks/fire_qwen.py +0 -43
- machineconfig/scripts/python/helpers_fire/fire_agents_helper_types.py +0 -30
- machineconfig/scripts/python/helpers_fire/prompt.txt +0 -2
- machineconfig/scripts/python/helpers_fire/template.sh +0 -15
- machineconfig/scripts/python/helpers_repos/secure_repo.py +0 -15
- machineconfig/scripts/python/nw/add_ssh_key.py +0 -148
- machineconfig/scripts/python/nw/wsl_windows_transfer.py +0 -66
- machineconfig/scripts/python/repos_helpers/action.py +0 -378
- machineconfig/scripts/python/repos_helpers/count_lines_frontend.py +0 -17
- machineconfig/scripts/windows/fzfb.ps1 +0 -3
- machineconfig/scripts/windows/fzfg.ps1 +0 -2
- machineconfig/scripts/windows/fzfrga.bat +0 -20
- machineconfig/scripts/windows/mounts/mount_ssh.ps1 +0 -13
- machineconfig/settings/lf/linux/exe/fzf_nano.sh +0 -16
- machineconfig/settings/lf/windows/fzf_edit.ps1 +0 -6
- machineconfig/settings/lf/windows/tst.ps1 +0 -1
- machineconfig/settings/shells/pwsh/profile.ps1 +0 -0
- machineconfig/settings/yazi/keymap.toml +0 -0
- machineconfig/settings/yazi/yazi.toml +0 -4
- machineconfig/setup_linux/apps.sh +0 -66
- machineconfig/setup_linux/nix/cli_installation.sh +0 -137
- machineconfig/setup_linux/ssh/openssh_all.sh +0 -25
- machineconfig/setup_linux/ssh/openssh_wsl.sh +0 -38
- machineconfig/setup_windows/apps.ps1 +0 -62
- machineconfig/setup_windows/others/obs.ps1 +0 -4
- machineconfig/setup_windows/ssh/add_identity.ps1 +0 -11
- machineconfig/setup_windows/wt_and_pwsh/__init__.py +0 -0
- machineconfig/utils/installer_utils/installer.py +0 -225
- machineconfig-6.23.dist-info/METADATA +0 -84
- machineconfig-6.23.dist-info/RECORD +0 -428
- machineconfig/cluster/sessions_managers/{utils → helpers}/load_balancer_helper.py +0 -0
- machineconfig/cluster/sessions_managers/{helpers → zellij_utils}/zellij_local_helper.py +0 -0
- machineconfig/cluster/sessions_managers/{helpers → zellij_utils}/zellij_local_helper_restart.py +0 -0
- machineconfig/cluster/sessions_managers/{helpers → zellij_utils}/zellij_local_manager_helper.py +0 -0
- machineconfig/jobs/installer/linux_scripts/{warp-cli.sh → cloudflare_warp_cli.sh} +0 -0
- machineconfig/jobs/{linux/msc → installer/linux_scripts}/network.sh +0 -0
- machineconfig/jobs/installer/{custom_dev → python_scripts}/__init__.py +0 -0
- machineconfig/jobs/installer/{custom_dev → python_scripts}/alacritty.py +0 -0
- machineconfig/jobs/installer/{custom_dev → python_scripts}/bypass_paywall.py +0 -0
- machineconfig/jobs/installer/{custom_dev → python_scripts}/cursor.py +0 -0
- machineconfig/jobs/installer/{custom_dev → python_scripts}/espanso.py +0 -0
- machineconfig/jobs/installer/{custom → python_scripts}/gh.py +0 -0
- machineconfig/jobs/installer/{custom_dev → python_scripts}/goes.py +0 -0
- machineconfig/jobs/installer/{custom_dev → python_scripts}/lvim.py +0 -0
- machineconfig/jobs/installer/{custom_dev → python_scripts}/redis.py +0 -0
- machineconfig/{setup_linux/web_shortcuts → jobs/scripts/bash_scripts}/android.sh +0 -0
- machineconfig/jobs/{linux/msc → scripts/bash_scripts}/lid.sh +0 -0
- machineconfig/{setup_linux/others → jobs/scripts/bash_scripts}/mint_keyboard_shortcuts.sh +0 -0
- machineconfig/{scripts/python/nw → jobs/scripts/bash_scripts}/mount_drive +0 -0
- machineconfig/{scripts/python/nw → jobs/scripts/bash_scripts}/mount_nw_drive +0 -0
- machineconfig/{scripts/python/nw → jobs/scripts/bash_scripts}/mount_smb +0 -0
- machineconfig/{scripts/linux/other → jobs/scripts/bash_scripts}/share_cloud.sh +0 -0
- machineconfig/{scripts/linux/other → jobs/scripts/bash_scripts}/share_nfs +0 -0
- machineconfig/{scripts/linux/other → jobs/scripts/bash_scripts}/start_docker +0 -0
- machineconfig/{scripts → jobs/scripts/powershell_scripts}/Restore-ThunderbirdProfile.ps1 +0 -0
- machineconfig/{setup_windows/others → jobs/scripts/powershell_scripts}/docker.ps1 +0 -0
- machineconfig/{scripts/windows/mounts → jobs/scripts/powershell_scripts}/mount_nfs.ps1 +0 -0
- machineconfig/{scripts/windows/mounts → jobs/scripts/powershell_scripts}/mount_nw.ps1 +0 -0
- machineconfig/{scripts/windows/mounts → jobs/scripts/powershell_scripts}/mount_smb.ps1 +0 -0
- machineconfig/{setup_windows/others → jobs/scripts/powershell_scripts}/power_options.ps1 +0 -0
- machineconfig/{scripts/windows/mounts → jobs/scripts/powershell_scripts}/share_cloud.cmd +0 -0
- machineconfig/{scripts/windows/mounts → jobs/scripts/powershell_scripts}/share_smb.ps1 +0 -0
- machineconfig/{scripts/windows/mounts → jobs/scripts/powershell_scripts}/unlock_bitlocker.ps1 +0 -0
- machineconfig/{jobs/python → scripts/python/ai/utils}/__init__.py +0 -0
- machineconfig/scripts/python/{cloud_helpers → helpers_agents}/__init__.py +0 -0
- machineconfig/scripts/python/{croshell_helpers → helpers_agents/agentic_frameworks}/__init__.py +0 -0
- machineconfig/scripts/python/{helpers_fire → helpers_agents}/fire_agents_help_search.py +0 -0
- machineconfig/scripts/python/{helpers_fire → helpers_agents}/fire_agents_load_balancer.py +0 -0
- machineconfig/scripts/python/{helpers_fire → helpers_agents/templates}/template.ps1 +0 -0
- machineconfig/scripts/python/{devops_helpers → helpers_cloud}/__init__.py +0 -0
- machineconfig/scripts/python/{cloud_helpers → helpers_cloud}/cloud_helpers.py +1 -1
- /machineconfig/scripts/python/{cloud_helpers → helpers_cloud}/helpers5.py +0 -0
- /machineconfig/scripts/python/{devops_helpers/themes → helpers_croshell}/__init__.py +0 -0
- /machineconfig/scripts/python/{croshell_helpers → helpers_croshell}/pomodoro.py +0 -0
- /machineconfig/scripts/python/{croshell_helpers → helpers_croshell}/scheduler.py +0 -0
- /machineconfig/scripts/python/{croshell_helpers → helpers_croshell}/viewer.py +0 -0
- /machineconfig/scripts/python/{croshell_helpers → helpers_croshell}/viewer_template.py +0 -0
- /machineconfig/scripts/python/{helpers_fire → helpers_devops}/__init__.py +0 -0
- /machineconfig/scripts/python/{helpers_fire/agentic_frameworks → helpers_devops/themes}/__init__.py +0 -0
- /machineconfig/scripts/python/{devops_helpers → helpers_devops}/themes/choose_pwsh_theme.ps1 +0 -0
- /machineconfig/{jobs/windows/msc/cli_agents.bat → scripts/python/helpers_devops/themes/choose_starship_theme.ps1} +0 -0
- /machineconfig/{jobs/windows/msc/cli_agents.ps1 → scripts/python/helpers_fire_command/f.py} +0 -0
- /machineconfig/scripts/python/{helper_navigator → helpers_navigator}/data_models.py +0 -0
- /machineconfig/scripts/python/{helper_navigator → helpers_navigator}/search_bar.py +0 -0
- /machineconfig/scripts/python/{helpers_repos → helpers_network}/__init__.py +0 -0
- /machineconfig/scripts/python/{nw → helpers_network}/mount_nw_drive.py +0 -0
- /machineconfig/scripts/python/{nw → helpers_network}/onetimeshare.py +0 -0
- /machineconfig/scripts/python/{repos_helpers → helpers_repos}/update.py +0 -0
- /machineconfig/scripts/python/{nw → helpers_sessions}/__init__.py +0 -0
- /machineconfig/{scripts/python/sessions_helpers → settings/wt}/__init__.py +0 -0
- /machineconfig/{setup_windows/wt_and_pwsh → settings/wt}/set_wt_settings.py +0 -0
- {machineconfig-6.23.dist-info → machineconfig-8.12.dist-info}/WHEEL +0 -0
- {machineconfig-6.23.dist-info → machineconfig-8.12.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
|
|
2
|
+
import typer
|
|
3
|
+
from typing import Annotated, Literal
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def copy_both_assets():
|
|
7
|
+
import machineconfig.profile.create_helper as create_helper
|
|
8
|
+
create_helper.copy_assets_to_machine(which="scripts")
|
|
9
|
+
create_helper.copy_assets_to_machine(which="settings")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def init(which: Annotated[Literal["init", "ia", "live", "wrap"], typer.Argument(..., help="Comma-separated list of script names to run all initialization scripts.")] = "init",
|
|
13
|
+
run: Annotated[bool, typer.Option("--run/--no-run", "-r/-nr", help="Run the script after displaying it.")] = False,
|
|
14
|
+
) -> None:
|
|
15
|
+
import platform
|
|
16
|
+
if platform.system() == "Linux" or platform.system() == "Darwin":
|
|
17
|
+
match which:
|
|
18
|
+
case "init":
|
|
19
|
+
import machineconfig.settings as module
|
|
20
|
+
from pathlib import Path
|
|
21
|
+
if platform.system() == "Darwin":
|
|
22
|
+
init_path = Path(module.__file__).parent.joinpath("shells", "zsh", "init.sh")
|
|
23
|
+
else: init_path = Path(module.__file__).parent.joinpath("shells", "bash", "init.sh")
|
|
24
|
+
script = init_path.read_text(encoding="utf-8")
|
|
25
|
+
case "ia":
|
|
26
|
+
from machineconfig.setup_linux import INTERACTIVE as script_path
|
|
27
|
+
script = script_path.read_text(encoding="utf-8")
|
|
28
|
+
case "live":
|
|
29
|
+
from machineconfig.setup_linux import LIVE as script_path
|
|
30
|
+
script = script_path.read_text(encoding="utf-8")
|
|
31
|
+
case _:
|
|
32
|
+
typer.echo("Unsupported shell script for Linux.")
|
|
33
|
+
raise typer.Exit(code=1)
|
|
34
|
+
|
|
35
|
+
elif platform.system() == "Windows":
|
|
36
|
+
match which:
|
|
37
|
+
case "init":
|
|
38
|
+
import machineconfig.settings as module
|
|
39
|
+
from pathlib import Path
|
|
40
|
+
init_path = Path(module.__file__).parent.joinpath("shells", "powershell", "init.ps1")
|
|
41
|
+
script = init_path.read_text(encoding="utf-8")
|
|
42
|
+
case "ia":
|
|
43
|
+
from machineconfig.setup_windows import INTERACTIVE as script_path
|
|
44
|
+
script = script_path.read_text(encoding="utf-8")
|
|
45
|
+
case "live":
|
|
46
|
+
from machineconfig.setup_windows import LIVE as script_path
|
|
47
|
+
script = script_path.read_text(encoding="utf-8")
|
|
48
|
+
case _:
|
|
49
|
+
typer.echo("Unsupported shell script for Windows.")
|
|
50
|
+
raise typer.Exit(code=1)
|
|
51
|
+
else:
|
|
52
|
+
# raise NotImplementedError("Unsupported platform")
|
|
53
|
+
typer.echo("Unsupported platform for init scripts.")
|
|
54
|
+
raise typer.Exit(code=1)
|
|
55
|
+
if run:
|
|
56
|
+
from machineconfig.utils.code import exit_then_run_shell_script
|
|
57
|
+
exit_then_run_shell_script(script, strict=True)
|
|
58
|
+
else:
|
|
59
|
+
print(script)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def update(copy_assets: Annotated[bool, typer.Option("--assets-copy/--no-assets-copy", "-a/-na", help="Copy (overwrite) assets to the machine after the update")] = True,
|
|
63
|
+
link_public_configs: Annotated[bool, typer.Option("--link-public-configs/--no-link-public-configs", "-b/-nb", help="Link public configs after update (overwrites your configs!)")] = False,
|
|
64
|
+
):
|
|
65
|
+
"""🔄 UPDATE uv and machineconfig"""
|
|
66
|
+
from pathlib import Path
|
|
67
|
+
if Path.home().joinpath("code", "machineconfig").exists():
|
|
68
|
+
shell_script = """
|
|
69
|
+
uv self update
|
|
70
|
+
cd ~/code/machineconfig
|
|
71
|
+
git pull
|
|
72
|
+
uv tool install --upgrade --editable $HOME/code/machineconfig
|
|
73
|
+
"""
|
|
74
|
+
else:
|
|
75
|
+
shell_script = """
|
|
76
|
+
uv self update
|
|
77
|
+
uv tool install --upgrade machineconfig
|
|
78
|
+
"""
|
|
79
|
+
import platform
|
|
80
|
+
if platform.system() == "Windows":
|
|
81
|
+
from machineconfig.utils.code import exit_then_run_shell_script, get_uv_command_executing_python_script
|
|
82
|
+
from machineconfig.utils.meta import lambda_to_python_script
|
|
83
|
+
python_script = lambda_to_python_script(lambda: copy_both_assets(),
|
|
84
|
+
in_global=True, import_module=False)
|
|
85
|
+
uv_command, _py_file = get_uv_command_executing_python_script(python_script=python_script, uv_with=["machineconfig"], uv_project_dir=None)
|
|
86
|
+
exit_then_run_shell_script(shell_script + "\n" + uv_command, strict=True)
|
|
87
|
+
else:
|
|
88
|
+
from machineconfig.utils.code import run_shell_script
|
|
89
|
+
run_shell_script(shell_script)
|
|
90
|
+
if copy_assets:
|
|
91
|
+
copy_both_assets()
|
|
92
|
+
if link_public_configs:
|
|
93
|
+
import machineconfig.profile.create_links_export as create_links_export
|
|
94
|
+
create_links_export.main_public_from_parser(method="copy", on_conflict="overwrite-default-path", which="all", interactive=False)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def install(no_copy_assets: Annotated[bool, typer.Option("--no-assets-copy", "-na", help="Copy (overwrite) assets to the machine after the update")] = False):
|
|
98
|
+
"""📋 CLONE machienconfig locally and incorporate to shell profile for faster execution and nightly updates."""
|
|
99
|
+
from machineconfig.utils.code import run_shell_script, get_uv_run_command
|
|
100
|
+
from pathlib import Path
|
|
101
|
+
import platform
|
|
102
|
+
uv_run_command = get_uv_run_command(platform=platform.system()) # type: ignore
|
|
103
|
+
if Path.home().joinpath("code/machineconfig").exists():
|
|
104
|
+
run_shell_script(f""" {uv_run_command} tool install --upgrade --editable "{str(Path.home().joinpath("code/machineconfig"))}" """)
|
|
105
|
+
else:
|
|
106
|
+
run_shell_script(rf""" {uv_run_command} tool install --upgrade "machineconfig>=8.12" """)
|
|
107
|
+
from machineconfig.profile.create_shell_profile import create_default_shell_profile
|
|
108
|
+
if not no_copy_assets:
|
|
109
|
+
create_default_shell_profile() # involves copying assets too
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def interactive():
|
|
114
|
+
"""🤖 INTERACTIVE configuration of machine."""
|
|
115
|
+
from machineconfig.scripts.python.interactive import main
|
|
116
|
+
main()
|
|
117
|
+
|
|
118
|
+
def status():
|
|
119
|
+
"""📊 STATUS of machine, shell profile, apps, symlinks, dotfiles, etc."""
|
|
120
|
+
import machineconfig.scripts.python.helpers_devops.devops_status as helper
|
|
121
|
+
helper.main()
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def navigate():
|
|
125
|
+
"""📚 NAVIGATE command structure with TUI"""
|
|
126
|
+
import machineconfig.scripts.python as navigator
|
|
127
|
+
from pathlib import Path
|
|
128
|
+
path = Path(navigator.__file__).resolve().parent.joinpath("devops_navigator.py")
|
|
129
|
+
from machineconfig.utils.code import exit_then_run_shell_script
|
|
130
|
+
if Path.home().joinpath("code/machineconfig").exists(): executable = f"""--project "{str(Path.home().joinpath("code/machineconfig"))}" --with textual"""
|
|
131
|
+
else: executable = """--with "machineconfig>=8.12,textual" """
|
|
132
|
+
exit_then_run_shell_script(f"""uv run {executable} {path}""")
|
|
133
|
+
|
|
134
|
+
def readme():
|
|
135
|
+
from rich.console import Console
|
|
136
|
+
from rich.markdown import Markdown
|
|
137
|
+
import requests
|
|
138
|
+
|
|
139
|
+
# URL of the raw README.md file
|
|
140
|
+
url_readme = "https://raw.githubusercontent.com/thisismygitrepo/machineconfig/refs/heads/main/README.md"
|
|
141
|
+
|
|
142
|
+
# Fetch the content
|
|
143
|
+
response = requests.get(url_readme)
|
|
144
|
+
response.raise_for_status() # Raise an error for bad responses
|
|
145
|
+
|
|
146
|
+
# Parse markdown
|
|
147
|
+
md = Markdown(response.text)
|
|
148
|
+
|
|
149
|
+
# Render in terminal
|
|
150
|
+
console = Console()
|
|
151
|
+
console.print(md)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
def get_app():
|
|
155
|
+
cli_app = typer.Typer(help="🔄 [s] self operations subcommands", no_args_is_help=True, add_help_option=False, add_completion=False)
|
|
156
|
+
cli_app.command("update", no_args_is_help=False, help="🔄 [u] UPDATE machineconfig")(update)
|
|
157
|
+
cli_app.command("u", no_args_is_help=False, hidden=True)(update)
|
|
158
|
+
cli_app.command("interactive", no_args_is_help=False, help="🤖 [i] INTERACTIVE configuration of machine.")(interactive)
|
|
159
|
+
cli_app.command("i", no_args_is_help=False, help="INTERACTIVE configuration of machine.", hidden=True)(interactive)
|
|
160
|
+
cli_app.command(name="init", no_args_is_help=False, help="🦐 [t] Define and manage configurations")(init)
|
|
161
|
+
cli_app.command(name="t", no_args_is_help=False, hidden=True)(init)
|
|
162
|
+
cli_app.command("status", no_args_is_help=False, help="📊 [s] STATUS of machine, shell profile, apps, symlinks, dotfiles, etc.")(status)
|
|
163
|
+
cli_app.command("s", no_args_is_help=False, help="STATUS of machine, shell profile, apps, symlinks, dotfiles, etc.", hidden=True)(status)
|
|
164
|
+
cli_app.command("install", no_args_is_help=False, help="📋 [I] CLONE machienconfig locally and incorporate to shell profile for faster execution and nightly updates.")(install)
|
|
165
|
+
cli_app.command("I", no_args_is_help=False, help="CLONE machienconfig locally and incorporate to shell profile for faster execution and nightly updates.", hidden=True)(install)
|
|
166
|
+
cli_app.command("navigate", no_args_is_help=False, help="📚 [n] NAVIGATE command structure with TUI")(navigate)
|
|
167
|
+
cli_app.command("n", no_args_is_help=False, help="NAVIGATE command structure with TUI", hidden=True)(navigate)
|
|
168
|
+
|
|
169
|
+
cli_app.command("readme", no_args_is_help=False, help="📚 [r] render readme markdown in terminal.")(readme)
|
|
170
|
+
cli_app.command("r", no_args_is_help=False, hidden=True)(readme)
|
|
171
|
+
return cli_app
|
|
172
|
+
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
|
|
2
|
+
import typer
|
|
3
|
+
from typing import Annotated
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def share_file_receive(code_args: Annotated[list[str], typer.Argument(help="Receive code or relay command. Examples: '7121-donor-olympic-bicycle' or '--relay 10.17.62.206:443 7121-donor-olympic-bicycle'")],
|
|
7
|
+
) -> None:
|
|
8
|
+
"""Receive a file using croc with relay server.
|
|
9
|
+
Usage examples:
|
|
10
|
+
devops network receive 7121-donor-olympic-bicycle
|
|
11
|
+
devops network receive -- --relay 10.17.62.206:443 7121-donor-olympic-bicycle
|
|
12
|
+
devops network receive -- croc --relay 10.17.62.206:443 7121-donor-olympic-bicycle
|
|
13
|
+
"""
|
|
14
|
+
from machineconfig.utils.installer_utils.installer_cli import install_if_missing
|
|
15
|
+
install_if_missing(which="croc")
|
|
16
|
+
import platform
|
|
17
|
+
import sys
|
|
18
|
+
|
|
19
|
+
is_windows = platform.system() == "Windows"
|
|
20
|
+
|
|
21
|
+
# If no args passed via typer, try to get them from sys.argv directly
|
|
22
|
+
# This handles the case where -- was used and arguments weren't parsed by typer
|
|
23
|
+
if not code_args or (len(code_args) == 1 and code_args[0] in ['--relay', 'croc']):
|
|
24
|
+
# Find the index of 'rx' or 'receive' in sys.argv and get everything after it
|
|
25
|
+
try:
|
|
26
|
+
for i, arg in enumerate(sys.argv):
|
|
27
|
+
if arg in ['rx', 'receive', 'r'] and i + 1 < len(sys.argv):
|
|
28
|
+
code_args = sys.argv[i + 1:]
|
|
29
|
+
break
|
|
30
|
+
except Exception:
|
|
31
|
+
pass
|
|
32
|
+
|
|
33
|
+
# Join all arguments
|
|
34
|
+
input_str = " ".join(code_args)
|
|
35
|
+
tokens = input_str.split()
|
|
36
|
+
|
|
37
|
+
# Parse input to extract relay server and secret code
|
|
38
|
+
relay_server: str | None = None
|
|
39
|
+
secret_code: str | None = None
|
|
40
|
+
|
|
41
|
+
# Remove 'croc' and 'export' from tokens if present
|
|
42
|
+
tokens = [t for t in tokens if t not in ['croc', 'export']]
|
|
43
|
+
|
|
44
|
+
# Look for --relay flag and capture next token
|
|
45
|
+
relay_idx = -1
|
|
46
|
+
for i, token in enumerate(tokens):
|
|
47
|
+
if token == '--relay' and i + 1 < len(tokens):
|
|
48
|
+
relay_server = tokens[i + 1]
|
|
49
|
+
relay_idx = i
|
|
50
|
+
break
|
|
51
|
+
|
|
52
|
+
# Look for CROC_SECRET= prefix in any token
|
|
53
|
+
for token in tokens:
|
|
54
|
+
if token.startswith('CROC_SECRET='):
|
|
55
|
+
secret_code = token.split('=', 1)[1].strip('"').strip("'")
|
|
56
|
+
break
|
|
57
|
+
|
|
58
|
+
# If no secret code found yet, look for tokens with dashes (typical pattern: number-word-word-word)
|
|
59
|
+
# Skip relay server and relay flag
|
|
60
|
+
if not secret_code:
|
|
61
|
+
for i, token in enumerate(tokens):
|
|
62
|
+
if '-' in token and not token.startswith('-') and token != relay_server:
|
|
63
|
+
if relay_idx >= 0 and (i == relay_idx or i == relay_idx + 1):
|
|
64
|
+
continue # Skip relay server parts
|
|
65
|
+
secret_code = token
|
|
66
|
+
break
|
|
67
|
+
|
|
68
|
+
if not secret_code and not relay_server:
|
|
69
|
+
typer.echo(f"❌ Error: Could not parse croc receive code from input: {input_str}", err=True)
|
|
70
|
+
typer.echo("Usage:", err=True)
|
|
71
|
+
typer.echo(" devops network receive 7121-donor-olympic-bicycle", err=True)
|
|
72
|
+
typer.echo(" devops network receive -- --relay 10.17.62.206:443 7121-donor-olympic-bicycle", err=True)
|
|
73
|
+
raise typer.Exit(code=1)
|
|
74
|
+
|
|
75
|
+
# Build the appropriate script for current OS
|
|
76
|
+
if is_windows:
|
|
77
|
+
# Windows PowerShell format: croc --relay server:port secret-code --yes
|
|
78
|
+
relay_arg = f"--relay {relay_server}" if relay_server else ""
|
|
79
|
+
code_arg = f"{secret_code}" if secret_code else ""
|
|
80
|
+
script = f"""croc {relay_arg} {code_arg} --yes""".strip()
|
|
81
|
+
else:
|
|
82
|
+
# Linux/macOS Bash format: CROC_SECRET="secret-code" croc --relay server:port --yes
|
|
83
|
+
relay_arg = f"--relay {relay_server}" if relay_server else ""
|
|
84
|
+
if secret_code:
|
|
85
|
+
script = f"""export CROC_SECRET="{secret_code}"
|
|
86
|
+
croc {relay_arg} --yes""".strip()
|
|
87
|
+
else:
|
|
88
|
+
script = f"""croc {relay_arg} --yes""".strip()
|
|
89
|
+
|
|
90
|
+
from machineconfig.utils.code import exit_then_run_shell_script, print_code
|
|
91
|
+
print_code(code=script, desc="🚀 Receiving file with croc", lexer="bash" if platform.system() != "Windows" else "powershell")
|
|
92
|
+
exit_then_run_shell_script(script=script, strict=False)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def share_file_send(path: Annotated[str, typer.Argument(help="Path to the file or directory to send")],
|
|
96
|
+
zip_folder: Annotated[bool, typer.Option("--zip", help="Zip folder before sending")] = False,
|
|
97
|
+
code: Annotated[str | None, typer.Option("--code", "-c", help="Codephrase used to connect to relay")] = None,
|
|
98
|
+
text: Annotated[str | None, typer.Option("--text", "-t", help="Send some text")] = None,
|
|
99
|
+
qrcode: Annotated[bool, typer.Option("--qrcode", "--qr", help="Show receive code as a qrcode")] = False,
|
|
100
|
+
) -> None:
|
|
101
|
+
"""Send a file using croc with relay server."""
|
|
102
|
+
from machineconfig.utils.installer_utils.installer_cli import install_if_missing
|
|
103
|
+
install_if_missing(which="croc")
|
|
104
|
+
# Get relay server IP from environment or use default
|
|
105
|
+
import machineconfig.scripts.python.helpers_network.address as helper
|
|
106
|
+
res = helper.select_lan_ipv4(prefer_vpn=False)
|
|
107
|
+
if res is None:
|
|
108
|
+
typer.echo("❌ Error: Could not determine local LAN IPv4 address for relay.", err=True)
|
|
109
|
+
raise typer.Exit(code=1)
|
|
110
|
+
local_ip_v4 = res
|
|
111
|
+
import platform
|
|
112
|
+
relay_port = "443"
|
|
113
|
+
is_windows = platform.system() == "Windows"
|
|
114
|
+
|
|
115
|
+
# Build command parts
|
|
116
|
+
relay_arg = f"--relay {local_ip_v4}:{relay_port} --ip {local_ip_v4}:{relay_port}"
|
|
117
|
+
zip_arg = "--zip" if zip_folder else ""
|
|
118
|
+
text_arg = f"--text '{text}'" if text else ""
|
|
119
|
+
qrcode_arg = "--qrcode" if qrcode else ""
|
|
120
|
+
path_arg = f"{path}" if not text else ""
|
|
121
|
+
|
|
122
|
+
if is_windows:
|
|
123
|
+
# Windows PowerShell format
|
|
124
|
+
code_arg = f"--code {code}" if code else ""
|
|
125
|
+
script = f"""croc {relay_arg} send {zip_arg} {code_arg} {qrcode_arg} {text_arg} {path_arg}"""
|
|
126
|
+
else:
|
|
127
|
+
# Linux/macOS Bash format
|
|
128
|
+
if code:
|
|
129
|
+
script = f"""export CROC_SECRET="{code}"
|
|
130
|
+
croc {relay_arg} send {zip_arg} {qrcode_arg} {text_arg} {path_arg}"""
|
|
131
|
+
else:
|
|
132
|
+
script = f"""croc {relay_arg} send {zip_arg} {qrcode_arg} {text_arg} {path_arg}"""
|
|
133
|
+
|
|
134
|
+
typer.echo(f"🚀 Sending file: {path}. Use: devops network receive")
|
|
135
|
+
from machineconfig.utils.code import exit_then_run_shell_script, print_code
|
|
136
|
+
print_code(code=script, desc="🚀 sending file with croc", lexer="bash" if platform.system() != "Windows" else "powershell")
|
|
137
|
+
exit_then_run_shell_script(script=script, strict=False)
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
from typing import Optional, Annotated
|
|
3
|
+
from machineconfig.scripts.python.helpers_devops.cli_share_file import share_file_receive, share_file_send
|
|
4
|
+
import typer
|
|
5
|
+
|
|
6
|
+
|
|
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
|
+
def web_file_explorer(
|
|
36
|
+
path: Annotated[str, typer.Argument(help="Path to the file or directory to share")],
|
|
37
|
+
port: Annotated[Optional[int], typer.Option("--port", "-p", help="Port to run the share server on (default: 8080)")] = None,
|
|
38
|
+
username: Annotated[Optional[str], typer.Option("--username", "-u", help="Username for share access (default: current user)")] = None,
|
|
39
|
+
password: Annotated[Optional[str], typer.Option("--password", "-w", help="Password for share access (default: from ~/dotfiles/creds/passwords/quick_password)")] = None,
|
|
40
|
+
over_internet: Annotated[bool, typer.Option("--over-internet", "-i", help="Expose the share server over the internet using ngrok")] = False,
|
|
41
|
+
backend: Annotated[str, typer.Option("--backend", "-b", help="Backend to use: filebrowser (default), miniserve, qrcp, or easy-sharing")] = "miniserve",
|
|
42
|
+
) -> None:
|
|
43
|
+
from machineconfig.utils.installer_utils.installer_cli import install_if_missing
|
|
44
|
+
|
|
45
|
+
if backend not in ["filebrowser", "miniserve", "qrcp", "easy-sharing"]:
|
|
46
|
+
typer.echo(f"❌ ERROR: Invalid backend '{backend}'. Must be one of: filebrowser, miniserve, qrcp, easy-sharing", err=True)
|
|
47
|
+
raise typer.Exit(code=1)
|
|
48
|
+
install_if_missing(which=backend)
|
|
49
|
+
if over_internet:
|
|
50
|
+
install_if_missing(which="ngrok")
|
|
51
|
+
if username is None:
|
|
52
|
+
import getpass
|
|
53
|
+
username = getpass.getuser()
|
|
54
|
+
|
|
55
|
+
if password is None:
|
|
56
|
+
pwd_path = Path.home().joinpath("dotfiles/creds/passwords/quick_password")
|
|
57
|
+
if pwd_path.exists():
|
|
58
|
+
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)
|
|
62
|
+
|
|
63
|
+
if port is None:
|
|
64
|
+
port = 8080
|
|
65
|
+
|
|
66
|
+
import machineconfig.scripts.python.helpers_network.address as helper
|
|
67
|
+
res = helper.select_lan_ipv4(prefer_vpn=False)
|
|
68
|
+
if res is None:
|
|
69
|
+
typer.echo("❌ ERROR: Could not determine local LAN IPv4 address for share server.", err=True)
|
|
70
|
+
raise typer.Exit(code=1)
|
|
71
|
+
local_ip_v4 = res
|
|
72
|
+
|
|
73
|
+
protocol = "http"
|
|
74
|
+
display_share_url(local_ip_v4, port, protocol)
|
|
75
|
+
|
|
76
|
+
path_obj = Path(path).resolve()
|
|
77
|
+
if not path_obj.exists():
|
|
78
|
+
typer.echo(f"❌ ERROR: Path does not exist: {path}", err=True)
|
|
79
|
+
raise typer.Exit(code=1)
|
|
80
|
+
|
|
81
|
+
if backend == "filebrowser":
|
|
82
|
+
db_path = Path.home().joinpath(".config/filebrowser/filebrowser.db")
|
|
83
|
+
db_path.parent.mkdir(parents=True, exist_ok=True)
|
|
84
|
+
command = f"""
|
|
85
|
+
filebrowser users add {username} "{password}" --database {db_path}
|
|
86
|
+
filebrowser --address 0.0.0.0 --port {port} --root "{path_obj}" --database {db_path}
|
|
87
|
+
"""
|
|
88
|
+
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}" """
|
|
90
|
+
elif backend == "easy-sharing":
|
|
91
|
+
command = f"""easy-sharing --port {port} --username {username} --password "{password}" "{path_obj}" """
|
|
92
|
+
elif backend == "qrcp":
|
|
93
|
+
command = f"""qrcp "{path_obj}" """
|
|
94
|
+
else:
|
|
95
|
+
typer.echo(f"❌ ERROR: Unknown backend '{backend}'", err=True)
|
|
96
|
+
raise typer.Exit(code=1)
|
|
97
|
+
|
|
98
|
+
from machineconfig.utils.code import exit_then_run_shell_script
|
|
99
|
+
exit_then_run_shell_script(script=command, strict=False)
|
|
100
|
+
# import subprocess
|
|
101
|
+
# import time
|
|
102
|
+
# server_process: subprocess.Popen[bytes]
|
|
103
|
+
# server_process = subprocess.Popen(command, shell=True)
|
|
104
|
+
# processes = [server_process]
|
|
105
|
+
# if over_internet:
|
|
106
|
+
# ngrok_process = subprocess.Popen(f"ngrok http {port}", shell=True)
|
|
107
|
+
# processes.append(ngrok_process)
|
|
108
|
+
# time.sleep(3)
|
|
109
|
+
# try:
|
|
110
|
+
# import requests
|
|
111
|
+
# response = requests.get("http://localhost:4040/api/tunnels")
|
|
112
|
+
# data = response.json()
|
|
113
|
+
# public_url = data['tunnels'][0]['public_url']
|
|
114
|
+
# print(f"🌐 Ngrok tunnel ready: {public_url}")
|
|
115
|
+
# except Exception as e:
|
|
116
|
+
# print(f"Could not retrieve ngrok URL: {e}")
|
|
117
|
+
|
|
118
|
+
# try:
|
|
119
|
+
# while True:
|
|
120
|
+
# print(f"Share server ({backend}) is running. Press Ctrl+C to stop.")
|
|
121
|
+
# time.sleep(2)
|
|
122
|
+
# except KeyboardInterrupt:
|
|
123
|
+
# print("\nTerminating processes...")
|
|
124
|
+
# for p in processes:
|
|
125
|
+
# p.terminate()
|
|
126
|
+
# p.wait()
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def get_share_file_app():
|
|
130
|
+
app = typer.Typer(name="share-file", help="Send or receive files using croc with relay server.")
|
|
131
|
+
app.command(name="send", no_args_is_help=True, hidden=False, help="[s] send files from here.")(share_file_send)
|
|
132
|
+
app.command(name="s", no_args_is_help=True, hidden=True, help="[s] send files from here.")(share_file_send)
|
|
133
|
+
app.command(name="receive", no_args_is_help=True, hidden=False, help="[r] receive files to here.")(share_file_receive)
|
|
134
|
+
app.command(name="r", no_args_is_help=True, hidden=True, help="[r] receive files to here.")(share_file_receive)
|
|
135
|
+
return app
|
|
136
|
+
|
|
137
|
+
def main_with_parser():
|
|
138
|
+
typer.run(web_file_explorer)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
if __name__ == "__main__":
|
|
142
|
+
pass
|
machineconfig/scripts/python/{devops_helpers/cli_terminal.py → helpers_devops/cli_share_terminal.py}
RENAMED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
from typing import Optional, Annotated
|
|
3
3
|
import typer
|
|
4
|
-
import subprocess
|
|
5
|
-
import time
|
|
6
|
-
|
|
7
|
-
|
|
8
4
|
|
|
9
5
|
"""
|
|
10
6
|
reference:
|
|
@@ -17,13 +13,11 @@ reference:
|
|
|
17
13
|
|
|
18
14
|
def display_terminal_url(local_ip_v4: str, port: int, protocol: str = "http") -> None:
|
|
19
15
|
"""Display a flashy, unmissable terminal URL announcement."""
|
|
20
|
-
|
|
21
16
|
from rich.console import Console
|
|
22
17
|
from rich.panel import Panel
|
|
23
18
|
from rich.text import Text
|
|
24
19
|
from rich.align import Align
|
|
25
20
|
console = Console()
|
|
26
|
-
|
|
27
21
|
# Create the main message with styling
|
|
28
22
|
url_text = Text(f"{protocol}://{local_ip_v4}:{port}", style="bold bright_cyan underline")
|
|
29
23
|
message = Text.assemble(
|
|
@@ -42,14 +36,13 @@ def display_terminal_url(local_ip_v4: str, port: int, protocol: str = "http") ->
|
|
|
42
36
|
padding=(1, 2),
|
|
43
37
|
expand=False
|
|
44
38
|
)
|
|
45
|
-
|
|
46
39
|
# Print with extra spacing and attention-grabbing elements
|
|
47
40
|
# console.print("\n" + "🔥" * 60 + "\n", style="bright_red bold")
|
|
48
41
|
console.print(panel)
|
|
49
42
|
# console.print("🔥" * 60 + "\n", style="bright_red bold")
|
|
50
43
|
|
|
51
44
|
|
|
52
|
-
def
|
|
45
|
+
def share_terminal(
|
|
53
46
|
port: Annotated[Optional[int], typer.Option("--port", "-p", help="Port to run the terminal server on (default: 7681)")] = None,
|
|
54
47
|
username: Annotated[Optional[str], typer.Option("--username", "-u", help="Username for terminal access (default: current user)")] = None,
|
|
55
48
|
password: Annotated[Optional[str], typer.Option("--password", "-w", help="Password for terminal access (default: from ~/dotfiles/creds/passwords/quick_password)")] = None,
|
|
@@ -60,10 +53,11 @@ def main(
|
|
|
60
53
|
ssl_ca: Annotated[Optional[str], typer.Option("--ssl-ca", "-A", help="SSL CA file path for client certificate verification")] = None,
|
|
61
54
|
over_internet: Annotated[bool, typer.Option("--over-internet", "-i", help="Expose the terminal over the internet using ngrok")] = False
|
|
62
55
|
) -> None:
|
|
63
|
-
from machineconfig.utils.installer_utils.
|
|
56
|
+
from machineconfig.utils.installer_utils.installer_cli import install_if_missing
|
|
64
57
|
install_if_missing("ttyd")
|
|
65
58
|
if over_internet: install_if_missing("ngrok")
|
|
66
59
|
|
|
60
|
+
from pathlib import Path
|
|
67
61
|
if username is None:
|
|
68
62
|
import getpass
|
|
69
63
|
username = getpass.getuser()
|
|
@@ -96,11 +90,12 @@ def main(
|
|
|
96
90
|
if ssl_ca and not Path(ssl_ca).exists():
|
|
97
91
|
raise FileNotFoundError(f"SSL CA file not found: {ssl_ca}")
|
|
98
92
|
|
|
99
|
-
import
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
93
|
+
import machineconfig.scripts.python.helpers_network.address as helper
|
|
94
|
+
res = helper.select_lan_ipv4(prefer_vpn=False)
|
|
95
|
+
if res is None:
|
|
96
|
+
print("❌ Error: Could not determine local LAN IPv4 address for terminal.")
|
|
97
|
+
raise typer.Exit(code=1)
|
|
98
|
+
local_ip_v4 = res
|
|
104
99
|
|
|
105
100
|
# Display the flashy terminal announcement
|
|
106
101
|
protocol = "https" if ssl else "http"
|
|
@@ -119,7 +114,10 @@ def main(
|
|
|
119
114
|
start_command = "powershell"
|
|
120
115
|
else:
|
|
121
116
|
start_command = "bash"
|
|
122
|
-
|
|
117
|
+
|
|
118
|
+
import subprocess
|
|
119
|
+
import time
|
|
120
|
+
|
|
123
121
|
ttyd_cmd = f"ttyd --writable -t enableSixel=true {ssl_args} --port {port} --credential \"{username}:{password}\" -t 'theme={{\"background\": \"black\"}}' {start_command}"
|
|
124
122
|
ttyd_process = subprocess.Popen(ttyd_cmd, shell=True)
|
|
125
123
|
processes = [ttyd_process]
|
|
@@ -149,7 +147,7 @@ def main(
|
|
|
149
147
|
|
|
150
148
|
|
|
151
149
|
def main_with_parser():
|
|
152
|
-
typer.run(
|
|
150
|
+
typer.run(share_terminal)
|
|
153
151
|
|
|
154
152
|
|
|
155
153
|
if __name__ == "__main__":
|
|
@@ -2,33 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
# import subprocess
|
|
4
4
|
from machineconfig.utils.io import read_ini
|
|
5
|
-
from machineconfig.utils.path_extended import PathExtended
|
|
6
5
|
from machineconfig.utils.source_of_truth import LIBRARY_ROOT, DEFAULTS_PATH
|
|
7
6
|
from machineconfig.utils.code import print_code
|
|
8
7
|
from machineconfig.utils.options import choose_cloud_interactively, choose_from_options
|
|
9
|
-
from machineconfig.scripts.python.
|
|
8
|
+
from machineconfig.scripts.python.helpers_cloud.helpers2 import ES
|
|
10
9
|
from platform import system
|
|
11
10
|
from typing import Any, Literal, Optional
|
|
12
11
|
from rich.console import Console
|
|
13
12
|
from rich.panel import Panel
|
|
13
|
+
from pathlib import Path
|
|
14
14
|
import tomllib
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
OPTIONS = Literal["BACKUP", "RETRIEVE"]
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
def main_backup_retrieve(direction: OPTIONS, which: Optional[str]
|
|
20
|
+
def main_backup_retrieve(direction: OPTIONS, which: Optional[str], cloud: Optional[str]) -> None:
|
|
21
21
|
console = Console()
|
|
22
|
-
|
|
23
22
|
try:
|
|
24
|
-
cloud
|
|
23
|
+
cloud = read_ini(DEFAULTS_PATH)["general"]["rclone_config_name"]
|
|
25
24
|
console.print(Panel(f"⚠️ DEFAULT CLOUD CONFIGURATION\n🌥️ Using default cloud: {cloud}", title="[bold blue]Cloud Configuration[/bold blue]", border_style="blue"))
|
|
26
25
|
except (FileNotFoundError, KeyError, IndexError):
|
|
27
26
|
console.print(Panel("🔍 DEFAULT CLOUD NOT FOUND\n🔄 Please select a cloud configuration from the options below", title="[bold red]Error: Cloud Not Found[/bold red]", border_style="red"))
|
|
28
27
|
cloud = choose_cloud_interactively()
|
|
29
|
-
|
|
30
28
|
bu_file: dict[str, Any] = tomllib.loads(LIBRARY_ROOT.joinpath("profile/backup.toml").read_text(encoding="utf-8"))
|
|
31
|
-
|
|
32
29
|
console.print(Panel(f"🧰 LOADING BACKUP CONFIGURATION\n📄 File: {LIBRARY_ROOT.joinpath('profile/backup.toml')}", title="[bold blue]Backup Configuration[/bold blue]", border_style="blue"))
|
|
33
30
|
|
|
34
31
|
if system() == "Linux":
|
|
@@ -59,13 +56,13 @@ def main_backup_retrieve(direction: OPTIONS, which: Optional[str] = None) -> Non
|
|
|
59
56
|
flags += "e" if item["encrypt"] == "True" else ""
|
|
60
57
|
flags += "r" if item["rel2home"] == "True" else ""
|
|
61
58
|
flags += "o" if system().lower() in item_name else ""
|
|
62
|
-
console.print(Panel(f"📦 PROCESSING: {item_name}\n📂 Path: {
|
|
59
|
+
console.print(Panel(f"📦 PROCESSING: {item_name}\n📂 Path: {Path(item['path']).as_posix()}\n🏳️ Flags: {flags or 'None'}", title=f"[bold blue]Processing Item: {item_name}[/bold blue]", border_style="blue"))
|
|
63
60
|
if flags:
|
|
64
61
|
flags = "-" + flags
|
|
65
62
|
if direction == "BACKUP":
|
|
66
|
-
program += f"""\ncloud_copy "{
|
|
63
|
+
program += f"""\ncloud_copy "{Path(item["path"]).as_posix()}" $cloud {flags}\n"""
|
|
67
64
|
elif direction == "RETRIEVE":
|
|
68
|
-
program += f"""\ncloud_copy $cloud "{
|
|
65
|
+
program += f"""\ncloud_copy $cloud "{Path(item["path"]).as_posix()}" {flags}\n"""
|
|
69
66
|
else:
|
|
70
67
|
console.print(Panel('❌ ERROR: INVALID DIRECTION\n⚠️ Direction must be either "BACKUP" or "RETRIEVE"', title="[bold red]Error: Invalid Direction[/bold red]", border_style="red"))
|
|
71
68
|
raise RuntimeError(f"Unknown direction: {direction}")
|
|
@@ -17,22 +17,6 @@ from machineconfig.utils.source_of_truth import CONFIG_ROOT, DEFAULTS_PATH, LIBR
|
|
|
17
17
|
console = Console()
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
def _check_system_info() -> dict[str, str]:
|
|
21
|
-
"""Gather basic system information."""
|
|
22
|
-
import socket
|
|
23
|
-
import os
|
|
24
|
-
|
|
25
|
-
return {
|
|
26
|
-
"hostname": socket.gethostname(),
|
|
27
|
-
"system": platform.system(),
|
|
28
|
-
"release": platform.release(),
|
|
29
|
-
"version": platform.version(),
|
|
30
|
-
"machine": platform.machine(),
|
|
31
|
-
"processor": platform.processor() or "Unknown",
|
|
32
|
-
"python_version": platform.python_version(),
|
|
33
|
-
"user": os.getenv("USER") or os.getenv("USERNAME") or "Unknown",
|
|
34
|
-
}
|
|
35
|
-
|
|
36
20
|
|
|
37
21
|
def _check_shell_profile_status() -> dict[str, Any]:
|
|
38
22
|
"""Check shell profile configuration status."""
|
|
@@ -480,10 +464,14 @@ def main() -> None:
|
|
|
480
464
|
console.print("\n")
|
|
481
465
|
console.print(Panel(Text("📊 Machine Status Report", justify="center", style="bold white"), style="bold blue", padding=(1, 2)))
|
|
482
466
|
console.print("\n")
|
|
483
|
-
|
|
484
|
-
system_info = _check_system_info()
|
|
467
|
+
|
|
468
|
+
# 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.python import get_machine_specs
|
|
471
|
+
system_info = get_machine_specs()
|
|
472
|
+
from typing import cast
|
|
473
|
+
system_info = cast(dict[str, str], system_info)
|
|
485
474
|
_display_system_info(system_info)
|
|
486
|
-
|
|
487
475
|
shell_status = _check_shell_profile_status()
|
|
488
476
|
_display_shell_status(shell_status)
|
|
489
477
|
|
|
@@ -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.
|
|
12
|
+
from machineconfig.scripts.python.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
|
|