machineconfig 7.64__py3-none-any.whl → 7.83__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.

Files changed (104) hide show
  1. machineconfig/cluster/sessions_managers/utils/maker.py +4 -2
  2. machineconfig/jobs/installer/custom/yazi.py +120 -0
  3. machineconfig/jobs/installer/custom_dev/nerdfont.py +1 -1
  4. machineconfig/jobs/installer/custom_dev/nerfont_windows_helper.py +26 -12
  5. machineconfig/jobs/installer/custom_dev/sysabc.py +26 -5
  6. machineconfig/jobs/installer/installer_data.json +232 -96
  7. machineconfig/jobs/installer/powershell_scripts/install_fonts.ps1 +129 -34
  8. machineconfig/profile/create_helper.py +0 -12
  9. machineconfig/profile/create_links_export.py +2 -2
  10. machineconfig/profile/mapper.toml +2 -2
  11. machineconfig/scripts/__init__.py +0 -4
  12. machineconfig/scripts/python/agents.py +22 -17
  13. machineconfig/scripts/python/ai/solutions/copilot/instructions/python/dev.instructions.md +4 -0
  14. machineconfig/scripts/python/croshell.py +22 -17
  15. machineconfig/scripts/python/devops.py +1 -1
  16. machineconfig/scripts/python/devops_navigator.py +0 -4
  17. machineconfig/scripts/python/env_manager/env_manager_tui.py +204 -0
  18. machineconfig/scripts/python/env_manager/path_manager_tui.py +1 -1
  19. machineconfig/scripts/python/fire_jobs.py +13 -13
  20. machineconfig/scripts/python/ftpx.py +36 -12
  21. machineconfig/scripts/python/helpers/ast_search.py +74 -0
  22. machineconfig/scripts/python/helpers/qr_code.py +166 -0
  23. machineconfig/scripts/python/helpers/repo_rag.py +325 -0
  24. machineconfig/scripts/python/helpers/symantic_search.py +25 -0
  25. machineconfig/scripts/python/helpers_cloud/cloud_copy.py +28 -21
  26. machineconfig/scripts/python/helpers_cloud/cloud_helpers.py +1 -1
  27. machineconfig/scripts/python/helpers_cloud/cloud_mount.py +19 -17
  28. machineconfig/scripts/python/helpers_cloud/cloud_sync.py +8 -7
  29. machineconfig/scripts/python/helpers_croshell/start_slidev.py +6 -7
  30. machineconfig/scripts/python/helpers_devops/cli_config.py +10 -0
  31. machineconfig/scripts/python/helpers_devops/cli_nw.py +90 -10
  32. machineconfig/scripts/python/helpers_devops/cli_self.py +8 -7
  33. machineconfig/scripts/python/helpers_devops/cli_share_file.py +7 -7
  34. machineconfig/scripts/python/helpers_devops/cli_share_server.py +12 -11
  35. machineconfig/scripts/python/helpers_devops/cli_terminal.py +8 -10
  36. machineconfig/scripts/python/helpers_devops/cli_utils.py +2 -1
  37. machineconfig/scripts/python/helpers_devops/devops_status.py +7 -19
  38. machineconfig/scripts/python/helpers_fire_command/fire_jobs_route_helper.py +20 -9
  39. machineconfig/scripts/python/helpers_msearch/scripts_linux/fzfg +2 -2
  40. machineconfig/scripts/python/helpers_msearch/scripts_windows/fzfg.ps1 +58 -1
  41. machineconfig/scripts/python/helpers_navigator/command_tree.py +50 -18
  42. machineconfig/scripts/python/helpers_repos/cloud_repo_sync.py +5 -3
  43. machineconfig/scripts/python/helpers_repos/count_lines.py +40 -11
  44. machineconfig/scripts/python/helpers_repos/count_lines_frontend.py +1 -1
  45. machineconfig/scripts/python/helpers_utils/download.py +4 -3
  46. machineconfig/scripts/python/helpers_utils/path.py +87 -34
  47. machineconfig/scripts/python/interactive.py +1 -1
  48. machineconfig/scripts/python/{machineconfig.py → mcfg_entry.py} +4 -0
  49. machineconfig/scripts/python/msearch.py +55 -6
  50. machineconfig/scripts/python/nw/address.py +132 -0
  51. machineconfig/scripts/python/nw/devops_add_ssh_key.py +8 -5
  52. machineconfig/scripts/python/terminal.py +2 -2
  53. machineconfig/scripts/python/utils.py +12 -11
  54. machineconfig/scripts/windows/mounts/mount_ssh.ps1 +1 -1
  55. machineconfig/settings/lf/windows/lfcd.ps1 +1 -1
  56. machineconfig/settings/shells/nushell/config.nu +2 -2
  57. machineconfig/settings/shells/nushell/env.nu +45 -6
  58. machineconfig/settings/shells/nushell/init.nu +282 -95
  59. machineconfig/settings/shells/pwsh/init.ps1 +1 -0
  60. machineconfig/settings/yazi/init.lua +4 -0
  61. machineconfig/settings/yazi/keymap_linux.toml +11 -4
  62. machineconfig/settings/yazi/theme.toml +4 -0
  63. machineconfig/settings/yazi/yazi_linux.toml +84 -0
  64. machineconfig/settings/yazi/yazi_windows.toml +58 -0
  65. machineconfig/setup_linux/web_shortcuts/interactive.sh +10 -10
  66. machineconfig/setup_windows/uv.ps1 +8 -1
  67. machineconfig/setup_windows/web_shortcuts/interactive.ps1 +10 -10
  68. machineconfig/setup_windows/web_shortcuts/quick_init.ps1 +3 -2
  69. machineconfig/utils/accessories.py +7 -4
  70. machineconfig/utils/code.py +4 -2
  71. machineconfig/utils/installer_utils/github_release_bulk.py +104 -62
  72. machineconfig/utils/installer_utils/install_from_url.py +200 -0
  73. machineconfig/utils/installer_utils/installer_class.py +25 -74
  74. machineconfig/utils/installer_utils/installer_cli.py +40 -50
  75. machineconfig/utils/installer_utils/installer_helper.py +100 -0
  76. machineconfig/utils/installer_utils/installer_runner.py +5 -8
  77. machineconfig/utils/links.py +2 -2
  78. machineconfig/utils/meta.py +2 -2
  79. machineconfig/utils/options.py +3 -3
  80. machineconfig/utils/path_extended.py +1 -1
  81. machineconfig/utils/path_helper.py +0 -1
  82. machineconfig/utils/ssh.py +143 -409
  83. machineconfig/utils/ssh_utils/abc.py +8 -0
  84. machineconfig/utils/ssh_utils/copy_from_here.py +110 -0
  85. machineconfig/utils/ssh_utils/copy_to_here.py +302 -0
  86. machineconfig/utils/ssh_utils/utils.py +141 -0
  87. machineconfig/utils/ssh_utils/wsl.py +210 -0
  88. machineconfig/utils/upgrade_packages.py +2 -1
  89. machineconfig/utils/ve.py +11 -4
  90. {machineconfig-7.64.dist-info → machineconfig-7.83.dist-info}/METADATA +2 -2
  91. {machineconfig-7.64.dist-info → machineconfig-7.83.dist-info}/RECORD +96 -89
  92. {machineconfig-7.64.dist-info → machineconfig-7.83.dist-info}/entry_points.txt +2 -2
  93. machineconfig/scripts/python/explore.py +0 -49
  94. machineconfig/scripts/python/helpers_msearch/scripts_linux/fzfag +0 -17
  95. machineconfig/scripts/python/helpers_msearch/scripts_linux/fzfrga +0 -21
  96. machineconfig/scripts/python/helpers_msearch/scripts_linux/skrg +0 -4
  97. machineconfig/scripts/python/helpers_msearch/scripts_windows/fzfb.ps1 +0 -3
  98. machineconfig/scripts/python/helpers_msearch/scripts_windows/fzfrga.bat +0 -20
  99. machineconfig/settings/yazi/yazi.toml +0 -17
  100. machineconfig/setup_linux/others/cli_installation.sh +0 -137
  101. /machineconfig/{settings/shells/pwsh/profile.ps1 → scripts/python/helpers_fire_command/f.py} +0 -0
  102. /machineconfig/scripts/{Restore-ThunderbirdProfile.ps1 → windows/mounts/Restore-ThunderbirdProfile.ps1} +0 -0
  103. {machineconfig-7.64.dist-info → machineconfig-7.83.dist-info}/WHEEL +0 -0
  104. {machineconfig-7.64.dist-info → machineconfig-7.83.dist-info}/top_level.txt +0 -0
