machineconfig 5.67__py3-none-any.whl → 5.69__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 (31) hide show
  1. machineconfig/jobs/installer/installer_data.json +3 -3
  2. machineconfig/scripts/python/agents.py +29 -24
  3. machineconfig/scripts/python/ai/generate_files.py +4 -4
  4. machineconfig/scripts/python/ai/solutions/generic.py +1 -0
  5. machineconfig/scripts/python/croshell.py +1 -1
  6. machineconfig/scripts/python/devops.py +13 -7
  7. machineconfig/scripts/python/devops_helpers/cli_config.py +26 -14
  8. machineconfig/scripts/python/devops_helpers/cli_data.py +1 -1
  9. machineconfig/scripts/python/devops_helpers/cli_nw.py +14 -7
  10. machineconfig/scripts/python/devops_helpers/cli_repos.py +36 -18
  11. machineconfig/scripts/python/devops_helpers/cli_self.py +19 -11
  12. machineconfig/scripts/python/ftpx.py +6 -6
  13. machineconfig/scripts/python/interactive.py +3 -3
  14. machineconfig/scripts/python/nw/mount_nfs +1 -1
  15. machineconfig/scripts/python/nw/mount_nfs.py +3 -3
  16. machineconfig/scripts/python/nw/mount_ssh.py +3 -3
  17. machineconfig/scripts/python/nw/wsl_windows_transfer.py +2 -2
  18. machineconfig/scripts/python/repos_helpers/count_lines_frontend.py +1 -1
  19. machineconfig/scripts/python/sessions.py +9 -4
  20. machineconfig/scripts/windows/mounts/mount_ssh.ps1 +1 -1
  21. machineconfig/setup_linux/apps.sh +0 -1
  22. machineconfig/setup_linux/web_shortcuts/interactive.sh +7 -7
  23. machineconfig/setup_windows/web_shortcuts/interactive.ps1 +7 -7
  24. machineconfig/utils/installer_utils/installer.py +9 -8
  25. machineconfig/utils/ssh.py +466 -247
  26. machineconfig/utils/ssh_utils/utils.py +0 -0
  27. {machineconfig-5.67.dist-info → machineconfig-5.69.dist-info}/METADATA +1 -1
  28. {machineconfig-5.67.dist-info → machineconfig-5.69.dist-info}/RECORD +31 -30
  29. {machineconfig-5.67.dist-info → machineconfig-5.69.dist-info}/WHEEL +0 -0
  30. {machineconfig-5.67.dist-info → machineconfig-5.69.dist-info}/entry_points.txt +0 -0
  31. {machineconfig-5.67.dist-info → machineconfig-5.69.dist-info}/top_level.txt +0 -0
@@ -120,7 +120,7 @@ def execute_installations(selected_options: list[str]) -> None:
120
120
  console.print("🔧 Installing CLI applications", style="bold cyan")
121
121
  try:
122
122
  from machineconfig.utils.installer_utils.installer import main as devops_devapps_install_main
123
- devops_devapps_install_main(group=maybe_a_group, which=None, interactive=False)
123
+ devops_devapps_install_main(group=True, which=maybe_a_group, interactive=False)
124
124
  console.print("✅ CLI applications installed successfully", style="bold green")
125
125
  except Exception as e:
126
126
  console.print(f"❌ Error installing CLI applications: {e}", style="bold red")
@@ -130,9 +130,9 @@ def execute_installations(selected_options: list[str]) -> None:
130
130
  console.print(Panel("🐍 [bold green]PYTHON ENVIRONMENT[/bold green]\n[italic]Virtual environment setup[/italic]", border_style="green"))
131
131
  import platform
132
132
  if platform.system() == "Windows":
133
- run_shell_script(r"""$HOME\.local\bin\uv.exe tool install machineconfig>=5.65""")
133
+ run_shell_script(r"""$HOME\.local\bin\uv.exe tool install machineconfig>=5.67""")
134
134
  else:
135
- run_shell_script("""$HOME/.local/bin/uv tool install machineconfig>=5.65""")
135
+ run_shell_script("""$HOME/.local/bin/uv tool install machineconfig>=5.67""")
136
136
  if "install_ssh_server" in selected_options:
137
137
  console.print(Panel("🔒 [bold red]SSH SERVER[/bold red]\n[italic]Remote access setup[/italic]", border_style="red"))
138
138
  import platform
@@ -5,7 +5,7 @@
5
5
  # mkdir ~/data/local
