machineconfig 7.51__py3-none-any.whl → 7.52__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 (54) hide show
  1. machineconfig/jobs/installer/custom_dev/brave.py +1 -1
  2. machineconfig/jobs/installer/custom_dev/code.py +4 -1
  3. machineconfig/jobs/installer/custom_dev/nerfont_windows_helper.py +0 -9
  4. machineconfig/jobs/installer/custom_dev/sysabc.py +140 -0
  5. machineconfig/jobs/installer/custom_dev/wezterm.py +2 -15
  6. machineconfig/jobs/installer/installer_data.json +689 -9
  7. machineconfig/jobs/installer/linux_scripts/redis.sh +1 -0
  8. machineconfig/jobs/installer/package_groups.py +23 -72
  9. machineconfig/logger.py +0 -1
  10. machineconfig/profile/create_links_export.py +2 -2
  11. machineconfig/profile/mapper.toml +1 -4
  12. machineconfig/scripts/python/croshell.py +20 -43
  13. machineconfig/scripts/python/devops.py +1 -1
  14. machineconfig/scripts/python/env_manager/path_manager_tui.py +1 -1
  15. machineconfig/scripts/python/fire_jobs.py +52 -39
  16. machineconfig/scripts/python/helpers_croshell/crosh.py +1 -1
  17. machineconfig/scripts/python/helpers_devops/cli_config.py +3 -19
  18. machineconfig/scripts/python/helpers_devops/cli_self.py +12 -6
  19. machineconfig/scripts/python/helpers_devops/cli_utils.py +1 -80
  20. machineconfig/scripts/python/helpers_fire_command/file_wrangler.py +0 -17
  21. machineconfig/scripts/python/helpers_msearch/scripts_linux/fzfg +1 -1
  22. machineconfig/scripts/python/helpers_repos/clone.py +0 -1
  23. machineconfig/scripts/python/helpers_repos/cloud_repo_sync.py +1 -1
  24. machineconfig/scripts/python/helpers_repos/count_lines_frontend.py +1 -1
  25. machineconfig/scripts/python/helpers_sessions/sessions_multiprocess.py +2 -2
  26. machineconfig/scripts/python/helpers_utils/path.py +106 -0
  27. machineconfig/scripts/python/interactive.py +9 -15
  28. machineconfig/scripts/python/sessions.py +2 -2
  29. machineconfig/scripts/python/utils.py +7 -3
  30. machineconfig/scripts/windows/mounts/mount_ssh.ps1 +1 -1
  31. machineconfig/setup_linux/__init__.py +0 -1
  32. machineconfig/setup_linux/web_shortcuts/interactive.sh +11 -10
  33. machineconfig/setup_mac/__init__.py +2 -3
  34. machineconfig/setup_windows/__init__.py +0 -3
  35. machineconfig/setup_windows/web_shortcuts/interactive.ps1 +11 -10
  36. machineconfig/setup_windows/web_shortcuts/quick_init.ps1 +15 -0
  37. machineconfig/utils/installer.py +11 -27
  38. machineconfig/utils/installer_utils/installer.py +9 -50
  39. machineconfig/utils/installer_utils/installer_abc.py +0 -68
  40. machineconfig/utils/io.py +0 -1
  41. machineconfig/utils/path_helper.py +57 -6
  42. machineconfig/utils/ssh.py +3 -3
  43. {machineconfig-7.51.dist-info → machineconfig-7.52.dist-info}/METADATA +5 -3
  44. {machineconfig-7.51.dist-info → machineconfig-7.52.dist-info}/RECORD +49 -51
  45. machineconfig/jobs/installer/linux_scripts/timescaledb.sh +0 -71
  46. machineconfig/jobs/installer/powershell_scripts/archive_pygraphviz.ps1 +0 -12
  47. machineconfig/setup_linux/apps.sh +0 -66
  48. machineconfig/setup_mac/apps.sh +0 -73
  49. machineconfig/setup_windows/apps.ps1 +0 -62
  50. /machineconfig/{jobs/installer/powershell_scripts → setup_windows/ssh}/openssh-server_add_key.ps1 +0 -0
  51. /machineconfig/{jobs/installer/powershell_scripts → setup_windows/ssh}/openssh-server_copy-ssh-id.ps1 +0 -0
  52. {machineconfig-7.51.dist-info → machineconfig-7.52.dist-info}/WHEEL +0 -0
  53. {machineconfig-7.51.dist-info → machineconfig-7.52.dist-info}/entry_points.txt +0 -0
  54. {machineconfig-7.51.dist-info → machineconfig-7.52.dist-info}/top_level.txt +0 -0
@@ -9,7 +9,9 @@ def copy_both_assets():
9
9
  create_helper.copy_assets_to_machine(which="settings")
10
10
 
11
11
 