@@ -7,9 +7,11 @@ from pathlib import Path
7
7
  def get_fire_tab_using_uv(func: FunctionType, tab_weight: int, import_module: bool, uv_with: Optional[list[str]], uv_project_dir: Optional[str]) -> tuple[TabConfig, Path]:
8
8
  from machineconfig.utils.meta import lambda_to_python_script
9
9
  if func.__name__ == "<lambda>":
10
- py_script = lambda_to_python_script(lmb=func, in_global=True, import_module=import_module)
10
+ py_script = lambda_to_python_script(func,
11
+ in_global=True, import_module=import_module)
11
12
  else:
12
- py_script = lambda_to_python_script(lmb=lambda: func(), in_global=True, import_module=import_module)
13
+ py_script = lambda_to_python_script(lambda: func(),
14
+ in_global=True, import_module=import_module)
13
15
  from machineconfig.utils.code import get_uv_command_executing_python_script
14
16
  command_to_run, py_script_path = get_uv_command_executing_python_script(python_script=py_script, uv_with=uv_with, uv_project_dir=uv_project_dir)
15
17
  tab_config: TabConfig = {
@@ -0,0 +1,120 @@
1
+
2
+ from typing import Optional
3
+ import platform
4
+ from machineconfig.utils.installer_utils.installer_class import Installer
5
+ from machineconfig.utils.schemas.installer.installer_types import InstallerData
6
+
7
+
8
+ installer_standard: InstallerData = {
9
+ "appName": "yazi",
10
+ "repoURL": "https://github.com/sxyazi/yazi",
11
+ "doc": "⚡ Blazing Fast Terminal File Manager.",
12
+ "fileNamePattern": {
13
+ "amd64": {
14
+ "linux": "yazi-x86_64-unknown-linux-musl.zip",
15
+ "macos": "yazi-x86_64-apple-darwin.zip",
16
+ "windows": "yazi-x86_64-pc-windows-msvc.zip"
17
+ },
18
+ "arm64": {
19
+ "linux": "yazi-aarch64-unknown-linux-musl.zip",
20
+ "macos": "yazi-aarch64-apple-darwin.zip",
21
+ "windows": "yazi-aarch64-pc-windows-msvc.zip"
22
+ }
23
+ }
24
+ }
25
+
26
+ def main(installer_data: InstallerData, version: Optional[str]):
27
+ _ = installer_data
28
+ inst = Installer(installer_data=installer_standard)
29
+ inst.install(version=version)
30
+
31
+ print("\n" * 5)
32
+ print("Installing Yazi plugins and flavors...")
33
+ installer_standard["appName"] = "ya"
34
+ inst = Installer(installer_data=installer_standard)
35
+ inst.install(version=version)
36
+
37
+ print("\n" * 5)
38
+ print("Cloning Yazi plugins and flavors repositories...")
39
+
40
+ from pathlib import Path
41
+ system_name = platform.system().lower()
42
+ home_dir = Path.home()
43
+ if system_name == "windows":
44
+ yazi_plugins_dir = home_dir.joinpath("AppData", "Roaming", "yazi", "config")
45
+ else:
46
+ yazi_plugins_dir = home_dir.joinpath(".config", "yazi")
47
+
48
+ yazi_plugins_path = yazi_plugins_dir.joinpath("plugins")
49
+ yazi_flavours_path = yazi_plugins_dir.joinpath("flavors")
50
+ if yazi_plugins_path.exists():
51
+ if yazi_plugins_path.is_file():
52
+ yazi_plugins_path.unlink()
53
+ elif yazi_plugins_path.is_dir():
54
+ import shutil
55
+ shutil.rmtree(yazi_plugins_path)
56
+ yazi_plugins_dir.mkdir(parents=True, exist_ok=True)
57
+ import git
58
+ git.Repo.clone_from("https://github.com/yazi-rs/plugins", yazi_plugins_path)
59
+ if yazi_flavours_path.exists():
60
+ if yazi_flavours_path.is_file():
61
+ yazi_flavours_path.unlink()
62
+ elif yazi_flavours_path.is_dir():
63
+ import shutil
64
+ shutil.rmtree(yazi_flavours_path)
65
+ yazi_plugins_dir.mkdir(parents=True, exist_ok=True)
66
+ import git
67
+ git.Repo.clone_from("https://github.com/yazi-rs/flavors", yazi_flavours_path)
68
+
69
+ # previewers:
70
+ if platform.system() == "Linux":
71
+ script = r"""
72
+ sudo nala install poppler-utils -y || true # For PDF preview, needed by yazi.
73
+ """
74
+ from machineconfig.utils.code import run_shell_script
75
+ run_shell_script(script)
76
+ elif platform.system() == "Darwin":
77
+ script = r"""
78
+ brew install --upgrade poppler || true # For PDF preview, needed by yazi.
79
+ """
80
+ from machineconfig.utils.code import run_shell_script
81
+ run_shell_script(script)
82
+ elif platform.system() == "Windows":
83
+ popler_installer: InstallerData = {
84
+ "appName": "poppler",
85
+ "repoURL": "https://github.com/oschwartz10612/poppler-windows",
86
+ "doc": "PDF rendering library - Windows builds.",
87
+ "fileNamePattern": {
88
+ "amd64": {
89
+ "windows": "Release-{version}.zip",
90
+ "linux": None,
91
+ "macos": None,
92
+ },
93
+ "arm64": {
94
+ "windows": None,
95
+ "linux": None,
96
+ "macos": None,
97
+ }
98
+ }
99
+ }
100
+ inst_poppler = Installer(installer_data=popler_installer)
101
+ inst_poppler.install(version=None)
102
+
103
+ # assuming ouch is already installed
104
+ script = """
105
+ ya pkg add ndtoan96/ouch # make ouch default previewer in yazi for compressed files
106
+ ya pkg add AnirudhG07/rich-preview # rich-cli based previewer for yazi
107
+ ya pack -a stelcodes/bunny
108
+ ya pkg add 'Tyarel8/goto-drives'
109
+ ya pkg add uhs-robert/sshfs
110
+ ya pkg add boydaihungst/file-extra-metadata
111
+ ya pkg add wylie102/duckdb
112
+
113
+
114
+ """
115
+ from machineconfig.utils.code import run_shell_script
116
+ run_shell_script(script)
117
+
118
+
119
+ if __name__ == "__main__":
120
+ pass
@@ -108,4 +108,4 @@ def main(installer_data: InstallerData, version: Optional[str]) -> None:
108
108
 
109
109
 
110
110
  if __name__ == "__main__":
111
- pass
111
+ main(1, None) # type: ignore
@@ -71,22 +71,28 @@ def _list_installed_fonts() -> list[str]:
71
71
 
72
72
 
73
73
  def _missing_required_fonts(installed_fonts: Iterable[str]) -> list[str]:
74
- """Check which required font patterns are missing from installed fonts.
75
-
74
+ """Check which feature fonts are missing from installed fonts.
75
+
76
76
  Args:
77
77
  installed_fonts: List of installed font names
78
-
78
+
79
79
  Returns:
80
- List of missing font patterns
80
+ List of descriptions for missing font groups
81
81
  """
82
- import re
83
82
 
84
- installed_norm = [f.lower().replace(" ", "") for f in installed_fonts]
83
+ def _normalize(name: str) -> str:
84
+ return name.lower().replace(" ", "").replace("_", "")
85
+
86
+ installed_norm = [_normalize(font) for font in installed_fonts]
87
+ requirements: list[tuple[str, str]] = [
88
+ ("cascadiacode", "Cascadia Code family"),
89
+ ("caskaydiacove", "Caskaydia Cove Nerd Font family"),
90
+ ]
91
+
85
92
  missing: list[str] = []
86
- for pattern in ["cascadiacode*"]:
87
- regex = re.compile(pattern)
88
- if not any(regex.search(f) for f in installed_norm):
89
- missing.append(pattern)
93
+ for needle, label in requirements:
94
+ if not any(needle in font for font in installed_norm):
95
+ missing.append(label)
90
96
  return missing
91
97
 
92
98
 
@@ -123,11 +129,15 @@ def install_nerd_fonts() -> None:
123
129
  [p.delete(sure=True) for p in folder.search("*readme*")]
124
130
  [p.delete(sure=True) for p in folder.search("*LICENSE*")]
125
131
 
132
+ print("Fonts to be installed:")
133
+ for font in (folder.search("*.ttf") + folder.search("*.otf")):
134
+ print(f" - {font}")
135
+
126
136
  console.print("⚙️ Installing fonts via PowerShell...")
127
137
  file = PathExtended.tmpfile(suffix=".ps1")
128
138
  file.parent.mkdir(parents=True, exist_ok=True)
129
-
130
- raw_content = LIBRARY_ROOT.joinpath("jobs/installer/pwsh_scripts/install_fonts.ps1").read_text(encoding="utf-8").replace(r".\fonts-to-be-installed", str(folder))
139
+
140
+ raw_content = LIBRARY_ROOT.joinpath("jobs/installer/powershell_scripts/install_fonts.ps1").read_text(encoding="utf-8").replace(r".\fonts-to-be-installed", str(folder))
131
141
  # PowerShell 5.1 can choke on certain unicode chars in some locales; keep ASCII only.
132
142
  content = "".join(ch for ch in raw_content if ord(ch) < 128)
133
143
  file.write_text(content, encoding="utf-8")
@@ -147,3 +157,7 @@ def install_nerd_fonts() -> None:
147
157
  console.print()
148
158
  render_banner("✅ Nerd Fonts installation complete! ✅", "Nerd Fonts Installer", "green", box.DOUBLE)
149
159
  console.print()
160
+
161
+
162
+ if __name__ == "__main__":
163
+ install_nerd_fonts()
@@ -8,7 +8,33 @@ from rich.panel import Panel
8
8
  from machineconfig.utils.schemas.installer.installer_types import InstallerData
9
9
 
10
10
 
11
+ """
12
+ {
13
+ "appName": "Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle",
14
+ "repoURL": "https://github.com/microsoft/winget-cli",
15
+ "doc": "📦 Windows Package Manager CLI",
16
+ "fileNamePattern": {
17
+ "amd64": {
18
+ "linux": null,
19
+ "windows": "Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle",
20
+ "macos": null
21
+ },
22
+ "arm64": {
23
+ "linux": null,
24
+ "windows": "Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle",
25
+ "macos": null
26
+ }
27
+ }
28
+
29
+ """
30
+
11
31
  ps1 = r"""
32
+
33
+ # if windows is missing
34
+ # download latest from cd $HOME/Downloads; d u "https://github.com/microsoft/winget-cli/releases/download/v1.12.170-preview/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
35
+ # this must be run in windows powershell, not in pwsh
36
+ # Add-AppxPackage .\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
37
+
12
38
  winget install --no-upgrade --name "Powershell" --Id "Microsoft.PowerShell" --source winget --scope user --accept-package-agreements --accept-source-agreements # powershell require admin
13
39
  winget install --no-upgrade --name "Windows Terminal" --Id "Microsoft.WindowsTerminal" --source winget --scope user --accept-package-agreements --accept-source-agreements # Terminal is is installed by default on W 11
14
40
  winget install --no-upgrade --name "GNU Nano" --Id "GNU.Nano" --source winget --scope user --accept-package-agreements --accept-source-agreements
@@ -16,7 +42,6 @@ winget install --no-upgrade --name "GNU Nano" --Id "GNU.Nano
16
42
  # --GROUP:dev2:VSRedistrib+VSBuildTools+Codeblocks+GnuWin32: Make+GnuPG+graphviz+WinFsp+SSHFS-win+xming+Node.js+Rustup+Cloudflare+Cloudflare WARP+Microsoft Garage Mouse without Borders
17
43
  # --GROUP:user:nu+Chrome+ChromeRemoteDesktop+Zoom+7zip+Firefox+Thunderbird+StreamlabsOBS+OBSStudio+MiKTeX+TexMaker+notepad+++Lapce+TesseractOCR+perl+DB Browser for SQLite+sql server management studio+Adobe Acrobat Reader DC+julia+Chafa+bottom+onefetch+Just+hyperfine+AWS CLI
18
44
  # Install-Module -Name Terminal-Icons -Repository PSGallery -Force -AcceptLicense -PassThru -Confirm # -RequiredVersion 2.5.10
19
- # Install-Module -Name PSFzf -SkipPublisherCheck # -AcceptLicense -PassThru -Confirm # -RequiredVersion 2.5.10
20
45
 
21
46
  """
22
47
 
@@ -24,10 +49,6 @@ zsh = r"""
24
49
  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
25
50
  echo "🔄 Updating Homebrew..."
26
51
  brew update || true
27
- echo "📥 Installing essential tools..."
28
- echo "📥 Installing Git version control..."
29
- echo "📥 Installing Nano text editor..."
30
- echo "📥 Installing Node Version Manager (NVM)..."
31
52
  # Note: git and nano are pre-installed on macOS, but we install via Homebrew to ensure latest versions
32
53
  # brew install git || true
33
54
  # brew install nano || true