machineconfig 6.61__tar.gz → 6.62__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of machineconfig might be problematic. Click here for more details.
- {machineconfig-6.61/src/machineconfig.egg-info → machineconfig-6.62}/PKG-INFO +1 -1
- {machineconfig-6.61 → machineconfig-6.62}/pyproject.toml +1 -1
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ftpx.py +1 -1
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_devops/cli_utils.py +26 -1
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/utils.py +3 -1
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/ssh.py +69 -125
- machineconfig-6.62/src/machineconfig/utils/terminal.py +100 -0
- {machineconfig-6.61 → machineconfig-6.62/src/machineconfig.egg-info}/PKG-INFO +1 -1
- machineconfig-6.61/src/machineconfig/utils/terminal.py +0 -211
- {machineconfig-6.61 → machineconfig-6.62}/MANIFEST.in +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/README.md +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/setup.cfg +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/remote/cloud_manager.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/remote/data_transfer.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/remote/distribute.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/remote/file_manager.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/remote/job_params.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/remote/loader_runner.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/remote/remote_machine.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/remote/run_cloud.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/remote/run_cluster.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/remote/run_remote.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/remote/script_execution.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/remote/script_notify_upon_completion.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/helpers/enhanced_command_runner.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/helpers/load_balancer_helper.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/utils/load_balancer.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/utils/maker.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/wt_local.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/wt_local_manager.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/wt_remote.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/wt_remote_manager.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/wt_utils/layout_generator.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/wt_utils/process_monitor.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/wt_utils/remote_executor.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/wt_utils/session_manager.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/wt_utils/status_reporter.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/zellij_local.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/zellij_local_manager.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/zellij_remote.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/zellij_remote_manager.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/zellij_utils/example_usage.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/zellij_utils/layout_generator.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/zellij_utils/monitoring_types.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/zellij_utils/process_monitor.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/zellij_utils/remote_executor.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/zellij_utils/session_manager.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/zellij_utils/status_reporter.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/zellij_utils/zellij_local_helper.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/zellij_utils/zellij_local_helper_restart.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/zellij_utils/zellij_local_helper_with_panes.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/sessions_managers/zellij_utils/zellij_local_manager_helper.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/templates/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/cluster/templates/cli_trogon.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/check_installations.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/custom/gh.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/custom/hx.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/custom_dev/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/custom_dev/alacritty.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/custom_dev/brave.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/custom_dev/bypass_paywall.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/custom_dev/code.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/custom_dev/cursor.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/custom_dev/dubdb_adbc.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/custom_dev/espanso.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/custom_dev/goes.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/custom_dev/lvim.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/custom_dev/nerdfont.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/custom_dev/nerfont_windows_helper.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/custom_dev/redis.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/custom_dev/wezterm.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/custom_dev/winget.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/installer_data.json +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/linux_scripts/brave.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/linux_scripts/docker.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/linux_scripts/docker_start.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/linux_scripts/edge.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/linux_scripts/nerdfont.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/linux_scripts/ngrok.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/linux_scripts/pgsql.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/linux_scripts/q.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/linux_scripts/redis.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/linux_scripts/timescaledb.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/linux_scripts/vscode.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/linux_scripts/warp-cli.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/linux_scripts/wezterm.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/package_groups.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/installer/powershell_scripts/install_fonts.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/linux/msc/cli_agents.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/linux/msc/lid.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/linux/msc/network.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/python/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/python/python_ve_symlink.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/python/vscode/api.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/windows/archive/archive_pygraphviz.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/windows/archive/openssh-server_add_key.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/windows/archive/openssh-server_copy-ssh-id.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/windows/msc/cli_agents.bat +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/jobs/windows/msc/cli_agents.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/logger.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/profile/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/profile/backup.toml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/profile/bash_shell_profiles.md +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/profile/create_helper.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/profile/create_links.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/profile/create_links_export.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/profile/create_shell_profile.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/profile/mapper.toml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/profile/records/generic/shares.toml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/profile/records/linux/apps_summary_report.csv +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/profile/records/linux/apps_summary_report.md +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/profile/records/windows/apps_summary_report.csv +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/profile/records/windows/apps_summary_report.md +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/Restore-ThunderbirdProfile.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/linux/fzf2g +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/linux/fzfag +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/linux/fzffg +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/linux/fzfg +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/linux/fzfrga +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/linux/other/share_cloud.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/linux/other/share_nfs +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/linux/other/share_smb +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/linux/other/start_docker +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/linux/other/switch_ip +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/linux/skrg +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/linux/warp-cli.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/linux/z_ls +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/agents.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/command_runner/command_runner.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/command_runner/prompt.txt +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/generate_files.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/initai.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/scripts/lint_and_type_check.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/scripts/lint_and_type_check.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/_shared.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/claude/claude.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/cline/cline.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/copilot/chatmodes/Thinking-Beast-Mode.chatmode.md +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/copilot/chatmodes/Ultimate-Transparent-Thinking-Beast-Mode.chatmode.md +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/copilot/chatmodes/deepResearch.chatmode.md +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/copilot/github_copilot.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/copilot/instructions/python/dev.instructions.md +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/copilot/privacy.md +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/copilot/prompts/pyright_fix.md +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/copilot/prompts/research-report-skeleton.prompt.md +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/crush/crush.json +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/crush/crush.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/crush/privacy.md +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/cursor/cursors.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/gemini/gemini.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/gemini/settings.json +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/generic.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/kilocode/privacy.md +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/opencode/opencode.json +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/solutions/opencode/opencode.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/ai/vscode_tasks.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/cloud.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/croshell.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/devops.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/devops_navigator.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/entry.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/env_manager/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/env_manager/path_manager_backend.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/env_manager/path_manager_tui.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/fire_jobs.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_cloud/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_cloud/cloud_copy.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_cloud/cloud_helpers.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_cloud/cloud_mount.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_cloud/cloud_sync.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_cloud/helpers2.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_cloud/helpers5.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_croshell/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_croshell/crosh.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_croshell/pomodoro.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_croshell/scheduler.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_croshell/start_slidev.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_croshell/viewer.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_croshell/viewer_template.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_devops/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_devops/cli_config.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_devops/cli_config_dotfile.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_devops/cli_data.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_devops/cli_nw.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_devops/cli_repos.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_devops/cli_self.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_devops/cli_share_server.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_devops/cli_terminal.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_devops/devops_backup_retrieve.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_devops/devops_status.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_devops/devops_update_repos.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_devops/themes/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_devops/themes/choose_pwsh_theme.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_devops/themes/choose_starship_theme.bash +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_devops/themes/choose_starship_theme.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_devops/themes/choose_wezterm_theme.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_fire/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_fire/agentic_frameworks/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_fire/agentic_frameworks/fire_crush.json +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_fire/agentic_frameworks/fire_crush.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_fire/agentic_frameworks/fire_cursor_agents.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_fire/agentic_frameworks/fire_gemini.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_fire/agentic_frameworks/fire_qwen.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_fire/fire_agents_help_launch.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_fire/fire_agents_help_search.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_fire/fire_agents_helper_types.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_fire/fire_agents_load_balancer.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_fire/helpers4.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_fire/prompt.txt +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_fire/template.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_fire/template.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_fire_command/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_fire_command/cloud_manager.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_fire_command/fire_jobs_args_helper.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_fire_command/fire_jobs_route_helper.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_fire_command/fire_jobs_streamlit_helper.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_navigator/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_navigator/command_builder.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_navigator/command_detail.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_navigator/command_tree.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_navigator/data_models.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_navigator/main_app.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_navigator/search_bar.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_repos/action.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_repos/clone.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_repos/cloud_repo_sync.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_repos/count_lines.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_repos/count_lines_frontend.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_repos/entrypoint.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_repos/grource.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_repos/record.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_repos/secure_repo.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_repos/sync.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_repos/update.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_sessions/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/helpers_sessions/sessions_multiprocess.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/interactive.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/nw/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/nw/add_ssh_key.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/nw/devops_add_identity.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/nw/devops_add_ssh_key.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/nw/mount_drive +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/nw/mount_nfs +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/nw/mount_nfs.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/nw/mount_nw_drive +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/nw/mount_nw_drive.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/nw/mount_smb +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/nw/mount_ssh.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/nw/onetimeshare.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/nw/ssh_debug_linux.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/nw/ssh_debug_windows.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/nw/wifi_conn.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/nw/wsl_windows_transfer.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/python/sessions.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/windows/fzfb.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/windows/fzfg.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/windows/fzfrga.bat +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/windows/mounts/mount_nfs.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/windows/mounts/mount_nw.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/windows/mounts/mount_smb.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/windows/mounts/mount_ssh.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/windows/mounts/share_cloud.cmd +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/windows/mounts/share_smb.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/scripts/windows/mounts/unlock_bitlocker.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/broot/br.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/broot/brootcd.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/broot/conf.toml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/glow/glow.yml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/gromit-mpx/gromit-mpx.cfg +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/helix/config.toml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/helix/languages.toml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/keras/keras.json +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/keyboard/espanso/config/default.yml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/keyboard/espanso/match/base.yml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/keyboard/kanata/kanata.kbd +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/linux/autocall/delete.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/linux/autocall/on-cd.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/linux/autocall/on-quit.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/linux/autocall/open.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/linux/autocall/paste.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/linux/autocall/pre-cd.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/linux/autocall/rename.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/linux/colors +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/linux/exe/cleaner.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/linux/exe/fzf_nano.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/linux/exe/leftpane_previewer.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/linux/exe/lfcd.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/linux/exe/previewer.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/linux/exe/previewer_archive.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/linux/icons +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/linux/lfrc +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/windows/autocall/delete.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/windows/autocall/on-cd.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/windows/autocall/on-quit.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/windows/autocall/open.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/windows/autocall/paste.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/windows/autocall/pre-cd.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/windows/autocall/rename.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/windows/cd_tere.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/windows/cd_zoxide.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/windows/cd_zoxide2.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/windows/colors +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/windows/fzf_edit.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/windows/icons +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/windows/leftpane_previewer.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/windows/lfcd.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/windows/lfrc +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/windows/mkdir.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/windows/mkfile.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/windows/previewer.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lf/windows/tst.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/linters/.flake8 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/linters/.mypy.ini +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/linters/.pylintrc +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/linters/.ruff.toml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lvim/linux/config.lua +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lvim/windows/archive/config_additional.lua +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lvim/windows/config.lua +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/lvim/windows/lua/user/custom_config.lua +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/marimo/marimo.toml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/mprocs/windows/mprocs.yaml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/mprocs/windows/other +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/pistol/pistol.conf +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/presenterm/config.yaml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/procs/.procs.toml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/pudb/pudb.cfg +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/rofi/config.rasi +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/rofi/config_default.rasi +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/shells/alacritty/alacritty.toml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/shells/alacritty/alacritty.yml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/shells/bash/init.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/shells/hyper/.hyper.js +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/shells/ipy/profiles/default/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/shells/ipy/profiles/default/startup/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/shells/ipy/profiles/default/startup/playext.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/shells/kitty/kitty.conf +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/shells/nushell/config.nu +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/shells/nushell/env.nu +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/shells/pwsh/init.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/shells/pwsh/profile.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/shells/starship/starship.toml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/shells/vtm/settings.xml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/shells/wezterm/wezterm.lua +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/shells/wt/settings.json +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/shells/zsh/init.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/streamlit/config.toml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/svim/linux/init.toml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/svim/windows/init.toml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/tere/terecd.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/tere/terecd.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/tmux/.tmate.conf +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/tmux/.tmux.conf +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/wsl/.wslconfig +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/yazi/keymap.toml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/yazi/theme.toml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/yazi/yazi.toml +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/zed/settings.json +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/zellij/commands/monitor +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/zellij/commands/standard_panes +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/zellij/config.kdl +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/zellij/config.orig.kdl +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/zellij/layouts/hist +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/zellij/layouts/panes.kdl +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/zellij/layouts/st.kdl +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/zellij/layouts/st2.kdl +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/settings/zellij/layouts/stacked_panes.kdl +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_linux/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_linux/apps.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_linux/apps_desktop.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_linux/apps_gui.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_linux/nix/cli_installation.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_linux/others/mint_keyboard_shortcuts.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_linux/ssh/openssh_all.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_linux/ssh/openssh_wsl.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_linux/uv.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_linux/web_shortcuts/android.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_linux/web_shortcuts/interactive.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_mac/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_mac/apps.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_mac/ssh/openssh_setup.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_mac/uv.sh +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_windows/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_windows/apps.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_windows/others/docker.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_windows/others/obs.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_windows/others/power_options.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_windows/ssh/add-sshkey.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_windows/ssh/add_identity.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_windows/ssh/openssh-server.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_windows/uv.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_windows/web_shortcuts/interactive.ps1 +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_windows/wt_and_pwsh/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/accessories.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/ai/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/cloud/onedrive/README.md +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/cloud/onedrive/setup_oauth.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/cloud/onedrive/transaction.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/code.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/files/art/fat_croco.txt +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/files/art/halfwit_croco.txt +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/files/art/happy_croco.txt +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/files/art/water_croco.txt +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/files/ascii_art.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/files/dbms.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/files/headers.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/files/ouch/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/files/ouch/decompress.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/files/read.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/installer.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/installer_utils/__init__.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/installer_utils/github_release_bulk.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/installer_utils/installer.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/installer_utils/installer_abc.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/installer_utils/installer_class.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/io.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/links.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/meta.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/notifications.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/options.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/path_extended.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/path_helper.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/procs.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/scheduler.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/scheduling.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/schemas/fire_agents/fire_agents_input.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/schemas/installer/installer_types.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/schemas/layouts/layout_types.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/schemas/repos/repos_types.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/source_of_truth.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/ssh_utils/utils.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/tst.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/upgrade_packages.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig/utils/ve.py +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig.egg-info/SOURCES.txt +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig.egg-info/dependency_links.txt +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig.egg-info/entry_points.txt +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig.egg-info/requires.txt +0 -0
- {machineconfig-6.61 → machineconfig-6.62}/src/machineconfig.egg-info/top_level.txt +0 -0
|
@@ -183,7 +183,7 @@ def ftpx(
|
|
|
183
183
|
padding=(1, 2),
|
|
184
184
|
)
|
|
185
185
|
)
|
|
186
|
-
received_file = ssh.copy_from_here(source_path=resolved_source,
|
|
186
|
+
received_file = ssh.copy_from_here(source_path=resolved_source, target_rel2home=resolved_target, compress_with_zip=zipFirst, recursive=recursive, overwrite_existing=False)
|
|
187
187
|
|
|
188
188
|
if source_is_remote and isinstance(received_file, PathExtended):
|
|
189
189
|
console.print(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
import typer
|
|
4
|
-
from typing import Annotated, Optional
|
|
4
|
+
from typing import Annotated, Optional, TypedDict
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
import subprocess
|
|
7
7
|
import requests
|
|
@@ -115,3 +115,28 @@ def merge_pdfs(
|
|
|
115
115
|
from machineconfig.utils.code import run_shell_script, get_uv_command_executing_python_script
|
|
116
116
|
uv_command, _py_file = get_uv_command_executing_python_script(python_script=code, uv_with=["pypdf"], uv_project_dir=None)
|
|
117
117
|
run_shell_script(uv_command)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
class MachineSpecs(TypedDict):
|
|
121
|
+
system: str
|
|
122
|
+
distro: str
|
|
123
|
+
home_dir: str
|
|
124
|
+
def get_machine_specs() -> MachineSpecs:
|
|
125
|
+
"""Write print and return the local machine specs."""
|
|
126
|
+
import platform
|
|
127
|
+
UV_RUN_CMD = "$HOME/.local/bin/uv run" if platform.system() != "Windows" else """& "$env:USERPROFILE/.local/bin/uv" run"""
|
|
128
|
+
command = f"""{UV_RUN_CMD} --with distro python -c "import distro; print(distro.name(pretty=True))" """
|
|
129
|
+
import subprocess
|
|
130
|
+
distro = subprocess.run(command, shell=True, capture_output=True, text=True).stdout.strip()
|
|
131
|
+
specs: MachineSpecs = {
|
|
132
|
+
"system": platform.system(),
|
|
133
|
+
"distro": distro,
|
|
134
|
+
"home_dir": str(Path.home()),
|
|
135
|
+
}
|
|
136
|
+
print(specs)
|
|
137
|
+
from machineconfig.utils.source_of_truth import CONFIG_ROOT
|
|
138
|
+
path = CONFIG_ROOT.joinpath("machine_specs.json")
|
|
139
|
+
CONFIG_ROOT.mkdir(parents=True, exist_ok=True)
|
|
140
|
+
import json
|
|
141
|
+
path.write_text(json.dumps(specs, indent=4), encoding="utf-8")
|
|
142
|
+
return specs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
from machineconfig.scripts.python.helpers_devops.cli_utils import download, merge_pdfs
|
|
3
|
+
from machineconfig.scripts.python.helpers_devops.cli_utils import download, merge_pdfs, get_machine_specs
|
|
4
4
|
import typer
|
|
5
5
|
|
|
6
6
|
|
|
@@ -11,6 +11,8 @@ def get_app() -> typer.Typer:
|
|
|
11
11
|
app.command(name="d", no_args_is_help=True, hidden=True)(download)
|
|
12
12
|
app.command(name="merge-pdfs", no_args_is_help=True, help="[m] Merge two PDF files into one.")(merge_pdfs)
|
|
13
13
|
app.command(name="m", no_args_is_help=True, hidden=True)(merge_pdfs)
|
|
14
|
+
app.command(name="get-machine-specs", no_args_is_help=False, help="[g] Get machine specifications.")(get_machine_specs)
|
|
15
|
+
app.command(name="g", no_args_is_help=False, hidden=True)(get_machine_specs)
|
|
14
16
|
return app
|
|
15
17
|
|
|
16
18
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
from typing import Callable, Optional, Any, Union
|
|
1
|
+
from typing import Callable, Optional, Any, Union, cast
|
|
2
2
|
import os
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
import platform
|
|
5
|
+
from machineconfig.scripts.python.helpers_devops.cli_utils import MachineSpecs
|
|
5
6
|
import rich.console
|
|
6
|
-
from machineconfig.utils.terminal import Response
|
|
7
|
-
from machineconfig.utils.accessories import pprint
|
|
8
|
-
|
|
7
|
+
from machineconfig.utils.terminal import Response
|
|
8
|
+
from machineconfig.utils.accessories import pprint, randstr
|
|
9
|
+
from machineconfig.utils.meta import lambda_to_python_script
|
|
9
10
|
UV_RUN_CMD = "$HOME/.local/bin/uv run" if platform.system() != "Windows" else """& "$env:USERPROFILE/.local/bin/uv" run"""
|
|
10
11
|
MACHINECONFIG_VERSION = "machineconfig>=6.61"
|
|
11
12
|
DEFAULT_PICKLE_SUBDIR = "tmp_results/tmp_scripts/ssh"
|
|
12
13
|
|
|
13
|
-
|
|
14
14
|
class SSH:
|
|
15
15
|
def __init__(
|
|
16
16
|
self, host: Optional[str], username: Optional[str], hostname: Optional[str], ssh_key_path: Optional[str], password: Optional[str], port: int, enable_compression: bool):
|
|
@@ -22,7 +22,6 @@ class SSH:
|
|
|
22
22
|
self.username: str
|
|
23
23
|
self.port: int = port
|
|
24
24
|
self.proxycommand: Optional[str] = None
|
|
25
|
-
import platform
|
|
26
25
|
import paramiko # type: ignore
|
|
27
26
|
import getpass
|
|
28
27
|
|
|
@@ -109,13 +108,15 @@ class SSH:
|
|
|
109
108
|
def view_bar(self, transferred: int, total: int) -> None:
|
|
110
109
|
if self.progress and self.task is not None:
|
|
111
110
|
self.progress.update(self.task, completed=transferred, total=total)
|
|
112
|
-
|
|
113
111
|
self.tqdm_wrap = RichProgressWrapper
|
|
114
|
-
|
|
115
|
-
self.
|
|
116
|
-
self.
|
|
112
|
+
from machineconfig.scripts.python.helpers_devops.cli_utils import get_machine_specs
|
|
113
|
+
self.local_specs: MachineSpecs = get_machine_specs()
|
|
114
|
+
resp = self.run_shell(command=f"""~/.local/bin/utils get-machine-specs """, verbose_output=False, description="Getting remote machine specs", strict_stderr=False, strict_return_code=False)
|
|
115
|
+
import json
|
|
116
|
+
json_str = resp.op
|
|
117
|
+
print(f"Remote machine specs JSON: {resp}")
|
|
118
|
+
self.remote_specs: MachineSpecs = cast(MachineSpecs, json.loads(json_str))
|
|
117
119
|
self.terminal_responses: list[Response] = []
|
|
118
|
-
self.platform = platform
|
|
119
120
|
|
|
120
121
|
def __enter__(self) -> "SSH":
|
|
121
122
|
return self
|
|
@@ -126,34 +127,11 @@ class SSH:
|
|
|
126
127
|
self.sftp.close()
|
|
127
128
|
self.sftp = None
|
|
128
129
|
self.ssh.close()
|
|
129
|
-
def get_remote_machine(self) -> MACHINE:
|
|
130
|
-
if self._remote_machine is None:
|
|
131
|
-
windows_test1 = self.run_shell(command="$env:OS", verbose_output=False, description="Testing Remote OS Type", strict_stderr=False, strict_return_code=False).op
|
|
132
|
-
windows_test2 = self.run_shell(command="echo %OS%", verbose_output=False, description="Testing Remote OS Type Again", strict_stderr=False, strict_return_code=False).op
|
|
133
|
-
if windows_test1 == "Windows_NT" or windows_test2 == "Windows_NT":
|
|
134
|
-
self._remote_machine = "Windows"
|
|
135
|
-
else:
|
|
136
|
-
self._remote_machine = "Linux"
|
|
137
|
-
return self._remote_machine
|
|
138
|
-
def get_local_distro(self) -> str:
|
|
139
|
-
if self._local_distro is None:
|
|
140
|
-
command = f"""{UV_RUN_CMD} --with distro python -c "import distro; print(distro.name(pretty=True))" """
|
|
141
|
-
import subprocess
|
|
142
|
-
res = subprocess.run(command, shell=True, capture_output=True, text=True).stdout.strip()
|
|
143
|
-
self._local_distro = res
|
|
144
|
-
return res
|
|
145
|
-
return self._local_distro
|
|
146
|
-
def get_remote_distro(self) -> str:
|
|
147
|
-
if self._remote_distro is None:
|
|
148
|
-
command_str = f"""{UV_RUN_CMD} --with distro python -c "import distro; print(distro.name(pretty=True))" """
|
|
149
|
-
res = self.run_shell(command=command_str, verbose_output=True, description="", strict_stderr=False, strict_return_code=False)
|
|
150
|
-
self._remote_distro = res.op_if_successfull_or_default() or ""
|
|
151
|
-
return self._remote_distro
|
|
152
130
|
def restart_computer(self) -> Response:
|
|
153
|
-
return self.run_shell(command="Restart-Computer -Force" if self.
|
|
131
|
+
return self.run_shell(command="Restart-Computer -Force" if self.remote_specs["system"] == "Windows" else "sudo reboot", verbose_output=True, description="", strict_stderr=False, strict_return_code=False)
|
|
154
132
|
def send_ssh_key(self) -> Response:
|
|
155
|
-
self.copy_from_here(source_path=
|
|
156
|
-
if self.
|
|
133
|
+
self.copy_from_here(source_path="~/.ssh/id_rsa.pub", target_rel2home=None, compress_with_zip=False, recursive=False, overwrite_existing=False)
|
|
134
|
+
if self.remote_specs["system"] != "Windows":
|
|
157
135
|
raise RuntimeError("send_ssh_key is only supported for Windows remote machines")
|
|
158
136
|
code_url = "https://raw.githubusercontent.com/thisismygitrepo/machineconfig/refs/heads/main/src/machineconfig/setup_windows/openssh-server_add-sshkey.ps1"
|
|
159
137
|
import urllib.request
|
|
@@ -162,17 +140,17 @@ class SSH:
|
|
|
162
140
|
return self.run_shell(command=code, verbose_output=True, description="", strict_stderr=False, strict_return_code=False)
|
|
163
141
|
|
|
164
142
|
def get_remote_repr(self, add_machine: bool = False) -> str:
|
|
165
|
-
return f"{self.username}@{self.hostname}:{self.port}" + (f" [{self.
|
|
143
|
+
return f"{self.username}@{self.hostname}:{self.port}" + (f" [{self.remote_specs['system']}][{self.remote_specs['distro']}]" if add_machine else "")
|
|
166
144
|
def get_local_repr(self, add_machine: bool = False) -> str:
|
|
167
145
|
import getpass
|
|
168
|
-
return f"{getpass.getuser()}@{
|
|
146
|
+
return f"{getpass.getuser()}@{platform.node()}" + (f" [{platform.system()}][{self.local_specs['distro']}]" if add_machine else "")
|
|
169
147
|
def get_ssh_conn_str(self, command: str) -> str:
|
|
170
148
|
return "ssh " + (f" -i {self.ssh_key_path}" if self.ssh_key_path else "") + self.get_remote_repr(add_machine=False).replace(":", " -p ") + (f" -t {command} " if command != "" else " ")
|
|
171
149
|
def __repr__(self) -> str:
|
|
172
150
|
return f"local {self.get_local_repr(add_machine=True)} >>> SSH TO >>> remote {self.get_remote_repr(add_machine=True)}"
|
|
173
151
|
|
|
174
152
|
def run_locally(self, command: str) -> Response:
|
|
175
|
-
print(f"""💻 [LOCAL EXECUTION] Running command on node: {self.
|
|
153
|
+
print(f"""💻 [LOCAL EXECUTION] Running command on node: {self.local_specs['system']} Command: {command}""")
|
|
176
154
|
res = Response(cmd=command)
|
|
177
155
|
res.output.returncode = os.system(command)
|
|
178
156
|
return res
|
|
@@ -184,15 +162,14 @@ class SSH:
|
|
|
184
162
|
res.print()
|
|
185
163
|
else:
|
|
186
164
|
res.capture().print_if_unsuccessful(desc=description, strict_err=strict_stderr, strict_returncode=strict_return_code, assert_success=False)
|
|
187
|
-
self.terminal_responses.append(res)
|
|
165
|
+
# self.terminal_responses.append(res)
|
|
188
166
|
return res
|
|
189
167
|
def run_py(self, python_code: str, uv_with: Optional[list[str]], uv_project_dir: Optional[str],
|
|
190
168
|
description: str, verbose_output: bool, strict_stderr: bool, strict_return_code: bool) -> Response:
|
|
191
|
-
from machineconfig.utils.accessories import randstr
|
|
192
169
|
py_path = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/runpy_{randstr()}.py")
|
|
193
170
|
py_path.parent.mkdir(parents=True, exist_ok=True)
|
|
194
171
|
py_path.write_text(python_code, encoding="utf-8")
|
|
195
|
-
self.copy_from_here(source_path=py_path,
|
|
172
|
+
self.copy_from_here(source_path=str(py_path), target_rel2home=None, compress_with_zip=False, recursive=False, overwrite_existing=False)
|
|
196
173
|
if uv_with is not None and len(uv_with) > 0:
|
|
197
174
|
with_clause = " --with " + '"' + ",".join(uv_with) + '"'
|
|
198
175
|
else:
|
|
@@ -205,7 +182,6 @@ class SSH:
|
|
|
205
182
|
return self.run_shell(command=uv_cmd, verbose_output=verbose_output, description=description or f"run_py on {self.get_remote_repr(add_machine=False)}", strict_stderr=strict_stderr, strict_return_code=strict_return_code)
|
|
206
183
|
|
|
207
184
|
def run_py_func(self, func: Callable[..., Any], uv_with: Optional[list[str]], uv_project_dir: Optional[str]) -> Response:
|
|
208
|
-
from machineconfig.utils.meta import lambda_to_python_script
|
|
209
185
|
command = lambda_to_python_script(lmb=func, in_global=True)
|
|
210
186
|
return self.run_py(python_code=command, uv_with=uv_with, uv_project_dir=uv_project_dir,
|
|
211
187
|
description=f"run_py_func {func.__name__} on {self.get_remote_repr(add_machine=False)}",
|
|
@@ -218,77 +194,45 @@ class SSH:
|
|
|
218
194
|
local_path.parent.mkdir(parents=True, exist_ok=True)
|
|
219
195
|
self.sftp.get(remotepath=remote_path, localpath=str(local_path))
|
|
220
196
|
|
|
221
|
-
def
|
|
197
|
+
def create_dir(self, path_rel2home: str, overwrite_existing: bool) -> None:
|
|
222
198
|
"""Helper to create a directory on remote machine and return its path."""
|
|
223
|
-
def create_target_dir(
|
|
199
|
+
def create_target_dir(target_rel2home: str, overwrite: bool) -> None:
|
|
224
200
|
from pathlib import Path
|
|
225
201
|
import shutil
|
|
226
|
-
|
|
227
|
-
directory_path = Path(target_dir_path).expanduser()
|
|
202
|
+
directory_path = Path(target_rel2home).expanduser()
|
|
228
203
|
if overwrite and directory_path.exists():
|
|
229
204
|
if directory_path.is_dir():
|
|
230
205
|
shutil.rmtree(directory_path)
|
|
231
206
|
else:
|
|
232
207
|
directory_path.unlink()
|
|
233
208
|
directory_path.parent.mkdir(parents=True, exist_ok=True)
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
from machineconfig.utils.accessories import randstr
|
|
242
|
-
remote_json_output = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/return_{randstr()}.json").as_posix()
|
|
243
|
-
# command = function_to_script(func=create_target_dir, call_with_kwargs={"target_dir_path": Path(target_path).as_posix(), "overwrite": overwrite_existing, "json_output_path": remote_json_output})
|
|
244
|
-
command = lambda_to_python_script(lmb=lambda: create_target_dir(target_dir_path=str(target_path), overwrite=overwrite_existing, json_output_path=remote_json_output), in_global=True)
|
|
245
|
-
response = self.run_py(python_code=command, uv_with=[MACHINECONFIG_VERSION], uv_project_dir=None,
|
|
246
|
-
description=f"Creating target directory `{Path(target_path).parent.as_posix()}` @ {self.get_remote_repr(add_machine=False)}",
|
|
247
|
-
verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
248
|
-
remote_json_path = response.op.strip()
|
|
249
|
-
if not remote_json_path:
|
|
250
|
-
raise RuntimeError(f"Failed to create target directory {target_path} - no response from remote")
|
|
251
|
-
from machineconfig.utils.accessories import randstr
|
|
252
|
-
local_json = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/local_{randstr()}.json")
|
|
253
|
-
self._simple_sftp_get(remote_path=remote_json_path, local_path=local_json)
|
|
254
|
-
import json
|
|
255
|
-
try:
|
|
256
|
-
result = json.loads(local_json.read_text(encoding="utf-8"))
|
|
257
|
-
except (json.JSONDecodeError, FileNotFoundError) as err:
|
|
258
|
-
raise RuntimeError(f"Failed to create target directory {target_path} - invalid JSON response: {err}") from err
|
|
259
|
-
finally:
|
|
260
|
-
if local_json.exists():
|
|
261
|
-
local_json.unlink()
|
|
262
|
-
assert isinstance(result, str), f"Failed to create target directory {target_path} on remote"
|
|
263
|
-
return result
|
|
264
|
-
|
|
209
|
+
return
|
|
210
|
+
command = lambda_to_python_script(lmb=lambda: create_target_dir(target_rel2home=path_rel2home, overwrite=overwrite_existing), in_global=True)
|
|
211
|
+
tmp_py_file = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/create_target_dir_{randstr()}.py")
|
|
212
|
+
tmp_py_file.parent.mkdir(parents=True, exist_ok=True)
|
|
213
|
+
tmp_py_file.write_text(command, encoding="utf-8")
|
|
214
|
+
self.copy_from_here(source_path=str(tmp_py_file), target_rel2home=None, compress_with_zip=False, recursive=False, overwrite_existing=True)
|
|
215
|
+
self.run_shell(command=f"""{UV_RUN_CMD} python {tmp_py_file.as_posix()}""", verbose_output=False, description=f"Creating target dir {path_rel2home}", strict_stderr=True, strict_return_code=True)
|
|
265
216
|
|
|
266
|
-
def copy_from_here(self, source_path:
|
|
267
|
-
if self.sftp is None:
|
|
268
|
-
raise RuntimeError(f"SFTP connection not available for {self.hostname}. Cannot transfer files.")
|
|
269
|
-
|
|
217
|
+
def copy_from_here(self, source_path: str, target_rel2home: Optional[str], compress_with_zip: bool, recursive: bool, overwrite_existing: bool) -> None:
|
|
218
|
+
if self.sftp is None: raise RuntimeError(f"SFTP connection not available for {self.hostname}. Cannot transfer files.")
|
|
270
219
|
source_obj = Path(source_path).expanduser().absolute()
|
|
271
|
-
if not source_obj.exists():
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
if target_path is None:
|
|
275
|
-
try:
|
|
276
|
-
target_path_relative = source_obj.relative_to(Path.home())
|
|
277
|
-
target_path = Path("~") / target_path_relative
|
|
220
|
+
if not source_obj.exists(): raise RuntimeError(f"SSH Error: source `{source_obj}` does not exist!")
|
|
221
|
+
if target_rel2home is None:
|
|
222
|
+
try: target_rel2home = str(source_obj.relative_to(Path.home()))
|
|
278
223
|
except ValueError:
|
|
279
224
|
raise RuntimeError(f"If target is not specified, source must be relative to home directory, but got: {source_obj}")
|
|
280
|
-
|
|
281
225
|
if not compress_with_zip and source_obj.is_dir():
|
|
282
226
|
if not recursive:
|
|
283
227
|
raise RuntimeError(f"SSH Error: source `{source_obj}` is a directory! Set `recursive=True` for recursive sending or `compress_with_zip=True` to zip it first.")
|
|
284
228
|
file_paths_to_upload: list[Path] = [file_path for file_path in source_obj.rglob("*") if file_path.is_file()]
|
|
285
|
-
|
|
229
|
+
# self.create_dir(path_rel2home=target_rel2home, overwrite_existing=overwrite_existing)
|
|
286
230
|
for idx, file_path in enumerate(file_paths_to_upload):
|
|
287
231
|
print(f" {idx + 1:03d}. {file_path}")
|
|
288
232
|
for file_path in file_paths_to_upload:
|
|
289
|
-
remote_file_target = Path(
|
|
290
|
-
self.copy_from_here(source_path=file_path,
|
|
291
|
-
return
|
|
233
|
+
remote_file_target = Path(target_rel2home).joinpath(file_path.relative_to(source_obj))
|
|
234
|
+
self.copy_from_here(source_path=str(file_path), target_rel2home=str(remote_file_target), compress_with_zip=False, recursive=False, overwrite_existing=overwrite_existing)
|
|
235
|
+
return None
|
|
292
236
|
if compress_with_zip:
|
|
293
237
|
print("🗜️ ZIPPING ...")
|
|
294
238
|
import shutil
|
|
@@ -298,16 +242,14 @@ class SSH:
|
|
|
298
242
|
else:
|
|
299
243
|
shutil.make_archive(str(zip_path), "zip", source_obj.parent, source_obj.name)
|
|
300
244
|
source_obj = Path(str(zip_path) + ".zip")
|
|
301
|
-
if not
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
remotepath = Path(remotepath_str)
|
|
305
|
-
print(f"""📤 [SFTP UPLOAD] Sending file: {repr(source_obj)} ==> Remote Path: {remotepath.as_posix()}""")
|
|
245
|
+
if not target_rel2home.endswith(".zip"): target_rel2home = target_rel2home + ".zip"
|
|
246
|
+
# remotepath_str = self.create_dir(target_path=target_path, overwrite_existing=overwrite_existing)
|
|
247
|
+
print(f"""📤 [SFTP UPLOAD] Sending file: {repr(source_obj)} ==> Remote Path: {target_rel2home}""")
|
|
306
248
|
try:
|
|
307
249
|
with self.tqdm_wrap(ascii=True, unit="b", unit_scale=True) as pbar:
|
|
308
250
|
if self.sftp is None: # type: ignore[unreachable]
|
|
309
251
|
raise RuntimeError(f"SFTP connection lost for {self.hostname}")
|
|
310
|
-
self.sftp.put(localpath=str(source_obj), remotepath=
|
|
252
|
+
self.sftp.put(localpath=str(source_obj), remotepath=str(Path(self.remote_specs["home_dir"]).joinpath(target_rel2home)), callback=pbar.view_bar)
|
|
311
253
|
except Exception:
|
|
312
254
|
if compress_with_zip and source_obj.exists() and str(source_obj).endswith("_archive.zip"):
|
|
313
255
|
source_obj.unlink()
|
|
@@ -325,11 +267,14 @@ class SSH:
|
|
|
325
267
|
with zipfile.ZipFile(archive_path, "r") as archive_handle:
|
|
326
268
|
archive_handle.extractall(extraction_directory)
|
|
327
269
|
archive_path.unlink()
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
270
|
+
command = lambda_to_python_script(lmb=lambda: unzip_archive(zip_file_path=str(Path(self.remote_specs["home_dir"]).joinpath(target_rel2home)), overwrite_flag=overwrite_existing), in_global=True)
|
|
271
|
+
tmp_py_file = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/create_target_dir_{randstr()}.py")
|
|
272
|
+
tmp_py_file.parent.mkdir(parents=True, exist_ok=True)
|
|
273
|
+
tmp_py_file.write_text(command, encoding="utf-8")
|
|
274
|
+
transferred_py_file = self.copy_from_here(source_path=str(tmp_py_file), target_rel2home=None, compress_with_zip=True, recursive=False, overwrite_existing=True)
|
|
275
|
+
self.run_shell(command=f"""{UV_RUN_CMD} python {transferred_py_file}""", verbose_output=False, description=f"UNZIPPING {target_rel2home}", strict_stderr=True, strict_return_code=True)
|
|
331
276
|
source_obj.unlink()
|
|
332
|
-
return
|
|
277
|
+
return None
|
|
333
278
|
|
|
334
279
|
def _check_remote_is_dir(self, source_path: Union[str, Path]) -> bool:
|
|
335
280
|
"""Helper to check if a remote path is a directory."""
|
|
@@ -342,16 +287,13 @@ class SSH:
|
|
|
342
287
|
json_result_path.write_text(json.dumps(is_directory, indent=2), encoding="utf-8")
|
|
343
288
|
print(json_result_path.as_posix())
|
|
344
289
|
return is_directory
|
|
345
|
-
|
|
346
|
-
from machineconfig.utils.meta import lambda_to_python_script
|
|
347
|
-
from machineconfig.utils.accessories import randstr
|
|
348
290
|
remote_json_output = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/return_{randstr()}.json").as_posix()
|
|
349
291
|
command = lambda_to_python_script(lmb=lambda: check_is_dir(path_to_check=str(source_path), json_output_path=remote_json_output), in_global=True)
|
|
350
292
|
response = self.run_py(python_code=command, uv_with=[MACHINECONFIG_VERSION], uv_project_dir=None, description=f"Check if source `{source_path}` is a dir", verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
351
293
|
remote_json_path = response.op.strip()
|
|
352
294
|
if not remote_json_path:
|
|
353
295
|
raise RuntimeError(f"Failed to check if {source_path} is directory - no response from remote")
|
|
354
|
-
|
|
296
|
+
|
|
355
297
|
local_json = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/local_{randstr()}.json")
|
|
356
298
|
self._simple_sftp_get(remote_path=remote_json_path, local_path=local_json)
|
|
357
299
|
import json
|
|
@@ -377,15 +319,15 @@ class SSH:
|
|
|
377
319
|
print(json_result_path.as_posix())
|
|
378
320
|
return expanded_path_posix
|
|
379
321
|
|
|
380
|
-
|
|
381
|
-
|
|
322
|
+
|
|
323
|
+
|
|
382
324
|
remote_json_output = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/return_{randstr()}.json").as_posix()
|
|
383
325
|
command = lambda_to_python_script(lmb=lambda: expand_source(path_to_expand=str(source_path), json_output_path=remote_json_output), in_global=True)
|
|
384
326
|
response = self.run_py(python_code=command, uv_with=[MACHINECONFIG_VERSION], uv_project_dir=None, description="Resolving source path by expanding user", verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
385
327
|
remote_json_path = response.op.strip()
|
|
386
328
|
if not remote_json_path:
|
|
387
329
|
raise RuntimeError(f"Could not resolve source path {source_path} - no response from remote")
|
|
388
|
-
|
|
330
|
+
|
|
389
331
|
local_json = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/local_{randstr()}.json")
|
|
390
332
|
self._simple_sftp_get(remote_path=remote_json_path, local_path=local_json)
|
|
391
333
|
import json
|
|
@@ -426,15 +368,15 @@ class SSH:
|
|
|
426
368
|
print(json_result_path.as_posix())
|
|
427
369
|
return file_paths_list
|
|
428
370
|
|
|
429
|
-
|
|
430
|
-
|
|
371
|
+
|
|
372
|
+
|
|
431
373
|
remote_json_output = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/return_{randstr()}.json").as_posix()
|
|
432
374
|
command = lambda_to_python_script(lmb=lambda: search_files(directory_path=expanded_source, json_output_path=remote_json_output), in_global=True)
|
|
433
375
|
response = self.run_py(python_code=command, uv_with=[MACHINECONFIG_VERSION], uv_project_dir=None, description="Searching for files in source", verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
434
376
|
remote_json_path = response.op.strip()
|
|
435
377
|
if not remote_json_path:
|
|
436
378
|
raise RuntimeError(f"Could not resolve source path {source} - no response from remote")
|
|
437
|
-
|
|
379
|
+
|
|
438
380
|
local_json = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/local_{randstr()}.json")
|
|
439
381
|
self._simple_sftp_get(remote_path=remote_json_path, local_path=local_json)
|
|
440
382
|
import json
|
|
@@ -464,15 +406,15 @@ class SSH:
|
|
|
464
406
|
except ValueError:
|
|
465
407
|
raise RuntimeError(f"Source path must be relative to home directory: {source_absolute_path}")
|
|
466
408
|
|
|
467
|
-
|
|
468
|
-
|
|
409
|
+
|
|
410
|
+
|
|
469
411
|
remote_json_output = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/return_{randstr()}.json").as_posix()
|
|
470
412
|
command = lambda_to_python_script(lmb=lambda: collapse_to_home_dir(absolute_path=expanded_source, json_output_path=remote_json_output), in_global=True)
|
|
471
413
|
response = self.run_py(python_code=command, uv_with=[MACHINECONFIG_VERSION], uv_project_dir=None, description="Finding default target via relative source path", verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
472
414
|
remote_json_path_dir = response.op.strip()
|
|
473
415
|
if not remote_json_path_dir:
|
|
474
416
|
raise RuntimeError("Could not resolve target path - no response from remote")
|
|
475
|
-
|
|
417
|
+
|
|
476
418
|
local_json_dir = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/local_{randstr()}.json")
|
|
477
419
|
self._simple_sftp_get(remote_path=remote_json_path_dir, local_path=local_json_dir)
|
|
478
420
|
import json
|
|
@@ -516,15 +458,15 @@ class SSH:
|
|
|
516
458
|
print(json_result_path.as_posix())
|
|
517
459
|
return zip_file_path
|
|
518
460
|
|
|
519
|
-
|
|
520
|
-
|
|
461
|
+
|
|
462
|
+
|
|
521
463
|
remote_json_output = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/return_{randstr()}.json").as_posix()
|
|
522
464
|
command = lambda_to_python_script(lmb=lambda: zip_source(path_to_zip=expanded_source, json_output_path=remote_json_output), in_global=True)
|
|
523
465
|
response = self.run_py(python_code=command, uv_with=[MACHINECONFIG_VERSION], uv_project_dir=None, description=f"Zipping source file {source}", verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
524
466
|
remote_json_path = response.op.strip()
|
|
525
467
|
if not remote_json_path:
|
|
526
468
|
raise RuntimeError(f"Could not zip {source} - no response from remote")
|
|
527
|
-
|
|
469
|
+
|
|
528
470
|
local_json = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/local_{randstr()}.json")
|
|
529
471
|
self._simple_sftp_get(remote_path=remote_json_path, local_path=local_json)
|
|
530
472
|
import json
|
|
@@ -555,15 +497,15 @@ class SSH:
|
|
|
555
497
|
except ValueError:
|
|
556
498
|
raise RuntimeError(f"Source path must be relative to home directory: {source_absolute_path}")
|
|
557
499
|
|
|
558
|
-
|
|
559
|
-
|
|
500
|
+
|
|
501
|
+
|
|
560
502
|
remote_json_output = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/return_{randstr()}.json").as_posix()
|
|
561
503
|
command = lambda_to_python_script(lmb=lambda: collapse_to_home(absolute_path=expanded_source, json_output_path=remote_json_output), in_global=True)
|
|
562
504
|
response = self.run_py(python_code=command, uv_with=[MACHINECONFIG_VERSION], uv_project_dir=None, description="Finding default target via relative source path", verbose_output=False, strict_stderr=False, strict_return_code=False)
|
|
563
505
|
remote_json_path = response.op.strip()
|
|
564
506
|
if not remote_json_path:
|
|
565
507
|
raise RuntimeError("Could not resolve target path - no response from remote")
|
|
566
|
-
|
|
508
|
+
|
|
567
509
|
local_json = Path.home().joinpath(f"{DEFAULT_PICKLE_SUBDIR}/local_{randstr()}.json")
|
|
568
510
|
self._simple_sftp_get(remote_path=remote_json_path, local_path=local_json)
|
|
569
511
|
import json
|
|
@@ -613,10 +555,12 @@ class SSH:
|
|
|
613
555
|
else:
|
|
614
556
|
file_or_dir_path.unlink()
|
|
615
557
|
|
|
616
|
-
|
|
558
|
+
|
|
617
559
|
command = lambda_to_python_script(lmb=lambda: delete_temp_zip(path_to_delete=expanded_source), in_global=True)
|
|
618
560
|
self.run_py(python_code=command, uv_with=[MACHINECONFIG_VERSION], uv_project_dir=None, description="Cleaning temp zip files @ remote.", verbose_output=False, strict_stderr=True, strict_return_code=True)
|
|
619
561
|
|
|
620
562
|
print("\n")
|
|
621
563
|
return target_obj
|
|
622
564
|
|
|
565
|
+
if __name__ == "__main__":
|
|
566
|
+
ssh = SSH(host="p51s", username=None, hostname=None, ssh_key_path=None, password=None, port=22, enable_compression=False)
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
from machineconfig.utils.path_extended import PathExtended
|
|
2
|
+
import subprocess
|
|
3
|
+
from typing import Any, BinaryIO, Optional, Union
|
|
4
|
+
from typing import Literal, TypeAlias
|
|
5
|
+
from dataclasses import dataclass
|
|
6
|
+
|
|
7
|
+
SHELLS: TypeAlias = Literal["default", "cmd", "powershell", "pwsh", "bash"] # pwsh.exe is PowerShell (community) and powershell.exe is Windows Powershell (msft)
|
|
8
|
+
CONSOLE: TypeAlias = Literal["wt", "cmd"]
|
|
9
|
+
MACHINE: TypeAlias = Literal["Windows", "Linux", "Darwin"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@dataclass
|
|
13
|
+
class STD:
|
|
14
|
+
stdin: str
|
|
15
|
+
stdout: str
|
|
16
|
+
stderr: str
|
|
17
|
+
returncode: int
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class Response:
|
|
21
|
+
@staticmethod
|
|
22
|
+
def from_completed_process(cp: subprocess.CompletedProcess[str]):
|
|
23
|
+
resp = Response(cmd=cp.args)
|
|
24
|
+
resp.output.stdout = cp.stdout
|
|
25
|
+
resp.output.stderr = cp.stderr
|
|
26
|
+
resp.output.returncode = cp.returncode
|
|
27
|
+
return resp
|
|
28
|
+
|
|
29
|
+
def __init__(self, stdin: Optional[BinaryIO] = None, stdout: Optional[BinaryIO] = None, stderr: Optional[BinaryIO] = None, cmd: Optional[str] = None, desc: str = ""):
|
|
30
|
+
self.std = dict(stdin=stdin, stdout=stdout, stderr=stderr)
|
|
31
|
+
self.output = STD(stdin="", stdout="", stderr="", returncode=0)
|
|
32
|
+
self.input = cmd
|
|
33
|
+
self.desc = desc # input command
|
|
34
|
+
|
|
35
|
+
def __call__(self, *args: Any, **kwargs: Any) -> Optional[str]:
|
|
36
|
+
_ = args, kwargs
|
|
37
|
+
return self.op.rstrip() if type(self.op) is str else None
|
|
38
|
+
def __repr__(self) -> str:
|
|
39
|
+
return f"Response({self.input=}, {self.output=}, {self.desc=}, {self.op=}, {self.ip=}, {self.err=}, {self.returncode=})"
|
|
40
|
+
@property
|
|
41
|
+
def op(self) -> str:
|
|
42
|
+
return self.output.stdout
|
|
43
|
+
|
|
44
|
+
@property
|
|
45
|
+
def ip(self) -> str:
|
|
46
|
+
return self.output.stdin
|
|
47
|
+
|
|
48
|
+
@property
|
|
49
|
+
def err(self) -> str:
|
|
50
|
+
return self.output.stderr
|
|
51
|
+
|
|
52
|
+
@property
|
|
53
|
+
def returncode(self) -> int:
|
|
54
|
+
return self.output.returncode
|
|
55
|
+
|
|
56
|
+
def op2path(self, strict_returncode: bool = True, strict_err: bool = False) -> Union[PathExtended, None]:
|
|
57
|
+
if self.is_successful(strict_returcode=strict_returncode, strict_err=strict_err):
|
|
58
|
+
return PathExtended(self.op.rstrip())
|
|
59
|
+
return None
|
|
60
|
+
|
|
61
|
+
def op_if_successfull_or_default(self, strict_returcode: bool = True, strict_err: bool = False) -> Optional[str]:
|
|
62
|
+
return self.op if self.is_successful(strict_returcode=strict_returcode, strict_err=strict_err) else None
|
|
63
|
+
|
|
64
|
+
def is_successful(self, strict_returcode: bool = True, strict_err: bool = False) -> bool:
|
|
65
|
+
return ((self.returncode in {0, None}) if strict_returcode else True) and (self.err == "" if strict_err else True)
|
|
66
|
+
|
|
67
|
+
def capture(self):
|
|
68
|
+
for key in ["stdin", "stdout", "stderr"]:
|
|
69
|
+
val: Optional[BinaryIO] = self.std[key]
|
|
70
|
+
if val is not None and val.readable():
|
|
71
|
+
self.output.__dict__[key] = val.read().decode().rstrip()
|
|
72
|
+
return self
|
|
73
|
+
|
|
74
|
+
def print_if_unsuccessful(self, desc: str = "TERMINAL CMD", strict_err: bool = False, strict_returncode: bool = False, assert_success: bool = False):
|
|
75
|
+
success = self.is_successful(strict_err=strict_err, strict_returcode=strict_returncode)
|
|
76
|
+
if assert_success:
|
|
77
|
+
assert success, self.print(capture=False, desc=desc)
|
|
78
|
+
if success:
|
|
79
|
+
print(f"✅ {desc} completed successfully")
|
|
80
|
+
else:
|
|
81
|
+
self.print(capture=False, desc=desc)
|
|
82
|
+
return self
|
|
83
|
+
|
|
84
|
+
def print(self, desc: str = "TERMINAL CMD", capture: bool = True):
|
|
85
|
+
if capture:
|
|
86
|
+
self.capture()
|
|
87
|
+
from rich import console
|
|
88
|
+
|
|
89
|
+
con = console.Console()
|
|
90
|
+
from rich.panel import Panel
|
|
91
|
+
from rich.text import Text # from rich.syntax import Syntax; syntax = Syntax(my_code, "python", theme="monokai", line_numbers=True)
|
|
92
|
+
|
|
93
|
+
tmp1 = Text("📥 Input Command:\n")
|
|
94
|
+
tmp1.stylize("u bold blue")
|
|
95
|
+
tmp2 = Text("\n📤 Terminal Response:\n")
|
|
96
|
+
tmp2.stylize("u bold blue")
|
|
97
|
+
list_str = [f"{f' {idx} - {key} '}".center(40, "═") + f"\n{val}" for idx, (key, val) in enumerate(self.output.__dict__.items())]
|
|
98
|
+
txt = tmp1 + Text(str(self.input), style="white") + tmp2 + Text("\n".join(list_str), style="white")
|
|
99
|
+
con.print(Panel(txt, title=f"🖥️ {self.desc}", subtitle=f"📋 {desc}", width=150, style="bold cyan on black"))
|
|
100
|
+
return self
|