12
- def update(copy_assets: Annotated[bool, typer.Option("--assets-copy/--no-assets-copy", "-a/-na", help="Copy (overwrite) assets to the machine after the update")] = True):
12
+ def update(copy_assets: Annotated[bool, typer.Option("--assets-copy/--no-assets-copy", "-a/-na", help="Copy (overwrite) assets to the machine after the update")] = True,
13
+ link_public_configs: Annotated[bool, typer.Option("--link-public-configs/--no-link-public-configs", "-b/-nb", help="Link public configs after update (overwrites your configs!)")] = False,
14
+ ):
13
15
  """🔄 UPDATE uv and machineconfig"""
14
16
  from pathlib import Path
15
17
  if Path.home().joinpath("code", "machineconfig").exists():
@@ -34,8 +36,12 @@ uv tool install --upgrade machineconfig
34
36
  else:
35
37
  from machineconfig.utils.code import run_shell_script
36
38
  run_shell_script(shell_script)
37
- if copy_assets:
38
- copy_both_assets()
39
+ if copy_assets:
40
+ copy_both_assets()
41
+ if link_public_configs:
42
+ import machineconfig.profile.create_links_export as create_links_export
43
+ create_links_export.main_public_from_parser(method="copy", on_conflict="overwrite-default-path", which="all", interactive=False)
44
+
39
45
 
40
46
  def install(no_copy_assets: Annotated[bool, typer.Option("--no-assets-copy", "-na", help="Copy (overwrite) assets to the machine after the update")] = False):
41
47
  """📋 CLONE machienconfig locally and incorporate to shell profile for faster execution and nightly updates."""
