machineconfig 8.12__py3-none-any.whl → 8.45__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/run_cluster.py +1 -1
- machineconfig/cluster/remote/run_remote.py +1 -1
- machineconfig/cluster/sessions_managers/utils/maker.py +10 -8
- machineconfig/cluster/sessions_managers/wt_local.py +1 -1
- machineconfig/cluster/sessions_managers/wt_local_manager.py +1 -1
- machineconfig/cluster/sessions_managers/zellij_local.py +1 -1
- machineconfig/cluster/sessions_managers/zellij_local_manager.py +1 -1
- machineconfig/jobs/installer/checks/check_installations.py +133 -0
- machineconfig/jobs/installer/checks/install_utils.py +132 -0
- machineconfig/jobs/installer/checks/report_utils.py +39 -0
- machineconfig/jobs/installer/checks/vt_utils.py +89 -0
- machineconfig/jobs/installer/installer_data.json +225 -140
- machineconfig/jobs/installer/linux_scripts/docker.sh +6 -9
- machineconfig/jobs/installer/package_groups.py +10 -9
- machineconfig/jobs/installer/python_scripts/boxes.py +1 -2
- machineconfig/jobs/installer/python_scripts/code.py +10 -8
- machineconfig/jobs/installer/python_scripts/hx.py +30 -13
- machineconfig/jobs/installer/python_scripts/nerfont_windows_helper.py +6 -5
- machineconfig/jobs/installer/python_scripts/sysabc.py +25 -19
- machineconfig/jobs/installer/python_scripts/yazi.py +33 -17
- machineconfig/jobs/scripts/powershell_scripts/cmatrix.ps1 +52 -0
- machineconfig/jobs/scripts/powershell_scripts/mount_ssh.ps1 +1 -1
- machineconfig/jobs/scripts_dynamic/a.py +413 -10
- machineconfig/profile/create_links.py +77 -20
- machineconfig/profile/create_links_export.py +40 -51
- machineconfig/profile/mapper_data.toml +30 -0
- machineconfig/profile/mapper_dotfiles.toml +253 -0
- machineconfig/scripts/python/agents.py +70 -172
- machineconfig/scripts/python/ai/initai.py +3 -1
- machineconfig/scripts/python/ai/scripts/__init__.py +1 -0
- machineconfig/scripts/python/ai/scripts/lint_and_type_check.ps1 +2 -0
- machineconfig/scripts/python/ai/scripts/lint_and_type_check.sh +7 -5
- machineconfig/scripts/python/ai/solutions/claude/claude.py +1 -1
- machineconfig/scripts/python/ai/solutions/cline/cline.py +1 -1
- machineconfig/scripts/python/ai/solutions/copilot/github_copilot.py +1 -1
- machineconfig/scripts/python/ai/solutions/copilot/instructions/python/dev.instructions.md +29 -0
- machineconfig/scripts/python/ai/solutions/crush/crush.py +1 -1
- machineconfig/scripts/python/ai/solutions/cursor/cursors.py +1 -1
- machineconfig/scripts/python/ai/solutions/gemini/gemini.py +1 -1
- machineconfig/scripts/python/ai/solutions/gemini/settings.json +3 -0
- machineconfig/scripts/python/ai/{solutions → utils}/generic.py +2 -15
- machineconfig/scripts/python/ai/utils/vscode_tasks.py +6 -3
- machineconfig/scripts/python/cloud.py +58 -11
- machineconfig/scripts/python/croshell.py +4 -156
- machineconfig/scripts/python/devops.py +57 -40
- machineconfig/scripts/python/devops_navigator.py +17 -3
- machineconfig/scripts/python/fire_jobs.py +8 -207
- machineconfig/scripts/python/ftpx.py +5 -225
- machineconfig/scripts/python/graph/cli_graph.json +8743 -0
- machineconfig/scripts/python/{env_manager → helper_env}/path_manager_tui.py +2 -2
- machineconfig/scripts/python/{env_manager → helpers/helper_env}/env_manager_tui.py +1 -1
- machineconfig/scripts/python/helpers/helper_env/path_manager_tui.py +228 -0
- machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/agentic_frameworks/fire_crush.py +1 -1
- machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/agentic_frameworks/fire_cursor_agents.py +1 -1
- machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/agentic_frameworks/fire_gemini.py +1 -1
- machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/agentic_frameworks/fire_qwen.py +1 -1
- machineconfig/scripts/python/helpers/helpers_agents/agents_impl.py +168 -0
- machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/fire_agents_help_launch.py +5 -5
- machineconfig/scripts/python/{helpers_cloud → helpers/helpers_cloud}/cloud_copy.py +6 -6
- machineconfig/scripts/python/{helpers_cloud → helpers/helpers_cloud}/cloud_mount.py +10 -5
- machineconfig/scripts/python/{helpers_cloud → helpers/helpers_cloud}/cloud_sync.py +3 -3
- machineconfig/scripts/python/{helpers_cloud → helpers/helpers_cloud}/helpers2.py +1 -1
- machineconfig/scripts/python/helpers/helpers_croshell/croshell_impl.py +225 -0
- machineconfig/scripts/python/{helpers_croshell → helpers/helpers_croshell}/scheduler.py +4 -4
- machineconfig/scripts/python/{helpers_croshell → helpers/helpers_croshell}/start_slidev.py +7 -6
- machineconfig/scripts/python/helpers/helpers_devops/backup_config.py +149 -0
- machineconfig/scripts/python/helpers/helpers_devops/cli_backup_retrieve.py +267 -0
- machineconfig/scripts/python/helpers/helpers_devops/cli_config.py +98 -0
- machineconfig/scripts/python/helpers/helpers_devops/cli_config_dotfile.py +274 -0
- machineconfig/scripts/python/helpers/helpers_devops/cli_data.py +76 -0
- machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/cli_nw.py +52 -72
- machineconfig/scripts/python/helpers/helpers_devops/cli_repos.py +265 -0
- machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/cli_self.py +45 -21
- machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/cli_share_file.py +44 -30
- machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/cli_share_server.py +26 -43
- machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/cli_share_terminal.py +12 -6
- machineconfig/scripts/python/helpers/helpers_devops/cli_ssh.py +167 -0
- machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/devops_status.py +12 -6
- machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/devops_update_repos.py +1 -1
- machineconfig/scripts/python/{interactive.py → helpers/helpers_devops/interactive.py} +69 -45
- machineconfig/scripts/python/helpers/helpers_devops/run_script.py +197 -0
- machineconfig/scripts/python/helpers/helpers_devops/themes/choose_starship_theme.ps1 +41 -0
- machineconfig/scripts/python/helpers/helpers_devops/themes/choose_starship_theme.sh +48 -0
- machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/themes/choose_wezterm_theme.py +3 -3
- machineconfig/scripts/python/helpers/helpers_fire_command/fire_jobs_impl.py +233 -0
- machineconfig/scripts/python/{helpers_fire_command → helpers/helpers_fire_command}/fire_jobs_route_helper.py +3 -3
- machineconfig/scripts/python/helpers/helpers_msearch/msearch_impl.py +248 -0
- machineconfig/scripts/python/{helpers_msearch → helpers/helpers_msearch}/scripts_linux/fzfg +4 -3
- machineconfig/scripts/python/helpers/helpers_msearch/scripts_linux/search_with_context.sh +48 -0
- machineconfig/scripts/python/{helpers_msearch → helpers/helpers_msearch}/scripts_windows/fzfg.ps1 +1 -1
- machineconfig/scripts/python/helpers/helpers_navigator/__init__.py +20 -0
- machineconfig/scripts/python/helpers/helpers_navigator/cli_graph_loader.py +234 -0
- machineconfig/scripts/python/{helpers_navigator → helpers/helpers_navigator}/command_builder.py +61 -13
- machineconfig/scripts/python/helpers/helpers_navigator/command_detail.py +153 -0
- machineconfig/scripts/python/helpers/helpers_navigator/command_tree.py +45 -0
- machineconfig/scripts/python/{helpers_navigator → helpers/helpers_navigator}/data_models.py +18 -11
- machineconfig/scripts/python/{helpers_navigator → helpers/helpers_navigator}/main_app.py +5 -5
- machineconfig/scripts/python/helpers/helpers_network/__init__.py +0 -0
- machineconfig/scripts/python/{helpers_network → helpers/helpers_network}/address.py +15 -17
- machineconfig/scripts/python/{helpers_network → helpers/helpers_network}/address_switch.py +1 -1
- machineconfig/scripts/python/helpers/helpers_network/ftpx_impl.py +276 -0
- machineconfig/scripts/python/{helpers_network → helpers/helpers_network}/mount_ssh.py +2 -2
- machineconfig/scripts/python/helpers/helpers_network/ssh_add_identity.py +73 -0
- machineconfig/scripts/python/helpers/helpers_network/ssh_add_ssh_key.py +175 -0
- machineconfig/scripts/python/helpers/helpers_network/ssh_debug_linux.py +319 -0
- machineconfig/scripts/python/helpers/helpers_network/ssh_debug_windows.py +275 -0
- machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/action.py +3 -3
- machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/action_helper.py +3 -3
- machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/cloud_repo_sync.py +116 -33
- machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/grource.py +3 -2
- machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/record.py +33 -13
- machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/repo_analyzer_2.py +63 -19
- machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/update.py +0 -6
- machineconfig/scripts/python/helpers/helpers_search/script_help.py +81 -0
- machineconfig/scripts/python/helpers/helpers_sessions/__init__.py +0 -0
- machineconfig/scripts/python/helpers/helpers_sessions/sessions_impl.py +177 -0
- machineconfig/scripts/python/{helpers_sessions → helpers/helpers_sessions}/sessions_multiprocess.py +1 -1
- machineconfig/scripts/python/helpers/helpers_terminal/__init__.py +0 -0
- machineconfig/scripts/python/helpers/helpers_terminal/terminal_impl.py +96 -0
- machineconfig/scripts/python/{helpers_utils → helpers/helpers_utils}/download.py +1 -1
- machineconfig/scripts/python/{helpers_utils → helpers/helpers_utils}/python.py +49 -29
- machineconfig/scripts/python/helpers/helpers_utils/specs.py +246 -0
- machineconfig/scripts/python/mcfg_entry.py +133 -48
- machineconfig/scripts/python/msearch.py +15 -61
- machineconfig/scripts/python/sessions.py +59 -194
- machineconfig/scripts/python/terminal.py +18 -96
- machineconfig/scripts/python/utils.py +101 -20
- machineconfig/settings/atuin/config.toml +294 -0
- machineconfig/settings/atuin/themes/catppuccin-mocha-mauve.toml +12 -0
- machineconfig/settings/linters/.ruff.toml +1 -0
- machineconfig/settings/mprocs/windows/mprocs.yaml +2 -2
- machineconfig/settings/shells/bash/init.sh +6 -3
- machineconfig/settings/shells/pwsh/init.ps1 +69 -1
- machineconfig/settings/shells/pwsh/search_pwsh_history.ps1 +99 -0
- machineconfig/settings/shells/wezterm/wezterm.lua +4 -1
- machineconfig/settings/shells/wt/settings.json +20 -7
- machineconfig/settings/shells/zsh/init.sh +34 -4
- machineconfig/settings/television/cable_unix/bash-history.toml +1 -1
- machineconfig/settings/television/cable_windows/pwsh-history.toml +1 -1
- machineconfig/settings/tv/config.toml +234 -0
- machineconfig/settings/tv/themes/catppuccin-mocha-sky.toml +22 -0
- machineconfig/settings/wsl/.wslconfig +5 -30
- machineconfig/settings/yazi/yazi_linux.toml +18 -8
- machineconfig/settings/zellij/layouts/st.kdl +2 -2
- machineconfig/settings/zellij/layouts/st2.kdl +1 -1
- machineconfig/setup_linux/web_shortcuts/interactive.sh +10 -10
- machineconfig/setup_linux/web_shortcuts/live_from_github.sh +3 -0
- machineconfig/setup_mac/__init__.py +0 -2
- machineconfig/setup_windows/__init__.py +0 -1
- machineconfig/setup_windows/web_shortcuts/interactive.ps1 +14 -13
- machineconfig/setup_windows/web_shortcuts/live_from_github.ps1 +4 -3
- machineconfig/setup_windows/web_shortcuts/quick_init.ps1 +3 -3
- machineconfig/type_hinting/sql/__init__.py +1 -0
- machineconfig/type_hinting/sql/base.py +216 -0
- machineconfig/type_hinting/sql/core_schema.py +64 -0
- machineconfig/type_hinting/sql/core_schema_typeddict.py +41 -0
- machineconfig/type_hinting/sql/typeddict_codegen.py +222 -0
- machineconfig/type_hinting/typedict/__init__.py +1 -0
- machineconfig/type_hinting/typedict/ast_utils.py +130 -0
- machineconfig/type_hinting/typedict/generator_helpers.py +319 -0
- machineconfig/type_hinting/typedict/generators.py +231 -0
- machineconfig/type_hinting/typedict/polars_schema.py +24 -0
- machineconfig/type_hinting/typedict/polars_schema_typeddict.py +63 -0
- machineconfig/utils/accessories.py +24 -0
- machineconfig/utils/code.py +79 -37
- machineconfig/utils/files/ascii_art.py +10 -14
- machineconfig/utils/files/headers.py +3 -5
- machineconfig/utils/files/read.py +8 -1
- machineconfig/utils/installer_utils/github_release_bulk.py +1 -0
- machineconfig/utils/installer_utils/install_from_url.py +1 -1
- machineconfig/utils/installer_utils/installer_class.py +12 -4
- machineconfig/utils/installer_utils/installer_cli.py +1 -15
- machineconfig/utils/installer_utils/installer_helper.py +2 -2
- machineconfig/utils/installer_utils/installer_locator_utils.py +13 -13
- machineconfig/utils/installer_utils/installer_runner.py +4 -4
- machineconfig/utils/meta.py +6 -4
- machineconfig/utils/options.py +49 -19
- machineconfig/utils/options_utils/__init__.py +0 -0
- machineconfig/utils/options_utils/options_tv_linux.py +211 -0
- machineconfig/utils/options_utils/options_tv_windows.py +88 -0
- machineconfig/utils/options_utils/tv_options.py +37 -0
- machineconfig/utils/path_extended.py +6 -6
- machineconfig/utils/scheduler.py +8 -2
- machineconfig/utils/schemas/fire_agents/fire_agents_input.py +1 -1
- machineconfig/utils/source_of_truth.py +6 -1
- machineconfig/utils/ssh.py +73 -22
- machineconfig/utils/ssh_utils/abc.py +1 -1
- machineconfig/utils/ssh_utils/copy_from_here.py +2 -2
- machineconfig/utils/ssh_utils/utils.py +2 -2
- machineconfig/utils/ssh_utils/wsl.py +107 -170
- machineconfig/utils/ssh_utils/wsl_helper.py +217 -0
- machineconfig/utils/upgrade_packages.py +4 -8
- {machineconfig-8.12.dist-info → machineconfig-8.45.dist-info}/METADATA +29 -22
- {machineconfig-8.12.dist-info → machineconfig-8.45.dist-info}/RECORD +249 -211
- machineconfig/jobs/installer/check_installations.py +0 -248
- machineconfig/jobs/scripts/bash_scripts/mint_keyboard_shortcuts.sh +0 -30
- machineconfig/profile/backup.toml +0 -49
- machineconfig/profile/mapper.toml +0 -263
- machineconfig/scripts/python/helpers_devops/cli_config.py +0 -105
- machineconfig/scripts/python/helpers_devops/cli_config_dotfile.py +0 -89
- machineconfig/scripts/python/helpers_devops/cli_data.py +0 -25
- machineconfig/scripts/python/helpers_devops/cli_repos.py +0 -208
- machineconfig/scripts/python/helpers_devops/devops_backup_retrieve.py +0 -80
- machineconfig/scripts/python/helpers_devops/run_script.py +0 -168
- machineconfig/scripts/python/helpers_devops/themes/choose_starship_theme.bash +0 -3
- machineconfig/scripts/python/helpers_navigator/__init__.py +0 -20
- machineconfig/scripts/python/helpers_navigator/command_detail.py +0 -44
- machineconfig/scripts/python/helpers_navigator/command_tree.py +0 -620
- machineconfig/scripts/python/helpers_network/ssh_add_identity.py +0 -116
- machineconfig/scripts/python/helpers_network/ssh_add_ssh_key.py +0 -153
- machineconfig/scripts/python/helpers_network/ssh_debug_linux.py +0 -391
- machineconfig/scripts/python/helpers_network/ssh_debug_windows.py +0 -338
- machineconfig/scripts/python/helpers_repos/entrypoint.py +0 -77
- machineconfig/setup_mac/ssh/openssh_setup.sh +0 -114
- machineconfig/setup_windows/ssh/add-sshkey.ps1 +0 -29
- machineconfig/setup_windows/ssh/openssh-server.ps1 +0 -37
- machineconfig/utils/options_tv.py +0 -119
- machineconfig/utils/tst.py +0 -20
- /machineconfig/{scripts/python/helpers_agents → jobs/installer/checks}/__init__.py +0 -0
- /machineconfig/scripts/python/ai/{solutions/_shared.py → utils/shared.py} +0 -0
- /machineconfig/scripts/python/{helpers_agents/agentic_frameworks → graph}/__init__.py +0 -0
- /machineconfig/scripts/python/{helpers_cloud → helpers}/__init__.py +0 -0
- /machineconfig/scripts/python/{env_manager → helpers/helper_env}/__init__.py +0 -0
- /machineconfig/scripts/python/{env_manager → helpers/helper_env}/path_manager_backend.py +0 -0
- /machineconfig/scripts/python/{helpers_croshell → helpers/helpers_agents}/__init__.py +0 -0
- /machineconfig/scripts/python/{helpers_devops → helpers/helpers_agents/agentic_frameworks}/__init__.py +0 -0
- /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/agentic_frameworks/fire_crush.json +0 -0
- /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/fire_agents_help_search.py +0 -0
- /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/fire_agents_helper_types.py +0 -0
- /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/fire_agents_load_balancer.py +0 -0
- /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/privacy/configs/aichat/config.yaml +0 -0
- /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/privacy/configs/aider/.aider.conf.yml +0 -0
- /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/privacy/configs/copilot/config.yml +0 -0
- /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/privacy/configs/crush/crush.json +0 -0
- /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/privacy/configs/gemini/settings.json +0 -0
- /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/privacy/privacy.py +0 -0
- /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/templates/prompt.txt +0 -0
- /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/templates/template.ps1 +0 -0
- /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/templates/template.sh +0 -0
- /machineconfig/scripts/python/{helpers_devops/themes → helpers/helpers_cloud}/__init__.py +0 -0
- /machineconfig/scripts/python/{helpers_cloud → helpers/helpers_cloud}/cloud_helpers.py +0 -0
- /machineconfig/scripts/python/{helpers_cloud → helpers/helpers_cloud}/helpers5.py +0 -0
- /machineconfig/scripts/python/{helpers_fire_command → helpers/helpers_croshell}/__init__.py +0 -0
- /machineconfig/scripts/python/{helpers_croshell → helpers/helpers_croshell}/crosh.py +0 -0
- /machineconfig/scripts/python/{helpers_croshell → helpers/helpers_croshell}/pomodoro.py +0 -0
- /machineconfig/scripts/python/{helpers_croshell → helpers/helpers_croshell}/viewer.py +0 -0
- /machineconfig/scripts/python/{helpers_croshell → helpers/helpers_croshell}/viewer_template.py +0 -0
- /machineconfig/scripts/python/{helpers_network → helpers/helpers_devops}/__init__.py +0 -0
- /machineconfig/scripts/python/{helpers_sessions → helpers/helpers_devops/themes}/__init__.py +0 -0
- /machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/themes/choose_pwsh_theme.ps1 +0 -0
- /machineconfig/scripts/python/{helpers_devops/themes/choose_starship_theme.ps1 → helpers/helpers_fire_command/__init__.py} +0 -0
- /machineconfig/scripts/python/{helpers_fire_command → helpers/helpers_fire_command}/cloud_manager.py +0 -0
- /machineconfig/scripts/python/{helpers_fire_command → helpers/helpers_fire_command}/f.py +0 -0
- /machineconfig/scripts/python/{helpers_fire_command → helpers/helpers_fire_command}/file_wrangler.py +0 -0
- /machineconfig/scripts/python/{helpers_fire_command → helpers/helpers_fire_command}/fire_jobs_args_helper.py +0 -0
- /machineconfig/scripts/python/{helpers_fire_command → helpers/helpers_fire_command}/fire_jobs_streamlit_helper.py +0 -0
- /machineconfig/scripts/python/{helpers_msearch → helpers/helpers_msearch}/__init__.py +0 -0
- /machineconfig/scripts/python/{helpers_navigator → helpers/helpers_navigator}/search_bar.py +0 -0
- /machineconfig/scripts/python/{helpers_network → helpers/helpers_network}/mount_nfs.py +0 -0
- /machineconfig/scripts/python/{helpers_network → helpers/helpers_network}/mount_nw_drive.py +0 -0
- /machineconfig/scripts/python/{helpers_network → helpers/helpers_network}/onetimeshare.py +0 -0
- /machineconfig/scripts/python/{helpers_network → helpers/helpers_network}/wifi_conn.py +0 -0
- /machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/clone.py +0 -0
- /machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/repo_analyzer_1.py +0 -0
- /machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/sync.py +0 -0
- /machineconfig/scripts/python/helpers/{ast_search.py → helpers_search/ast_search.py} +0 -0
- /machineconfig/scripts/python/helpers/{qr_code.py → helpers_search/qr_code.py} +0 -0
- /machineconfig/scripts/python/helpers/{repo_rag.py → helpers_search/repo_rag.py} +0 -0
- /machineconfig/scripts/python/helpers/{symantic_search.py → helpers_search/symantic_search.py} +0 -0
- /machineconfig/scripts/python/{helpers_utils → helpers/helpers_utils}/pdf.py +0 -0
- {machineconfig-8.12.dist-info → machineconfig-8.45.dist-info}/WHEEL +0 -0
- {machineconfig-8.12.dist-info → machineconfig-8.45.dist-info}/entry_points.txt +0 -0
- {machineconfig-8.12.dist-info → machineconfig-8.45.dist-info}/top_level.txt +0 -0
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
"""run python/shell scripts from pre-defined directorys, or, run command/file in the machineconfig environment
|
|
4
|
-
|
|
5
|
-
Recursively Searched Predefined Directories:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* 'private' : $HOME/dotfiles/scripts
|
|
9
|
-
|
|
10
|
-
* 'public' : $HOME/.config/machineconfig/scripts
|
|
11
|
-
|
|
12
|
-
* 'library' : $MACHINECONFIG_LIBRARY_ROOT/jobs/scripts
|
|
13
|
-
|
|
14
|
-
* 'dynamic' : fetched from GitHub repository on the fly (relies on latest commit, rather than the version currently installed)
|
|
15
|
-
|
|
16
|
-
"""
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import typer
|
|
20
|
-
from typing import Annotated, Optional, Literal
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def run_py_script(name: Annotated[str, typer.Argument(help="Name of script to run, e.g., 'a' for a.py, or command to execute")] = "",
|
|
25
|
-
where: Annotated[Literal["all", "a", "private", "p", "public", "b", "library", "l", "dynamic", "d"], typer.Option("--where", "-w", help="Where to look for the script")] = "all",
|
|
26
|
-
interactive: Annotated[bool, typer.Option(..., "--interactive", "-i", help="Interactive selection of scripts to run")] = False,
|
|
27
|
-
command: Annotated[Optional[bool], typer.Option(..., "--command", "-c", help="Run as command")] = False,
|
|
28
|
-
# use_machineconfig_env: Annotated[bool, typer.Option(..., "--use-machineconfig-env/--no-use-machineconfig-env", "-m/-nm", help="Whether to use the machineconfig python environment")] = False
|
|
29
|
-
) -> None:
|
|
30
|
-
if not interactive and not name:
|
|
31
|
-
typer.echo("❌ ERROR: You must provide a script name or use --interactive option to select a script.")
|
|
32
|
-
raise typer.Exit(code=1)
|
|
33
|
-
|
|
34
|
-
from pathlib import Path
|
|
35
|
-
if command:
|
|
36
|
-
exec(name)
|
|
37
|
-
return
|
|
38
|
-
if Path(name).is_file():
|
|
39
|
-
if name.endswith(".py"):
|
|
40
|
-
import machineconfig
|
|
41
|
-
import subprocess
|
|
42
|
-
import sys
|
|
43
|
-
subprocess.run([sys.executable, name], cwd=machineconfig.__path__[0])
|
|
44
|
-
return
|
|
45
|
-
else:
|
|
46
|
-
raise RuntimeError(f"File '{name}' is not a python (.py) file.")
|
|
47
|
-
|
|
48
|
-
from machineconfig.utils.source_of_truth import CONFIG_ROOT, LIBRARY_ROOT
|
|
49
|
-
private_root = Path.home().joinpath("dotfiles/scripts") # local directory
|
|
50
|
-
public_root = CONFIG_ROOT.joinpath("scripts") # local machineconfig directory
|
|
51
|
-
library_root = LIBRARY_ROOT.joinpath("jobs", "scripts")
|
|
52
|
-
|
|
53
|
-
roots: list[Path] = []
|
|
54
|
-
match where:
|
|
55
|
-
case "all" | "a":
|
|
56
|
-
roots = [private_root, public_root, library_root]
|
|
57
|
-
case "private" | "p":
|
|
58
|
-
roots = [private_root]
|
|
59
|
-
case "public" | "b":
|
|
60
|
-
roots = [public_root]
|
|
61
|
-
case "library" | "l":
|
|
62
|
-
roots = [library_root]
|
|
63
|
-
case "dynamic" | "d":
|
|
64
|
-
roots = []
|
|
65
|
-
|
|
66
|
-
suffixes: list[str]
|
|
67
|
-
import platform
|
|
68
|
-
if platform.system() == "Windows":
|
|
69
|
-
suffixes = [".py", ".bat", ".cmd", ".ps1"]
|
|
70
|
-
elif platform.system() == "Darwin" or platform.system() == "Linux":
|
|
71
|
-
suffixes = [".py", ".sh"]
|
|
72
|
-
else:
|
|
73
|
-
suffixes = [".py"]
|
|
74
|
-
|
|
75
|
-
# Finding target file
|
|
76
|
-
target_file: Optional[Path] = None
|
|
77
|
-
potential_matches: list[Path] = []
|
|
78
|
-
for a_root in roots:
|
|
79
|
-
for a_suffix in suffixes:
|
|
80
|
-
candidates = [a_root.joinpath(name), a_root.joinpath(f"{name}{a_suffix}")]
|
|
81
|
-
for result in candidates:
|
|
82
|
-
if result.exists() and result.is_file():
|
|
83
|
-
target_file = result
|
|
84
|
-
break
|
|
85
|
-
candidates = [a_file for a_file in a_root.rglob(f"*{name}{a_suffix}") if a_file.is_file()]
|
|
86
|
-
if name != "":
|
|
87
|
-
candidates += [a_file for a_file in a_root.rglob(f"*{name}*") if a_file.is_file()]
|
|
88
|
-
# print(candidates)
|
|
89
|
-
if len(candidates) == 1 and candidates[0].stem == name.split(".")[0]: # perfect match with name at least.
|
|
90
|
-
target_file = candidates[0]
|
|
91
|
-
else:
|
|
92
|
-
potential_matches += candidates
|
|
93
|
-
# print(target_file)
|
|
94
|
-
|
|
95
|
-
if target_file is None and where in ["all", "dynamic"] and not interactive:
|
|
96
|
-
# src/machineconfig/jobs/scripts/python_scripts/a.py
|
|
97
|
-
if "." in name:
|
|
98
|
-
resolved_names: list[str] = [name]
|
|
99
|
-
else:
|
|
100
|
-
resolved_names = [f"{name}{a_suffix}" for a_suffix in suffixes]
|
|
101
|
-
for a_resolved_name in resolved_names:
|
|
102
|
-
try:
|
|
103
|
-
url = f"""https://raw.githubusercontent.com/thisismygitrepo/machineconfig/refs/heads/main/src/machineconfig/jobs/scripts_dynamic/{a_resolved_name}"""
|
|
104
|
-
print(f"Fetching temporary script from {url} ...")
|
|
105
|
-
import requests
|
|
106
|
-
response = requests.get(url)
|
|
107
|
-
if response.status_code != 200:
|
|
108
|
-
print(f"❌ ERROR: Could not fetch script '{name}.py' from repository. Status Code: {response.status_code}")
|
|
109
|
-
raise RuntimeError(f"Could not fetch script '{name}.py' from repository.")
|
|
110
|
-
script_content = response.text
|
|
111
|
-
target_file = Path.home().joinpath("tmp_results", "tmp_scripts", "python", f"{name}.py")
|
|
112
|
-
target_file.parent.mkdir(parents=True, exist_ok=True)
|
|
113
|
-
target_file.write_text(script_content, encoding="utf-8")
|
|
114
|
-
except Exception as _e:
|
|
115
|
-
pass
|
|
116
|
-
|
|
117
|
-
if target_file is None:
|
|
118
|
-
print(f"❌ ERROR: Could not find script '{name}.py'. Checked {len(potential_matches)} candidate files, trying interactively:")
|
|
119
|
-
from machineconfig.utils.options import choose_from_options
|
|
120
|
-
options = ["/".join(p.parts[-3:]) for p in potential_matches]
|
|
121
|
-
chosen_file_part = choose_from_options(options, multi=False, msg="Select the script to run:", tv=True)
|
|
122
|
-
for an_option, a_path in zip(options, potential_matches):
|
|
123
|
-
if chosen_file_part == an_option:
|
|
124
|
-
target_file = a_path
|
|
125
|
-
break
|
|
126
|
-
assert target_file is not None, "No script selected."
|
|
127
|
-
target_file = Path(target_file)
|
|
128
|
-
|
|
129
|
-
print(f"✅ Found script at: {target_file}")
|
|
130
|
-
if target_file.suffix == ".py":
|
|
131
|
-
from machineconfig.utils.code import get_uv_command_executing_python_script, exit_then_run_shell_script
|
|
132
|
-
script_content = target_file.read_text(encoding="utf-8")
|
|
133
|
-
shell_script, _shell_script_path = get_uv_command_executing_python_script(python_script=script_content, uv_project_dir=None, uv_with=None, prepend_print=False)
|
|
134
|
-
exit_then_run_shell_script(script=shell_script)
|
|
135
|
-
else:
|
|
136
|
-
from machineconfig.utils.code import run_shell_script
|
|
137
|
-
run_shell_script(target_file.read_text(encoding="utf-8"))
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
def copy_script_to_local(name: Annotated[str, typer.Argument(help="Name of the temporary python script to copy, e.g., 'a' for a.py")],
|
|
141
|
-
alias: Annotated[Optional[str], typer.Option("--alias", "-a", help="Whether to create call it a different name locally")] = None
|
|
142
|
-
) -> None:
|
|
143
|
-
"""
|
|
144
|
-
Copy a temporary python script stored in machineconfig/scripts/python/helpers/tmp_py_scripts to the local machine.
|
|
145
|
-
"""
|
|
146
|
-
url = f"""https://raw.githubusercontent.com/thisismygitrepo/machineconfig/refs/heads/main/src/machineconfig/scripts/python/helpers/tmp_py_scripts/{name}.py"""
|
|
147
|
-
import requests
|
|
148
|
-
response = requests.get(url)
|
|
149
|
-
if response.status_code != 200:
|
|
150
|
-
print(f"❌ ERROR: Could not fetch script '{name}.py' from repository. Status Code: {response.status_code}")
|
|
151
|
-
raise RuntimeError(f"Could not fetch script '{name}.py' from repository.")
|
|
152
|
-
script_content = response.text
|
|
153
|
-
from machineconfig.utils.source_of_truth import CONFIG_ROOT
|
|
154
|
-
local_path = CONFIG_ROOT.joinpath(f"scripts_python/{alias or name}.py")
|
|
155
|
-
with open(local_path, "w") as f:
|
|
156
|
-
f.write(script_content)
|
|
157
|
-
print(f"✅ Script '{name}.py' has been copied to '{local_path}'.")
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
def get_app():
|
|
161
|
-
app = typer.Typer(
|
|
162
|
-
name="run-tmp-script",
|
|
163
|
-
help="Helper to run temporary python scripts stored in machineconfig/scripts/python/helpers/tmp_py_scripts",
|
|
164
|
-
no_args_is_help=True,
|
|
165
|
-
)
|
|
166
|
-
from machineconfig.jobs.scripts_dynamic import a
|
|
167
|
-
app.command()(a.main)
|
|
168
|
-
return app
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Helper modules for the devops navigator TUI application.
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
from machineconfig.scripts.python.helpers_navigator.data_models import CommandInfo, ArgumentInfo
|
|
6
|
-
from machineconfig.scripts.python.helpers_navigator.command_builder import CommandBuilderScreen
|
|
7
|
-
from machineconfig.scripts.python.helpers_navigator.command_tree import CommandTree
|
|
8
|
-
from machineconfig.scripts.python.helpers_navigator.command_detail import CommandDetail
|
|
9
|
-
from machineconfig.scripts.python.helpers_navigator.search_bar import SearchBar
|
|
10
|
-
from machineconfig.scripts.python.helpers_navigator.main_app import CommandNavigatorApp
|
|
11
|
-
|
|
12
|
-
__all__ = [
|
|
13
|
-
"CommandInfo",
|
|
14
|
-
"ArgumentInfo",
|
|
15
|
-
"CommandBuilderScreen",
|
|
16
|
-
"CommandTree",
|
|
17
|
-
"CommandDetail",
|
|
18
|
-
"SearchBar",
|
|
19
|
-
"CommandNavigatorApp",
|
|
20
|
-
]
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Command detail widget for displaying command information.
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
from typing import Optional
|
|
6
|
-
from textual.widgets import Static
|
|
7
|
-
from rich.panel import Panel
|
|
8
|
-
from rich.text import Text
|
|
9
|
-
from machineconfig.scripts.python.helpers_navigator.data_models import CommandInfo
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class CommandDetail(Static):
|
|
13
|
-
"""Widget for displaying command details."""
|
|
14
|
-
|
|
15
|
-
def __init__(self, *, id: str) -> None: # type: ignore
|
|
16
|
-
super().__init__(id=id)
|
|
17
|
-
self.command_info: Optional[CommandInfo] = None
|
|
18
|
-
|
|
19
|
-
def update_command(self, command_info: Optional[CommandInfo]) -> None:
|
|
20
|
-
"""Update displayed command information."""
|
|
21
|
-
self.command_info = command_info
|
|
22
|
-
if command_info is None:
|
|
23
|
-
self.update("Select a command to view details")
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
content = Text()
|
|
27
|
-
content.append(f"{'🗂️ Group' if command_info.is_group else '⚡ Command'}: ", style="bold cyan")
|
|
28
|
-
content.append(f"{command_info.name}\n\n", style="bold yellow")
|
|
29
|
-
|
|
30
|
-
content.append("Description: ", style="bold green")
|
|
31
|
-
content.append(f"{command_info.description}\n\n", style="white")
|
|
32
|
-
|
|
33
|
-
content.append("Command: ", style="bold blue")
|
|
34
|
-
content.append(f"{command_info.command}\n\n", style="bold white")
|
|
35
|
-
|
|
36
|
-
if command_info.help_text:
|
|
37
|
-
content.append("Usage: ", style="bold magenta")
|
|
38
|
-
content.append(f"{command_info.help_text}\n\n", style="white")
|
|
39
|
-
|
|
40
|
-
if command_info.module_path:
|
|
41
|
-
content.append("Module: ", style="bold red")
|
|
42
|
-
content.append(f"{command_info.module_path}\n", style="white")
|
|
43
|
-
|
|
44
|
-
self.update(Panel(content, title=f"[bold]{command_info.name}[/bold]", border_style="blue"))
|