6
6
  # sudo mount -o nolock,noatime,nodiratime,proto=tcp,timeo=600,retrans=2,noac alex-p51s-5:/home/alex/data/local ./data/local
7
7
 
8
- uv run --python 3.14 --with machineconfig>=5.65python -m machineconfig.scripts.python.mount_nfs
8
+ uv run --python 3.14 --with machineconfig>=5.67python -m machineconfig.scripts.python.mount_nfs
9
9
  # Check if remote server is reachable and share folder exists
10
10
  if ! ping -c 1 "$remote_server" &> /dev/null; then
11
11
  echo "💥 Error: Remote server $remote_server is not reachable."
@@ -19,9 +19,9 @@ def main():
19
19
  print("\n🔍 Interactive mode selected for choosing share path.")
20
20
  tmp = choose_ssh_host(multi=False)
21
21
  assert isinstance(tmp, str)
22
- ssh = SSH(tmp)
23
- default = f"{ssh.hostname}:{ssh.run('echo $HOME').op}/data/share_nfs"
24
- share_info = choose_from_options(msg="📂 Choose a share path:", options=[f"{ssh.hostname}:{item.split(' ')[0]}" for item in ssh.run("cat /etc/exports").op.split("\n") if not item.startswith("#")] + [default], default=default, multi=False)
22
+ ssh = SSH(host=tmp, username=None, hostname=None, ssh_key_path=None, password=None, port=22, enable_compression=False)
23
+ default = f"{ssh.hostname}:{ssh.run_shell(command='echo $HOME', verbose_output=False, description='Get home directory', strict_stderr=False, strict_return_code=True).op}/data/share_nfs"
24
+ share_info = choose_from_options(msg="📂 Choose a share path:", options=[f"{ssh.hostname}:{item.split(' ')[0]}" for item in ssh.run_shell(command="cat /etc/exports", verbose_output=False, description='Get NFS exports', strict_stderr=False, strict_return_code=False).op.split("\n") if not item.startswith("#")] + [default], default=default, multi=False)
25
25
  assert isinstance(share_info, str), f"❌ share_info must be a string. Got {type(share_info)}"
26
26
 
27
27
  remote_server = share_info.split(":")[0]
@@ -18,10 +18,10 @@ def main():
18
18
  print("\n🔍 Interactive mode selected for choosing share path.")
19
19
  tmp = choose_ssh_host(multi=False)
20
20
  assert isinstance(tmp, str)
21
- ssh = SSH(host=tmp)
22
- share_info = f"{ssh.username}@{ssh.hostname}:{ssh.run('echo $HOME').op}/data/share_ssh"
21
+ ssh = SSH(host=tmp, username=None, hostname=None, ssh_key_path=None, password=None, port=22, enable_compression=False)
22
+ share_info = f"{ssh.username}@{ssh.hostname}:{ssh.run_shell(command='echo $HOME', verbose_output=False, description='Get home directory', strict_stderr=False, strict_return_code=True).op}/data/share_ssh"
23
23
  else:
24
- ssh = SSH(share_info.split(":")[0])
24
+ ssh = SSH(host=share_info.split(":")[0], username=None, hostname=None, ssh_key_path=None, password=None, port=22, enable_compression=False)
25
25
 
26
26
  print(f"\n🌐 Share Info: {share_info}")
27
27
 
@@ -52,9 +52,9 @@ def main(
52
52
  port_int = int(port) if port else (2222 if system == "Windows" else 22)
53
53
  username = UserName
54
54
  hostname = platform.node()
55
- ssh = SSH(hostname=hostname, username=username, port=port_int, sshkey=sshkey)
55
+ ssh = SSH(host=None, username=username, hostname=hostname, ssh_key_path=sshkey, password=pwd, port=port_int, enable_compression=False)
56
56
  print("🌐 Initiating SSH transfer...")
57
- ssh.copy_from_here(source=path_obj, target=destination, z=zip_first)
57
+ ssh.copy_from_here(source_path=path_obj, target_path=Path(destination) if destination else None, compress_with_zip=zip_first, recursive=False, overwrite_existing=False)
58
58
  print("✅ SSH transfer completed successfully!\n")
59
59
 
60
60
 
@@ -7,7 +7,7 @@ def analyze_repo_development(repo_path: str = typer.Argument(..., help="Path to
7
7
  from pathlib import Path
8
8
  count_lines_path = Path(count_lines.__file__)
9
9
  # --project $HOME/code/ machineconfig --group plot
10
- cmd = f"""uv run --python 3.14 --with machineconfig[plot]>=5.65 {count_lines_path} analyze-over-time {repo_path}"""
10
+ cmd = f"""uv run --python 3.14 --with machineconfig[plot]>=5.67 {count_lines_path} analyze-over-time {repo_path}"""
11
11
  from machineconfig.utils.code import run_shell_script
12
12
  run_shell_script(cmd)
13
13
 
@@ -138,10 +138,15 @@ def kill_process():
138
138
  def get_app():
139
139
  layouts_app = typer.Typer(help="Layouts management subcommands", no_args_is_help=True)
140
140
  from machineconfig.scripts.python.sessions_helpers.sessions_multiprocess import create_from_function
141
- layouts_app.command("create-from-function", no_args_is_help=True, help="Create a layout from a function")(create_from_function)
142
- layouts_app.command("run", no_args_is_help=True, help="Run the selected layout(s)")(run)
143
- layouts_app.command("balance-load", no_args_is_help=True, help="Balance the load across sessions")(balance_load)
144
- layouts_app.command("kill-process", no_args_is_help=True, help="Choose a process to kill")(kill_process)
141
+ layouts_app.command("create-from-function", no_args_is_help=True, help="[c] Create a layout from a function")(create_from_function)
142
+ layouts_app.command("c", no_args_is_help=True, help="Create a layout from a function", hidden=True)(create_from_function)
143
+ layouts_app.command("run", no_args_is_help=True, help="[r] Run the selected layout(s)")(run)
144
+ layouts_app.command("r", no_args_is_help=True, help="Run the selected layout(s)", hidden=True)(run)
145
+ layouts_app.command("balance-load", no_args_is_help=True, help="[b] Balance the load across sessions")(balance_load)
146
+ layouts_app.command("b", no_args_is_help=True, help="Balance the load across sessions", hidden=True)(balance_load)
147
+ layouts_app.command("kill-process", no_args_is_help=False, help="[k] Choose a process to kill")(kill_process)
148
+ layouts_app.command("k", no_args_is_help=False, help="Choose a process to kill", hidden=True)(kill_process)
149
+
145
150
  return layouts_app
146
151
 
147
152
 
@@ -7,7 +7,7 @@ $user = ''
7
7
  $sharePath = ''
8
8
  $driveLetter = ''
9
9
 
10
- uv run --python 3.14 --with machineconfig>=5.65python -m machineconfig.scripts.python.mount_ssh
10
+ uv run --python 3.14 --with machineconfig>=5.67python -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
@@ -14,7 +14,6 @@ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
14
14
  echo "🔧 Configuring NVM environment..."
15
15
  export NVM_DIR="$HOME/.nvm"
16
16
  [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
17
- [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
18
17
  echo "📥 Installing latest Node.js..."
19
18
  nvm install node || true
20
19
  echo "📥 Installing SQLite - lightweight SQL database..."
@@ -1,25 +1,25 @@
1
1
  #!/bin/bash
2
2
  . <( curl -sSL "https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_linux/uv.sh")
3
3
  devops() {
4
- "$HOME/.local/bin/uv" run --python 3.14 --with machineconfig>=5.65 devops "$@"
4
+ "$HOME/.local/bin/uv" run --python 3.14 --with machineconfig>=5.67 devops "$@"
5
5
  }
6
6
  agents() {
7
- "$HOME/.local/bin/uv" run --python 3.14 --with machineconfig>=5.65 agents "$@"
7
+ "$HOME/.local/bin/uv" run --python 3.14 --with machineconfig>=5.67 agents "$@"
8
8
  }
9
9
  cloud() {
10
- "$HOME/.local/bin/uv" run --python 3.14 --with machineconfig>=5.65 cloud "$@"
10
+ "$HOME/.local/bin/uv" run --python 3.14 --with machineconfig>=5.67 cloud "$@"
11
11
  }
12
12
  croshell() {
13
- "$HOME/.local/bin/uv" run --python 3.14 --with machineconfig>=5.65 croshell "$@"
13
+ "$HOME/.local/bin/uv" run --python 3.14 --with machineconfig>=5.67 croshell "$@"
14
14
  }
15
15
  fire() {
16
- "$HOME/.local/bin/uv" run --python 3.14 --with machineconfig>=5.65fire "$@"
16
+ "$HOME/.local/bin/uv" run --python 3.14 --with machineconfig>=5.67fire "$@"
17
17
  }
18
18
  ftpx() {
19
- "$HOME/.local/bin/uv" run --python 3.14 --with machineconfig>=5.65ftpx "$@"
19
+ "$HOME/.local/bin/uv" run --python 3.14 --with machineconfig>=5.67ftpx "$@"
20
20
  }
21
21
  sessions() {
22
- "$HOME/.local/bin/uv" run --python 3.14 --with machineconfig>=5.65sessions "$@"
22
+ "$HOME/.local/bin/uv" run --python 3.14 --with machineconfig>=5.67sessions "$@"
23
23
  }
24
24
 
25
25
  echo "devops command is now defined in this shell session."
@@ -2,30 +2,30 @@
2
2
 
3
3
  iex (iwr "https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_windows/uv.ps1").Content
4
4
  function devops {
5
- & "$HOME\.local\bin\uv.exe" run --python 3.14 --with machineconfig>=5.65 devops $args
5
+ & "$HOME\.local\bin\uv.exe" run --python 3.14 --with machineconfig>=5.67 devops $args
6
6
  }
7
7
 
8
8
  function cloud {
9
- & "$HOME\.local\bin\uv.exe" run --python 3.14 --with machineconfig>=5.65 cloud $args
9
+ & "$HOME\.local\bin\uv.exe" run --python 3.14 --with machineconfig>=5.67 cloud $args
10
10
  }
11
11
 
12
12
  function croshell {
13
- & "$HOME\.local\bin\uv.exe" run --python 3.14 --with machineconfig>=5.65 croshell $args
13
+ & "$HOME\.local\bin\uv.exe" run --python 3.14 --with machineconfig>=5.67 croshell $args
14
14
  }
15
15
 
16
16
  function agents {
17
- & "$HOME\.local\bin\uv.exe" run --python 3.14 --with machineconfig>=5.65 agents $args
17
+ & "$HOME\.local\bin\uv.exe" run --python 3.14 --with machineconfig>=5.67 agents $args
18
18
  }
19
19
 
20
20
  function fire {
21
- & "$HOME\.local\bin\uv.exe" run --python 3.14 --with machineconfig>=5.65 fire $args
21
+ & "$HOME\.local\bin\uv.exe" run --python 3.14 --with machineconfig>=5.67 fire $args
22
22
  }
23
23
 
24
24
  function ftpx {
25
- & "$HOME\.local\bin\uv.exe" run --python 3.14 --with machineconfig>=5.65 ftpx $args
25
+ & "$HOME\.local\bin\uv.exe" run --python 3.14 --with machineconfig>=5.67 ftpx $args
26
26
  }
27
27
 
28
28
  function sessions {
29
- & "$HOME\.local\bin\uv.exe" run --python 3.14 --with machineconfig>=5.65 sessions $args
29
+ & "$HOME\.local\bin\uv.exe" run --python 3.14 --with machineconfig>=5.67 sessions $args
30
30
  }
31
31
 
@@ -56,18 +56,19 @@ def main_with_parser():
56
56
 
57
57
 
58
58
  def main(
59
- which: Optional[str] = typer.Option(None, "--which", "-w", help="Comma-separated list of program names to install."),
60
- group: Optional[str] = typer.Option(None, "--group", "-g", help="Groups names. A group is bundle of apps. See available groups when running interactively."),
59
+ which: Optional[str] = typer.Argument(None, help="Comma-separated list of program/groups names to install (if --group flag is set)."),
60
+ group: bool = typer.Option(False, "--group", "-g", help="Treat 'which' as a group name. A group is bundle of apps."),
61
61
  interactive: bool = typer.Option(False, "--interactive", "-ia", help="Interactive selection of programs to install."),
62
62
  ) -> None:
63
- if which is not None:
64
- return install_clis(clis_names=[x.strip() for x in which.split(",") if x.strip() != ""])
65
- if group is not None:
66
- # for a_group in group
67
- return install_group(package_group=group)
68
63
  if interactive:
69
64
  return install_interactively()
70
- typer.echo("❌ You must provide either --which, --group, or --interactive/-ia option.")
65
+ if which is not None:
66
+ if group:
67
+ for a_group in [x.strip() for x in which.split(",") if x.strip() != ""]:
68
+ return install_group(package_group=a_group)
69
+ else:
70
+ return install_clis(clis_names=[x.strip() for x in which.split(",") if x.strip() != ""])
71
+ typer.echo("❌ You must provide either a program name/group name, or use --interactive/-ia option.")
71
72
  import click
72
73
  ctx = click.get_current_context()
73
74
  typer.echo(ctx.get_help())