@@ -46,9 +52,9 @@ def install(no_copy_assets: Annotated[bool, typer.Option("--no-assets-copy", "-n
46
52
  else:
47
53
  import platform
48
54
  if platform.system() == "Windows":
49
- run_shell_script(r"""& "$HOME\.local\bin\uv.exe" tool install --upgrade "machineconfig>=7.51" """)
55
+ run_shell_script(r"""& "$HOME\.local\bin\uv.exe" tool install --upgrade "machineconfig>=7.52" """)
50
56
  else:
51
- run_shell_script("""$HOME/.local/bin/uv tool install --upgrade "machineconfig>=7.51" """)
57
+ run_shell_script("""$HOME/.local/bin/uv tool install --upgrade "machineconfig>=7.52" """)
52
58
  from machineconfig.profile.create_shell_profile import create_default_shell_profile
53
59
  if not no_copy_assets:
54
60
  create_default_shell_profile() # involves copying assets too
@@ -73,7 +79,7 @@ def navigate():
73
79
  path = Path(navigator.__file__).resolve().parent.joinpath("devops_navigator.py")
74
80
  from machineconfig.utils.code import run_shell_script
75
81
  if Path.home().joinpath("code/machineconfig").exists(): executable = f"""--project "{str(Path.home().joinpath("code/machineconfig"))}" --with textual"""
76
- else: executable = """--with "machineconfig>=7.51,textual" """
82
+ else: executable = """--with "machineconfig>=7.52,textual" """
77
83
  run_shell_script(f"""uv run {executable} {path}""")
78
84
 
79
85
 
@@ -1,7 +1,7 @@
1
1
 
2
2
 
3
3
  import typer
4
- from typing import Annotated, Literal, Optional, TypedDict
4
+ from typing import Annotated, Optional
5
5
  from pathlib import Path
6
6
 
7
7
  def download(
@@ -165,82 +165,3 @@ def compress_pdf(
165
165
  uv_command, _py_file = get_uv_command_executing_python_script(python_script=code, uv_with=["pymupdf"], uv_project_dir=None)
166
166
  run_shell_script(uv_command)
167
167
 
168
-
169
- class MachineSpecs(TypedDict):
170
- system: str
171
- distro: str
172
- home_dir: str
173
- def get_machine_specs() -> MachineSpecs:
174
- """Write print and return the local machine specs."""
175
- import platform
176
- UV_RUN_CMD = "$HOME/.local/bin/uv run" if platform.system() != "Windows" else """& "$env:USERPROFILE/.local/bin/uv" run"""
177
- command = f"""{UV_RUN_CMD} --with distro python -c "import distro; print(distro.name(pretty=True))" """
178
- import subprocess
179
- distro = subprocess.run(command, shell=True, capture_output=True, text=True).stdout.strip()
180
- specs: MachineSpecs = {
181
- "system": platform.system(),
182
- "distro": distro,
183
- "home_dir": str(Path.home()),
184
- }
185
- print(specs)
186
- from machineconfig.utils.source_of_truth import CONFIG_ROOT
187
- path = CONFIG_ROOT.joinpath("machine_specs.json")
188
- CONFIG_ROOT.mkdir(parents=True, exist_ok=True)
189
- import json
190
- path.write_text(json.dumps(specs, indent=4), encoding="utf-8")
191
- return specs
192
-
193
-
194
- def init_project(python: Annotated[Literal["3.13", "3.14"], typer.Option("--python", "-p", help="Python version for the uv virtual environment.")]= "3.13") -> None:
195
- _ = python
196
- repo_root = Path.cwd()
197
- if not (repo_root / "pyproject.toml").exists():
198
- typer.echo("❌ Error: pyproject.toml not found.", err=True)
199
- raise typer.Exit(code=1)
200
- print("Adding group `plot` with common data science and plotting packages...")
201
- script = """
202
- uv add --group plot \
203
- # Data & computation
204
- numpy pandas polars duckdb-engine python-magic \
205
- # Plotting / visualization
206
- matplotlib plotly kaleido \
207
- # Notebooks / interactive
208
- ipython ipykernel jupyterlab nbformat marimo \
209
- # Code analysis / type checking / linting
210
- mypy pyright ruff pylint pyrefly \
211
- # Packaging / build / dev
212
- cleanpy \
213
- # CLI / debugging / utilities
214
- ipdb pudb \
215
- # Type hints for packages
216
- types-python-dateutil types-pyyaml types-requests types-tqdm \
217
- types-mysqlclient types-paramiko types-pytz types-sqlalchemy types-toml types-urllib3 \
218
-
219
- """
220
- from machineconfig.utils.code import run_shell_script
221
- run_shell_script(script)
222
-
223
-
224
- def edit(path: Annotated[Optional[str], typer.Argument(..., help="The root directory of the project to edit, or a file path.")] = None) -> None:
225
- if path is None:
226
- root_path = Path.cwd()
227
- print(f"No path provided. Using current working directory: {root_path}")
228
- else:
229
- root_path = Path(path).expanduser().resolve()
230
- print(f"Using provided path: {root_path}")
231
- from machineconfig.utils.accessories import get_repo_root
232
- repo_root = get_repo_root(root_path)
233
- if repo_root is not None and repo_root.joinpath("pyproject.toml").exists():
234
- code = f"""
235
- cd {repo_root}
236
- uv add --dev pylsp-mypy python-lsp-server[all] pyright ruff-lsp # for helix editor.
237
- source ./.venv/bin/activate
238
- """
239
- else:
240
- code = ""
241
- if root_path.is_file():
242
- code += f"hx {root_path}"
243
- else:
244
- code += "hx"
245
- from machineconfig.utils.code import exit_then_run_shell_script
246
- exit_then_run_shell_script(code)
@@ -4,23 +4,6 @@ from machineconfig.utils.path_extended import PathExtended
4
4
  import platform
5
5
 
6
6
 
7
- def search_for_files_of_interest(path_obj: PathExtended):
8
- if path_obj.joinpath(".venv").exists():
9
- path_objects = path_obj.search("*", not_in=[".venv"])
10
- files: list[PathExtended] = []
11
- for a_path_obj in path_objects:
12
- files += search_for_files_of_interest(path_obj=a_path_obj)
13
- return files
14
- if path_obj.is_file():
15
- return [path_obj]
16
- py_files = path_obj.search(pattern="*.py", not_in=["__init__.py"], r=True)
17
- ps_files = path_obj.search(pattern="*.ps1", r=True)
18
- sh_files = path_obj.search(pattern="*.sh", r=True)
19
- files = py_files + ps_files + sh_files
20
- return files
21
-
22
-
23
-
24
7
  def parse_pyfile(file_path: str):
25
8
  print(f"🔍 Loading {file_path} ...")
26
9
  from typing import NamedTuple
@@ -19,5 +19,5 @@ IFS=: read -ra selected < <(
19
19
  --preview 'bat --color=always {1} --highlight-line {2}' \
20
20
  --preview-window 'up,60%,border-bottom,+{2}+3/3,~3'
21
21
  )
22
- [ -n "${selected[0]}" ] && hx "${selected[0]}" "+${selected[1]}
22
+ [ -n "${selected[0]}" ] && hx "${selected[0]}:${selected[1]}:${selected[2]}"
23
23
  "
@@ -1,4 +1,3 @@
1
- from __future__ import annotations
2
1
 
3
2
  from pathlib import Path
4
3
  from typing import Literal, Optional, cast
@@ -99,7 +99,7 @@ git pull originEnc master
99
99
  uv_project_dir = f"""{str(Path.home().joinpath("code/machineconfig"))}"""
100
100
  uv_with = None
101
101
  else:
102
- uv_with = ["machineconfig>=7.51"]
102
+ uv_with = ["machineconfig>=7.52"]
103
103
  uv_project_dir = None
104
104
 
105
105
  import tempfile
@@ -8,7 +8,7 @@ def analyze_repo_development(repo_path: Annotated[str, typer.Argument(..., help=
8
8
  from pathlib import Path
9
9
  count_lines_path = Path(count_lines.__file__)
10
10
  # --project $HOME/code/ machineconfig --group plot
11
- cmd = f"""uv run --python 3.14 --with "machineconfig[plot]>=7.51" {count_lines_path} analyze-over-time {repo_path}"""
11
+ cmd = f"""uv run --python 3.14 --with "machineconfig[plot]>=7.52" {count_lines_path} analyze-over-time {repo_path}"""
12
12
  from machineconfig.utils.code import run_shell_script
13
13
  run_shell_script(cmd)
14
14
 
@@ -21,9 +21,9 @@ def create_from_function(
21
21
  suffixes = {".py"}
22
22
  choice_file = match_file_name(sub_string=path, search_root=PathExtended.cwd(), suffixes=suffixes)
23
23
  elif path_obj.is_dir():
24
- from machineconfig.scripts.python.helpers_fire_command.file_wrangler import search_for_files_of_interest
24
+ from machineconfig.utils.path_helper import search_for_files_of_interest
25
25
  print(f"🔍 Searching recursively for Python, PowerShell and Shell scripts in directory `{path_obj}`")
26
- files = search_for_files_of_interest(path_obj)
26
+ files = search_for_files_of_interest(path_obj, suffixes={".py", ".sh", ".ps1"})
27
27
  print(f"🔍 Got #{len(files)} results.")
28
28
  choice_file = choose_from_options(multi=False, options=files, fzf=True, msg="Choose one option")
29
29
  choice_file = PathExtended(choice_file)
@@ -0,0 +1,106 @@
1
+
2
+
3
+
4
+ import typer
5
+
6
+ from typing import Optional
7
+ from pathlib import Path
8
+ from typing import Annotated, Literal, TypedDict
9
+
10
+
11
+ def path():
12
+ """📚 NAVIGATE PATH variable with TUI"""
13
+ from machineconfig.scripts.python import env_manager as navigator
14
+ from pathlib import Path
15
+ path = Path(navigator.__file__).resolve().parent.joinpath("path_manager_tui.py")
16
+ from machineconfig.utils.code import run_shell_script, get_uv_command_executing_python_script
17
+ uv_with = ["textual"]
18
+ uv_project_dir = None
19
+ if not Path.home().joinpath("code/machineconfig").exists():
20
+ uv_with.append("machineconfig>=7.52")
21
+ else:
22
+ uv_project_dir = str(Path.home().joinpath("code/machineconfig"))
23
+ run_shell_script(get_uv_command_executing_python_script(python_script=path.read_text(encoding="utf-8"), uv_with=uv_with, uv_project_dir=uv_project_dir)[0])
24
+
25
+
26
+ def init_project(python: Annotated[Literal["3.13", "3.14"], typer.Option("--python", "-p", help="Python version for the uv virtual environment.")]= "3.13") -> None:
27
+ _ = python
28
+ repo_root = Path.cwd()
29
+ if not (repo_root / "pyproject.toml").exists():
30
+ typer.echo("❌ Error: pyproject.toml not found.", err=True)
31
+ raise typer.Exit(code=1)
32
+ print("Adding group `plot` with common data science and plotting packages...")
33
+ script = """
34
+ uv add --group plot \
35
+ # Data & computation
36
+ numpy pandas polars duckdb-engine python-magic \
37
+ # Plotting / visualization
38
+ matplotlib plotly kaleido \
39
+ # Notebooks / interactive
40
+ ipython ipykernel jupyterlab nbformat marimo \
41
+ # Code analysis / type checking / linting
42
+ mypy pyright ruff pylint pyrefly \
43
+ # Packaging / build / dev
44
+ cleanpy \
45
+ # CLI / debugging / utilities
46
+ ipdb pudb \
47
+ # Type hints for packages
48
+ types-python-dateutil types-pyyaml types-requests types-tqdm \
49
+ types-mysqlclient types-paramiko types-pytz types-sqlalchemy types-toml types-urllib3 \
50
+
51
+ """
52
+ from machineconfig.utils.code import run_shell_script
53
+ run_shell_script(script)
54
+
55
+
56
+ def edit_file_with_hx(path: Annotated[Optional[str], typer.Argument(..., help="The root directory of the project to edit, or a file path.")] = None) -> None:
57
+ if path is None:
58
+ root_path = Path.cwd()
59
+ print(f"No path provided. Using current working directory: {root_path}")
60
+ else:
61
+ root_path = Path(path).expanduser().resolve()
62
+ print(f"Using provided path: {root_path}")
63
+ from machineconfig.utils.accessories import get_repo_root
64
+ repo_root = get_repo_root(root_path)
65
+ if repo_root is not None and repo_root.joinpath("pyproject.toml").exists():
66
+ code = f"""
67
+ cd {repo_root}
68
+ uv add --dev pylsp-mypy python-lsp-server[all] pyright ruff-lsp # for helix editor.
69
+ source ./.venv/bin/activate
70
+ """
71
+ else:
72
+ code = ""
73
+ if root_path.is_file():
74
+ code += f"hx {root_path}"
75
+ else:
76
+ code += "hx"
77
+ from machineconfig.utils.code import exit_then_run_shell_script
78
+ exit_then_run_shell_script(code)
79
+
80
+
81
+ class MachineSpecs(TypedDict):
82
+ system: str
83
+ distro: str
84
+ home_dir: str
85
+
86
+
87
+ def get_machine_specs() -> MachineSpecs:
88
+ """Write print and return the local machine specs."""
89
+ import platform
90
+ UV_RUN_CMD = "$HOME/.local/bin/uv run" if platform.system() != "Windows" else """& "$env:USERPROFILE/.local/bin/uv" run"""
91
+ command = f"""{UV_RUN_CMD} --with distro python -c "import distro; print(distro.name(pretty=True))" """
92
+ import subprocess
93
+ distro = subprocess.run(command, shell=True, capture_output=True, text=True).stdout.strip()
94
+ specs: MachineSpecs = {
95
+ "system": platform.system(),
96
+ "distro": distro,
97
+ "home_dir": str(Path.home()),
98
+ }
99
+ print(specs)
100
+ from machineconfig.utils.source_of_truth import CONFIG_ROOT
101
+ path = CONFIG_ROOT.joinpath("machine_specs.json")
102
+ CONFIG_ROOT.mkdir(parents=True, exist_ok=True)
103
+ import json
104
+ path.write_text(json.dumps(specs, indent=4), encoding="utf-8")
105
+ return specs
106
+
@@ -97,25 +97,20 @@ def get_installation_choices() -> list[str]:
97
97
  """Get user choices for installation options."""
98
98
  choices = [
99
99
  Choice(value="install_machineconfig", title="🐍 Install machineconfig.", checked=False),
100
- Choice(value="ESSENTIAL_SYSTEM", title="📥 Install Essential System Packages.", checked=False),
101
- Choice(value="ESSENTIAL", title="⚡ Install CLI apps essentials", checked=False),
102
- Choice(value="DEV_SYSTEM", title="🛠️ Install CLI apps development.", checked=False),
103
- Choice(value="TerminalEyeCandy", title="🎨 Install CLI apps terminal eye candy.", checked=False),
104
- Choice(value="install_ssh_server", title="🔒 Install SSH Server", checked=False),
100
+ Choice(value="sysabc", title="📥 Install Essential System Packages.", checked=False),
101
+ Choice(value="termabc", title="⚡ Install Terminal CLI apps essentials", checked=False),
105
102
  Choice(value="install_shell_profile", title="🐚 Configure Shell Profile.", checked=False),
103
+ Choice(value="install_ssh_server", title="🔒 Install SSH Server", checked=False),
106
104
  Choice(value="retrieve_repositories", title="📚 Retrieve Repositories", checked=False),
107
105
  Choice(value="retrieve_data", title="💾 Retrieve Data.", checked=False),
108
106
  ]
109
- # Add Windows-specific options
110
- if platform.system() == "Windows":
111
- choices.append(Choice(value="install_windows_desktop", title="💻 Install Windows Desktop Apps - Install nerd fonts and set WT config.", checked=False))
112
107
  selected = questionary.checkbox("Select the installation options you want to execute:", choices=choices, show_description=True).ask()
113
108
  return selected or []
114
109
 
115
110
 
116
111
  def execute_installations(selected_options: list[str]) -> None:
117
112
  for maybe_a_group in selected_options:
118
- if maybe_a_group in ("ESSENTIAL", "DEV", "ESSENTIAL_SYSTEM", "DEV_SYSTEM", "TerminalEyeCandy"):
113
+ if maybe_a_group in ("termabc", "sysabc"):
119
114
  console.print(Panel("⚡ [bold bright_yellow]CLI APPLICATIONS[/bold bright_yellow]\n[italic]Command-line tools installation[/italic]", border_style="bright_yellow"))
120
115
  console.print("🔧 Installing CLI applications", style="bold cyan")
121
116
  try:
@@ -152,6 +147,11 @@ Set-Service -Name sshd -StartupType 'Automatic'"""
152
147
  from machineconfig.profile.create_shell_profile import create_default_shell_profile
153
148
  create_default_shell_profile()
154
149
  console.print("✅ Shell profile configured successfully", style="bold green")
150
+ if platform.system() == "Windows":
151
+ from machineconfig.jobs.installer.custom_dev.nerfont_windows_helper import install_nerd_fonts
152
+ install_nerd_fonts()
153
+ from machineconfig.setup_windows.wt_and_pwsh.set_wt_settings import main as set_wt_settings_main
154
+ set_wt_settings_main()
155
155
  except Exception as e:
156
156
  console.print(f"❌ Error configuring shell profile: {e}", style="bold red")
157
157
 
@@ -170,12 +170,6 @@ Set-Service -Name sshd -StartupType 'Automatic'"""
170
170
  except Exception as e:
171
171
  console.print(f"❌ Error retrieving backup data: {e}", style="bold red")
172
172
 
173
- if "install_windows_desktop" in selected_options:
174
- from machineconfig.jobs.installer.custom_dev.nerfont_windows_helper import install_nerd_fonts
175
- install_nerd_fonts()
176
- from machineconfig.setup_windows.wt_and_pwsh.set_wt_settings import main as set_wt_settings_main
177
- set_wt_settings_main()
178
-
179
173
 
180
174
  def main() -> None:
181
175
  display_header()
@@ -51,7 +51,7 @@ def select_layout(layouts_json_file: Path, selected_layouts_names: Optional[list
51
51
 
52
52
  def find_layout_file(layout_path: str, ) -> Path:
53
53
  from machineconfig.utils.path_extended import PathExtended
54
- from machineconfig.scripts.python.helpers_fire_command.file_wrangler import search_for_files_of_interest
54
+ from machineconfig.utils.path_helper import search_for_files_of_interest
55
55
  from machineconfig.utils.options import choose_from_options
56
56
  from machineconfig.utils.path_helper import match_file_name, sanitize_path
57
57
  path_obj = sanitize_path(layout_path)
@@ -59,7 +59,7 @@ def find_layout_file(layout_path: str, ) -> Path:
59
59
  choice_file = match_file_name(sub_string=layout_path, search_root=PathExtended.cwd(), suffixes={".json"})
60
60
  elif path_obj.is_dir():
61
61
  print(f"🔍 Searching recursively for Python, PowerShell and Shell scripts in directory `{path_obj}`")
62
- files = search_for_files_of_interest(path_obj)
62
+ files = search_for_files_of_interest(path_obj, suffixes={".py", ".sh", ".ps1"})
63
63
  print(f"🔍 Got #{len(files)} results.")
64
64
  choice_file = choose_from_options(multi=False, options=files, fzf=True, msg="Choose one option")
65
65
  choice_file = PathExtended(choice_file)
@@ -1,6 +1,7 @@
1
1
 
2
2
 
3
- from machineconfig.scripts.python.helpers_devops.cli_utils import download, merge_pdfs, get_machine_specs, init_project, compress_pdf, edit
3
+ from machineconfig.scripts.python.helpers_devops.cli_utils import download, merge_pdfs, compress_pdf
4
+ from machineconfig.scripts.python.helpers_utils.path import edit_file_with_hx, get_machine_specs, init_project, path
4
5
  import typer
5
6
  from typing import Annotated
6
7
 
@@ -30,6 +31,9 @@ def get_app() -> typer.Typer:
30
31
  app.command(name="kill-process", no_args_is_help=False, help="[k] Choose a process to kill")(kill_process)
31
32
  app.command(name="k", no_args_is_help=False, help="Choose a process to kill", hidden=True)(kill_process)
32
33
 
34
+ app.command("path", no_args_is_help=False, help="📚 [p] NAVIGATE PATH variable with TUI")(path)
35
+ app.command("p", no_args_is_help=False, help="NAVIGATE PATH variable with TUI", hidden=True)(path)
36
+
33
37
  app.command(name="upgrade-packages", no_args_is_help=False, help="[up] Upgrade project dependencies.")(upgrade_packages)
34
38
  app.command(name="up", no_args_is_help=False, hidden=True)(upgrade_packages)
35
39
 
@@ -39,8 +43,8 @@ def get_app() -> typer.Typer:
39
43
  app.command(name="g", no_args_is_help=False, hidden=True)(get_machine_specs)
40
44
  app.command(name="init-project", no_args_is_help=False, help="[i] Initialize a project with a uv virtual environment and install dev packages.")(init_project)
41
45
  app.command(name="i", no_args_is_help=False, hidden=True)(init_project)
42
- app.command(name="edit", no_args_is_help=False, help="[e] Open a file in the default editor.")(edit)
43
- app.command(name="e", no_args_is_help=False, hidden=True)(edit)
46
+ app.command(name="edit", no_args_is_help=False, help="[e] Open a file in the default editor.")(edit_file_with_hx)
47
+ app.command(name="e", no_args_is_help=False, hidden=True)(edit_file_with_hx)
44
48
 
45
49
  app.command(name="pdf-merge", no_args_is_help=True, help="[pm] Merge two PDF files into one.")(merge_pdfs)
46
50
  app.command(name="pm", no_args_is_help=True, hidden=True)(merge_pdfs)
@@ -7,7 +7,7 @@ $user = ''
7
7
  $sharePath = ''
8
8
  $driveLetter = ''
9
9
 
10
- uv run --python 3.14 --with "machineconfig>=7.51" python -m machineconfig.scripts.python.mount_ssh
10
+ uv run --python 3.14 --with "machineconfig>=7.52" python -m machineconfig.scripts.python.mount_ssh
11
11
 
12
12
  net use T: \\sshfs.kr\$user@$host.local
13
13
  # this worked: net use T: \\sshfs\alex@alex-p51s-5.local
@@ -2,7 +2,6 @@
2
2
  from pathlib import Path
3
3
 
4
4
  INTERACTIVE = Path(__file__).parent.joinpath("web_shortcuts/interactive.sh")
5
- APPS = Path(__file__).parent.joinpath("apps.sh")
6
5
  UV = Path(__file__).parent.joinpath("uv.sh")
7
6
 
8
7
  APPS_DESKTOP = Path(__file__).parent.joinpath("apps_desktop.sh")
@@ -2,16 +2,16 @@
2
2
  . <( curl -sSL "https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_linux/uv.sh")
3
3
  . <( curl -sSL "https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/scripts/linux/wrap_mcfg")
4
4
 
5
- alias devops='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.51" devops'
6
- alias cloud='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.51" cloud'
7
- alias agents='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.51" agents'
8
- alias sessions='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.51" sessions'
9
- alias ftpx='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.51" ftpx'
10
- alias fire='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.51" fire'
11
- alias croshell='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.51" croshell'
12
- alias utils='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.51" utils'
13
- alias terminal='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.51" terminal'
14
- alias msearch='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.51" msearch'
5
+ alias devops='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.52" devops'
6
+ alias cloud='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.52" cloud'
7
+ alias agents='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.52" agents'
8
+ alias sessions='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.52" sessions'
9
+ alias ftpx='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.52" ftpx'
10
+ alias fire='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.52" fire'
11
+ alias croshell='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.52" croshell'
12
+ alias utils='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.52" utils'
13
+ alias terminal='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.52" terminal'
14
+ alias msearch='$HOME/.local/bin/uvx --python 3.14 --from "machineconfig>=7.52" msearch'
15
15
 
16
16
  alias d='wrap_in_shell_script devops'
17
17
  alias c='wrap_in_shell_script cloud'
@@ -24,4 +24,5 @@ alias u='wrap_in_shell_script utils'
24
24
  alias t='wrap_in_shell_script terminal'
25
25
  alias ms='wrap_in_shell_script msearch'
26
26
 
27
+ devops self
27
28
  echo "mcfg command aliases are now defined in this shell session."
@@ -7,11 +7,10 @@ pointing at common scripts (so other code can import these paths).
7
7
 
8
8
  from pathlib import Path
9
9
 
10
- # Path to main installer script for macOS
11
- APPS = Path(__file__).parent.joinpath("apps.sh")
10
+
12
11
  # Optional helper scripts (may or may not exist)
13
12
  UV = Path(__file__).parent.joinpath("uv.sh")
14
13
  # Path to macOS SSH helper
15
14
  SSH_SETUP = Path(__file__).parent.joinpath("ssh/openssh_setup.sh")
16
15
 
17
- __all__ = ["APPS", "UV", "SSH_SETUP"]
16
+ __all__ = ["UV", "SSH_SETUP"]
@@ -1,11 +1,8 @@
1
1
 
2
2
  from pathlib import Path
3
3
 
4
- APPS = Path(__file__).parent.joinpath("apps.ps1")
5
4
  UV = Path(__file__).parent.joinpath("uv.ps1")
6
-
7
5
  DOCKER = Path(__file__).parent.joinpath("others/docker.ps1")
8
6
  OBS = Path(__file__).parent.joinpath("others/obs.ps1")
9
7
  POWER_OPTIONS = Path(__file__).parent.joinpath("others/power_options.ps1")
10
-
11
8
  SSH_SERVER = Path(__file__).parent.joinpath("ssh/openssh_server.ps1")
@@ -3,16 +3,16 @@
3
3
  iex (iwr "https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_windows/uv.ps1").Content
4
4
  iex (iwr "https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/scripts/windows/wrap_mcfg.ps1").Content
5
5
 
6
- function devops { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.51" devops $args }
7
- function cloud { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.51" cloud $args }
8
- function agents { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.51" agents $args }
9
- function sessions { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.51" sessions $args }
10
- function ftpx { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.51" ftpx $args }
11
- function fire { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.51" fire $args }
12
- function croshell { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.51" croshell $args }
13
- function utils { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.51" utils $args }
14
- function terminal { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.51" terminal $args }
15
- function msearch { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.51" msearch $args }
6
+ function devops { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.52" devops $args }
7
+ function cloud { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.52" cloud $args }
8
+ function agents { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.52" agents $args }
9
+ function sessions { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.52" sessions $args }
10
+ function ftpx { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.52" ftpx $args }
11
+ function fire { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.52" fire $args }
12
+ function croshell { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.52" croshell $args }
13
+ function utils { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.52" utils $args }
14
+ function terminal { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.52" terminal $args }
15
+ function msearch { & "$HOME\.local\bin\uvx.exe" --python 3.14 --from "machineconfig>=7.52" msearch $args }
16
16
 
17
17
  function d { wrap_in_shell_script devops @args }
18
18
  function c { wrap_in_shell_script cloud @args }
@@ -25,4 +25,5 @@ function u { wrap_in_shell_script utils @args }
25
25
  function t { wrap_in_shell_script terminal @args }
26
26
  function ms { wrap_in_shell_script msearch @args }
27
27
 
28
+ devops self
28
29
  Write-Host "mcfg command aliases are now defined in this PowerShell session."
@@ -0,0 +1,15 @@
1
+
2
+ iex (iwr "https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_windows/uv.ps1").Content
3
+ # iex (iwr "https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/scripts/windows/wrap_mcfg.ps1").Content
4
+ uv tool install --upgrade --python 3.14 machineconfig both
5
+
6
+ devops install --group sysabc
7
+
8
+ # configs
9
+ devops config copy-assets both
10
+ devops config public --method copy --on-conflict overwrite-default-path --which all
11
+ devops config shell
12
+ devops config shell --which nushell
13
+
14
+ wt # start Windows Terminal to pick up config changes
15
+ devops install --group termabc
@@ -1,9 +1,9 @@
1
1
  """package manager"""
2
2
 
3
- from machineconfig.utils.installer_utils.installer_abc import check_if_installed_already, parse_apps_installer_linux, parse_apps_installer_windows
3
+ from machineconfig.utils.installer_utils.installer_abc import check_if_installed_already
4
4
  from machineconfig.utils.installer_utils.installer_class import Installer
5
5
  from machineconfig.utils.schemas.installer.installer_types import InstallerData, InstallerDataFiles, get_normalized_arch, get_os_name, OPERATING_SYSTEMS, CPU_ARCHITECTURES
6
- from machineconfig.jobs.installer.package_groups import PACKAGE_GROUPS, PACKAGE_GROUP2NAMES
6
+ from machineconfig.jobs.installer.package_groups import PACKAGE_GROUP2NAMES
7
7
  from machineconfig.utils.path_extended import PathExtended
8
8
  from machineconfig.utils.source_of_truth import INSTALL_VERSION_ROOT, LINUX_INSTALL_PATH
9
9
  from machineconfig.utils.io import read_json
@@ -18,7 +18,7 @@ from joblib import Parallel, delayed
18
18
  def check_latest():
19
19
  console = Console() # Added console initialization
20
20
  console.print(Panel("🔍 CHECKING FOR LATEST VERSIONS", title="Status", expand=False)) # Replaced print with Panel
21
- installers = get_installers(os=get_os_name(), arch=get_normalized_arch(), which_cats=["ESSENTIAL"])
21
+ installers = get_installers(os=get_os_name(), arch=get_normalized_arch(), which_cats=["termabc"])
22
22
  installers_github = []
23
23
  for inst__ in installers:
24
24
  app_name = inst__["appName"]
@@ -91,7 +91,7 @@ def get_installed_cli_apps():
91
91
  return apps
92
92
 
93
93
 
94
- def get_installers(os: OPERATING_SYSTEMS, arch: CPU_ARCHITECTURES, which_cats: Optional[list[PACKAGE_GROUPS]]) -> list[InstallerData]:
94
+ def get_installers(os: OPERATING_SYSTEMS, arch: CPU_ARCHITECTURES, which_cats: Optional[list[str]]) -> list[InstallerData]:
95
95
  res_all = get_all_installer_data_files()
96
96
  acceptable_apps_names: list[str] | None = None
97
97
  if which_cats is not None:
@@ -105,8 +105,13 @@ def get_installers(os: OPERATING_SYSTEMS, arch: CPU_ARCHITECTURES, which_cats: O
105
105
  if acceptable_apps_names is not None:
106
106
  if installer_data["appName"] not in acceptable_apps_names:
107
107
  continue
108
- if installer_data["fileNamePattern"][arch][os] is None:
109
- continue
108
+ try:
109
+ if installer_data["fileNamePattern"][arch][os] is None:
110
+ continue
111
+ except KeyError as ke:
112
+ print(f"❌ ERROR: Missing key in installer data: {ke}")
113
+ print(f"Installer data: {installer_data}")
114
+ raise KeyError(f"Missing key in installer data: {ke}")
110
115
  all_installers.append(installer_data)
111
116
  return all_installers
112
117
 
@@ -119,27 +124,6 @@ def get_all_installer_data_files() -> list[InstallerData]:
119
124
  return res_final
120
125
 
121
126
 
122
- def dynamically_extract_installers_system_groups_from_scripts():
123
- res_final: list[InstallerData] = []
124
- from platform import system
125
- if system() == "Windows":
126
- from machineconfig.setup_windows import APPS
127
- options_system = parse_apps_installer_windows(APPS.read_text(encoding="utf-8"))
128
- elif system() == "Linux":
129
- from machineconfig.setup_linux import APPS
130
- options_system = parse_apps_installer_linux(APPS.read_text(encoding="utf-8"))
131
- elif system() == "Darwin":
132
- from machineconfig.setup_mac import APPS
133
- options_system = parse_apps_installer_linux(APPS.read_text(encoding="utf-8"))
134
- else:
135
- raise NotImplementedError(f"❌ System {system()} not supported")
136
- os_name = get_os_name()
137
- for group_name, (docs, script) in options_system.items():
138
- item: InstallerData = {"appName": group_name, "doc": docs, "repoURL": "CMD", "fileNamePattern": {"amd64": {os_name: script}, "arm64": {os_name: script}}}
139
- res_final.append(item)
140
- return res_final
141
-
142
-
143
127
  def install_bulk(installers_data: list[InstallerData], safe: bool = False, jobs: int = 10, fresh: bool = False):
144
128
  print("🚀 BULK INSTALLATION PROCESS 🚀")
145
129
  if fresh: