machineconfig 7.49__py3-none-any.whl → 7.64__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/sessions_managers/utils/maker.py +21 -11
- machineconfig/jobs/installer/custom/boxes.py +2 -2
- machineconfig/jobs/installer/custom/hx.py +16 -12
- machineconfig/jobs/installer/custom_dev/brave.py +1 -1
- machineconfig/jobs/installer/custom_dev/cloudflare_warp_cli.py +23 -0
- machineconfig/jobs/installer/custom_dev/code.py +4 -1
- machineconfig/jobs/installer/custom_dev/dubdb_adbc.py +1 -1
- machineconfig/jobs/installer/custom_dev/nerfont_windows_helper.py +1 -10
- machineconfig/jobs/installer/custom_dev/sysabc.py +119 -0
- machineconfig/jobs/installer/custom_dev/wezterm.py +2 -19
- machineconfig/jobs/installer/installer_data.json +739 -25
- machineconfig/jobs/installer/linux_scripts/redis.sh +1 -0
- machineconfig/jobs/installer/package_groups.py +49 -83
- machineconfig/logger.py +0 -1
- machineconfig/profile/create_links_export.py +21 -7
- machineconfig/profile/mapper.toml +1 -4
- machineconfig/scripts/linux/wrap_mcfg +1 -1
- machineconfig/scripts/python/croshell.py +20 -43
- machineconfig/scripts/python/devops.py +3 -4
- machineconfig/scripts/python/env_manager/path_manager_tui.py +1 -1
- machineconfig/scripts/python/fire_jobs.py +53 -39
- machineconfig/scripts/python/ftpx.py +4 -2
- machineconfig/scripts/python/helpers_agents/agentic_frameworks/fire_qwen.py +0 -12
- machineconfig/scripts/python/helpers_croshell/crosh.py +3 -3
- machineconfig/scripts/python/helpers_devops/cli_config.py +3 -19
- machineconfig/scripts/python/helpers_devops/cli_config_dotfile.py +22 -13
- machineconfig/scripts/python/helpers_devops/cli_self.py +12 -6
- machineconfig/scripts/python/helpers_devops/cli_share_file.py +2 -2
- machineconfig/scripts/python/helpers_devops/cli_share_server.py +1 -1
- machineconfig/scripts/python/helpers_devops/cli_terminal.py +1 -1
- machineconfig/scripts/python/helpers_devops/cli_utils.py +1 -152
- machineconfig/scripts/python/helpers_devops/devops_backup_retrieve.py +4 -4
- machineconfig/scripts/python/helpers_fire_command/file_wrangler.py +2 -20
- machineconfig/scripts/python/helpers_fire_command/fire_jobs_route_helper.py +3 -4
- machineconfig/scripts/python/helpers_msearch/scripts_linux/fzfg +1 -1
- machineconfig/scripts/python/helpers_repos/clone.py +0 -1
- machineconfig/scripts/python/helpers_repos/cloud_repo_sync.py +9 -3
- machineconfig/scripts/python/helpers_repos/count_lines_frontend.py +1 -1
- machineconfig/scripts/python/helpers_repos/entrypoint.py +2 -1
- machineconfig/scripts/python/helpers_repos/record.py +2 -1
- machineconfig/scripts/python/helpers_sessions/sessions_multiprocess.py +7 -7
- machineconfig/scripts/python/helpers_utils/download.py +151 -0
- machineconfig/scripts/python/helpers_utils/path.py +106 -0
- machineconfig/scripts/python/interactive.py +17 -26
- machineconfig/scripts/python/nw/devops_add_ssh_key.py +21 -5
- machineconfig/scripts/python/nw/ssh_debug_linux.py +7 -7
- machineconfig/scripts/python/nw/ssh_debug_windows.py +4 -4
- machineconfig/scripts/python/nw/wsl_windows_transfer.py +3 -2
- machineconfig/scripts/python/sessions.py +37 -22
- machineconfig/scripts/python/utils.py +8 -3
- machineconfig/scripts/windows/mounts/mount_ssh.ps1 +1 -1
- machineconfig/settings/shells/nushell/init.nu +2 -2
- machineconfig/settings/shells/wezterm/wezterm.lua +2 -0
- machineconfig/settings/shells/zsh/init.sh +1 -8
- machineconfig/settings/yazi/init.lua +45 -24
- machineconfig/settings/yazi/keymap_windows.toml +1 -2
- machineconfig/settings/yazi/shell/yazi_cd.ps1 +29 -5
- machineconfig/setup_linux/__init__.py +0 -1
- machineconfig/setup_linux/web_shortcuts/interactive.sh +12 -10
- machineconfig/setup_mac/__init__.py +2 -3
- machineconfig/setup_windows/__init__.py +0 -3
- machineconfig/setup_windows/web_shortcuts/interactive.ps1 +12 -10
- machineconfig/setup_windows/web_shortcuts/quick_init.ps1 +16 -0
- machineconfig/utils/code.py +2 -2
- machineconfig/utils/files/headers.py +2 -2
- machineconfig/utils/installer_utils/installer_class.py +42 -40
- machineconfig/utils/installer_utils/{installer.py → installer_cli.py} +61 -101
- machineconfig/utils/installer_utils/{installer_abc.py → installer_locator_utils.py} +0 -68
- machineconfig/utils/{installer.py → installer_utils/installer_runner.py} +11 -51
- machineconfig/utils/io.py +0 -1
- machineconfig/utils/meta.py +29 -15
- machineconfig/utils/options.py +1 -1
- machineconfig/utils/path_extended.py +40 -19
- machineconfig/utils/path_helper.py +75 -21
- machineconfig/utils/schemas/layouts/layout_types.py +1 -1
- machineconfig/utils/ssh.py +3 -3
- machineconfig-7.64.dist-info/METADATA +124 -0
- {machineconfig-7.49.dist-info → machineconfig-7.64.dist-info}/RECORD +84 -87
- machineconfig/jobs/installer/linux_scripts/pgsql.sh +0 -41
- machineconfig/jobs/installer/linux_scripts/timescaledb.sh +0 -71
- machineconfig/jobs/installer/powershell_scripts/archive_pygraphviz.ps1 +0 -12
- machineconfig/scripts/python/nw/add_ssh_key.py +0 -148
- machineconfig/settings/lf/linux/exe/fzf_nano.sh +0 -16
- machineconfig/setup_linux/apps.sh +0 -66
- machineconfig/setup_mac/apps.sh +0 -73
- machineconfig/setup_windows/apps.ps1 +0 -62
- machineconfig-7.49.dist-info/METADATA +0 -92
- /machineconfig/jobs/installer/linux_scripts/{warp-cli.sh → cloudflare_warp_cli.sh} +0 -0
- /machineconfig/{jobs/installer/powershell_scripts → setup_windows/ssh}/openssh-server_add_key.ps1 +0 -0
- /machineconfig/{jobs/installer/powershell_scripts → setup_windows/ssh}/openssh-server_copy-ssh-id.ps1 +0 -0
- {machineconfig-7.49.dist-info → machineconfig-7.64.dist-info}/WHEEL +0 -0
- {machineconfig-7.49.dist-info → machineconfig-7.64.dist-info}/entry_points.txt +0 -0
- {machineconfig-7.49.dist-info → machineconfig-7.64.dist-info}/top_level.txt +0 -0
|
@@ -4,26 +4,30 @@ from typing import Optional, Literal
|
|
|
4
4
|
from machineconfig.utils.schemas.layouts.layout_types import TabConfig, LayoutConfig
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
|
|
7
|
-
def get_fire_tab_using_uv(func: FunctionType, import_module: bool, uv_with: Optional[list[str]], uv_project_dir: Optional[str]) -> tuple[TabConfig, Path]:
|
|
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)
|
|
11
|
+
else:
|
|
12
|
+
py_script = lambda_to_python_script(lmb=lambda: func(), in_global=True, import_module=import_module)
|
|
10
13
|
from machineconfig.utils.code import get_uv_command_executing_python_script
|
|
11
14
|
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)
|
|
12
15
|
tab_config: TabConfig = {
|
|
13
16
|
"command": command_to_run,
|
|
14
17
|
"startDir": "$HOME",
|
|
15
|
-
"tabName": func.__name__
|
|
18
|
+
"tabName": func.__name__,
|
|
19
|
+
"tabWeight": tab_weight
|
|
16
20
|
}
|
|
17
21
|
return tab_config, py_script_path
|
|
18
|
-
def get_fire_tab_using_fire(func: FunctionType):
|
|
22
|
+
def get_fire_tab_using_fire(func: FunctionType, tab_weight: int) -> TabConfig:
|
|
19
23
|
import inspect
|
|
20
24
|
from machineconfig.utils.source_of_truth import CONFIG_ROOT
|
|
21
25
|
import platform
|
|
22
26
|
if platform.system().lower() == "windows":
|
|
23
|
-
wrap_mcfg = CONFIG_ROOT / "scripts/
|
|
27
|
+
wrap_mcfg = CONFIG_ROOT / "scripts/wrap_mcfg.ps1"
|
|
24
28
|
wrap_mcfg = f'& "{wrap_mcfg}"'
|
|
25
29
|
elif platform.system().lower() == "linux" or platform.system().lower() == "darwin":
|
|
26
|
-
wrap_mcfg = CONFIG_ROOT / "scripts/
|
|
30
|
+
wrap_mcfg = CONFIG_ROOT / "scripts/wrap_mcfg"
|
|
27
31
|
else:
|
|
28
32
|
raise ValueError(f"Unsupported platform: {platform.system()}")
|
|
29
33
|
path = Path(inspect.getfile(func))
|
|
@@ -32,21 +36,27 @@ def get_fire_tab_using_fire(func: FunctionType):
|
|
|
32
36
|
tab_config: TabConfig = {
|
|
33
37
|
"command": command_to_run,
|
|
34
38
|
"startDir": "$HOME",
|
|
35
|
-
"tabName": func.__name__
|
|
39
|
+
"tabName": func.__name__,
|
|
40
|
+
"tabWeight": tab_weight
|
|
36
41
|
}
|
|
37
42
|
return tab_config
|
|
38
43
|
|
|
39
44
|
|
|
40
45
|
|
|
41
|
-
def make_layout_from_functions(functions: list[FunctionType],
|
|
46
|
+
def make_layout_from_functions(functions: list[FunctionType], functions_weights: Optional[list[int]], import_module: bool, tab_configs: list[TabConfig],
|
|
47
|
+
layout_name: str, method: Literal["script", "fire"],
|
|
48
|
+
uv_with: Optional[list[str]] = None, uv_project_dir: Optional[str] = None
|
|
49
|
+
) -> LayoutConfig:
|
|
42
50
|
tabs2artifacts: list[tuple[TabConfig, list[Path]]] = []
|
|
43
|
-
for a_func in functions:
|
|
51
|
+
for a_func, tab_weight in zip(functions, functions_weights or [1]*len(functions)):
|
|
44
52
|
match method:
|
|
45
53
|
case "script":
|
|
46
|
-
tab_config, artifact_files_1 = get_fire_tab_using_uv(a_func,
|
|
54
|
+
tab_config, artifact_files_1 = get_fire_tab_using_uv(a_func, tab_weight=tab_weight, import_module=import_module,
|
|
55
|
+
uv_with=uv_with, uv_project_dir=uv_project_dir
|
|
56
|
+
)
|
|
47
57
|
artifact_files = [artifact_files_1]
|
|
48
58
|
case "fire":
|
|
49
|
-
tab_config = get_fire_tab_using_fire(a_func)
|
|
59
|
+
tab_config = get_fire_tab_using_fire(a_func, tab_weight=tab_weight)
|
|
50
60
|
artifact_files = []
|
|
51
61
|
tabs2artifacts.append((tab_config, artifact_files))
|
|
52
62
|
list_of_tabs = [tab for tab, _ in tabs2artifacts] + tab_configs
|
|
@@ -5,7 +5,7 @@ from typing import Optional
|
|
|
5
5
|
|
|
6
6
|
from rich.console import Console
|
|
7
7
|
from rich.panel import Panel
|
|
8
|
-
from machineconfig.utils.installer_utils.
|
|
8
|
+
from machineconfig.utils.installer_utils.installer_locator_utils import WINDOWS_INSTALL_PATH
|
|
9
9
|
|
|
10
10
|
from machineconfig.utils.installer_utils.installer_class import Installer
|
|
11
11
|
from machineconfig.utils.schemas.installer.installer_types import InstallerData
|
|
@@ -40,7 +40,7 @@ def main(installer_data: InstallerData, version: Optional[str] = None) -> None:
|
|
|
40
40
|
)
|
|
41
41
|
|
|
42
42
|
installer = Installer(installer_data=installer_data_modified)
|
|
43
|
-
downloaded, _version_to_be_installed = installer.
|
|
43
|
+
downloaded, _version_to_be_installed = installer.binary_download(version=version)
|
|
44
44
|
decomp_path = downloaded.decompress()
|
|
45
45
|
from pathlib import Path
|
|
46
46
|
for item in decomp_path.rglob("*"):
|
|
@@ -3,17 +3,18 @@ Installers do not add runtime files to the machine, hence this script.
|
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
from machineconfig.utils.path_extended import PathExtended
|
|
6
|
-
from machineconfig.utils.installer_utils.
|
|
6
|
+
from machineconfig.utils.installer_utils.installer_locator_utils import WINDOWS_INSTALL_PATH
|
|
7
7
|
from typing import Optional
|
|
8
8
|
import platform
|
|
9
9
|
|
|
10
|
-
from machineconfig.utils.installer_utils.
|
|
10
|
+
from machineconfig.utils.installer_utils.installer_locator_utils import LINUX_INSTALL_PATH
|
|
11
11
|
from machineconfig.utils.installer_utils.installer_class import Installer
|
|
12
12
|
from rich.console import Console
|
|
13
13
|
from rich.panel import Panel
|
|
14
14
|
from machineconfig.utils.schemas.installer.installer_types import InstallerData
|
|
15
15
|
|
|
16
16
|
|
|
17
|
+
LANGUAGES_SUPPORTED_GRAMMER = ["python.so", "nu.so", "bash.so", "lua.so", "powershell.so"]
|
|
17
18
|
config_dict: InstallerData = {
|
|
18
19
|
"appName": "hx",
|
|
19
20
|
"repoURL": "CMD",
|
|
@@ -44,7 +45,7 @@ def main(installer_data: InstallerData, version: Optional[str], install_lib: boo
|
|
|
44
45
|
inst = Installer(installer_data=config_dict_copy)
|
|
45
46
|
|
|
46
47
|
print("\n📥 [Step 1/5] Downloading Helix editor...")
|
|
47
|
-
downloaded, _version_to_be_installed = inst.
|
|
48
|
+
downloaded, _version_to_be_installed = inst.binary_download(version=version)
|
|
48
49
|
print(" ✨ Download complete.")
|
|
49
50
|
|
|
50
51
|
print("\n🔍 [Step 2/5] Locating executable and components...")
|
|
@@ -58,6 +59,7 @@ def main(installer_data: InstallerData, version: Optional[str], install_lib: boo
|
|
|
58
59
|
raise FileNotFoundError(f"Could not find 'hx' executable in {downloaded.name}")
|
|
59
60
|
|
|
60
61
|
assert len(hx_file_search) == 1, f"Expected 1 'hx' executable, found {len(hx_file_search)}"
|
|
62
|
+
|
|
61
63
|
hx_file = hx_file_search[0]
|
|
62
64
|
contrib = hx_file.parent / "contrib"
|
|
63
65
|
runtime = contrib.parent / "runtime"
|
|
@@ -101,11 +103,12 @@ def main(installer_data: InstallerData, version: Optional[str], install_lib: boo
|
|
|
101
103
|
if not child.exists():
|
|
102
104
|
continue
|
|
103
105
|
if child.name == "grammars":
|
|
104
|
-
# copy only the
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
# copy only the specific language files from runtime/grammars if they exist
|
|
107
|
+
for a_language in LANGUAGES_SUPPORTED_GRAMMER:
|
|
108
|
+
lang_file = child.joinpath(a_language)
|
|
109
|
+
if lang_file.exists() and lang_file.is_file():
|
|
110
|
+
dest = target_runtime.joinpath("grammars")
|
|
111
|
+
lang_file.copy(folder=dest, overwrite=True)
|
|
109
112
|
else:
|
|
110
113
|
# copy the whole child (file or directory) into target_runtime
|
|
111
114
|
# for directories, copy will create target_runtime/<child.name>
|
|
@@ -147,10 +150,11 @@ def main(installer_data: InstallerData, version: Optional[str], install_lib: boo
|
|
|
147
150
|
if not child.exists():
|
|
148
151
|
continue
|
|
149
152
|
if child.name == "grammars":
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
153
|
+
for a_language in LANGUAGES_SUPPORTED_GRAMMER:
|
|
154
|
+
lang_file = child.joinpath(a_language)
|
|
155
|
+
if lang_file.exists() and lang_file.is_file():
|
|
156
|
+
dest = target_runtime.joinpath("grammars")
|
|
157
|
+
lang_file.copy(folder=dest, overwrite=True)
|
|
154
158
|
else:
|
|
155
159
|
try:
|
|
156
160
|
child.copy(folder=target_runtime, overwrite=True)
|
|
@@ -27,7 +27,7 @@ def main(installer_data: InstallerData, version: Optional[str]) -> None:
|
|
|
27
27
|
console.print("🪟 Installing Brave Browser on Windows using winget...", style="bold")
|
|
28
28
|
program = """
|
|
29
29
|
|
|
30
|
-
winget install --
|
|
30
|
+
winget install --no-upgrade --name "Brave" --Id "Brave.Brave" --source winget --scope user --accept-package-agreements --accept-source-agreements
|
|
31
31
|
|
|
32
32
|
"""
|
|
33
33
|
elif platform.system() in ["Linux", "Darwin"]:
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
from typing import Optional
|
|
3
|
+
import platform
|
|
4
|
+
from machineconfig.utils.schemas.installer.installer_types import InstallerData
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def main(installer_data: InstallerData, version: Optional[str]):
|
|
8
|
+
_ = installer_data, version
|
|
9
|
+
system = platform.system()
|
|
10
|
+
if system == "Windows":
|
|
11
|
+
raise NotImplementedError("Installer is not yet implemented for Windows.")
|
|
12
|
+
elif system == "Linux":
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
import machineconfig.jobs.installer as module
|
|
15
|
+
program = Path(module.__file__).parent.joinpath("linux_scripts/cloudflare_warp_cli.sh").read_text(encoding="utf-8")
|
|
16
|
+
elif system == "Darwin":
|
|
17
|
+
program = "brew install --cask cloudflare-warp"
|
|
18
|
+
else:
|
|
19
|
+
raise NotImplementedError(f"Unsupported platform: {system}")
|
|
20
|
+
import subprocess
|
|
21
|
+
subprocess.run(program, shell=True, check=True)
|
|
22
|
+
return f"Cloudflare WARP CLI installed successfully on {system}."
|
|
23
|
+
|
|
@@ -32,7 +32,10 @@ def main(installer_data: InstallerData, version: Optional[str] = None) -> None:
|
|
|
32
32
|
install_script = """brew install --cask visual-studio-code"""
|
|
33
33
|
elif platform.system() == "Windows":
|
|
34
34
|
console.print("🪟 Installing VS Code on Windows using winget...", style="bold")
|
|
35
|
-
install_script = """
|
|
35
|
+
install_script = """
|
|
36
|
+
winget install --no-upgrade --name "Microsoft Visual Studio Code" --Id "Microsoft.VisualStudioCode" --source winget --scope user --accept-package-agreements --accept-source-agreements
|
|
37
|
+
|
|
38
|
+
"""
|
|
36
39
|
else:
|
|
37
40
|
error_msg = f"Unsupported platform: {platform.system()}"
|
|
38
41
|
console.print(
|
|
@@ -25,6 +25,6 @@ installer_data: InstallerData = {
|
|
|
25
25
|
|
|
26
26
|
def main(installer_data: InstallerData, version: Optional[str]) -> None:
|
|
27
27
|
_ = version
|
|
28
|
-
from machineconfig.utils.
|
|
28
|
+
from machineconfig.utils.installer_utils.installer_runner import Installer
|
|
29
29
|
installer = Installer(installer_data)
|
|
30
30
|
installer.install(version=None)
|
|
@@ -18,7 +18,6 @@ from machineconfig.utils.installer_utils.installer_class import Installer
|
|
|
18
18
|
from machineconfig.utils.schemas.installer.installer_types import InstallerData
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
# Nerd Fonts installer configuration data
|
|
22
21
|
nerd_fonts: InstallerData = {
|
|
23
22
|
"appName": "Cascadia Code Nerd Font",
|
|
24
23
|
"repoURL": "https://github.com/ryanoasis/nerd-fonts",
|
|
@@ -38,14 +37,6 @@ nerd_fonts: InstallerData = {
|
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
|
|
41
|
-
# Patterns to match any installed variant (NF, Nerd Font, Mono, Propo, style weights) of Cascadia/Caskaydia
|
|
42
|
-
# We'll compile them at runtime for flexibility. Keep them simple to avoid false positives.
|
|
43
|
-
# REQUIRED_FONT_PATTERNS: tuple[str, ...] = (
|
|
44
|
-
# r"caskaydiacove.*(nf|nerd ?font)",
|
|
45
|
-
# r"cascadiacode.*(nf|nerd ?font)"
|
|
46
|
-
# )
|
|
47
|
-
|
|
48
|
-
|
|
49
40
|
console = Console()
|
|
50
41
|
|
|
51
42
|
|
|
@@ -125,7 +116,7 @@ def install_nerd_fonts() -> None:
|
|
|
125
116
|
console.print(f"🔍 Missing fonts detected: {', '.join(missing)}. Proceeding with installation...")
|
|
126
117
|
console.print("🔍 Downloading Nerd Fonts package...")
|
|
127
118
|
|
|
128
|
-
folder, _version_to_be_installed = Installer(installer_data=nerd_fonts).
|
|
119
|
+
folder, _version_to_be_installed = Installer(installer_data=nerd_fonts).binary_download(version=None)
|
|
129
120
|
|
|
130
121
|
console.print("🧹 Cleaning up unnecessary files...")
|
|
131
122
|
[p.delete(sure=True) for p in folder.search("*Windows*")]
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import platform
|
|
4
|
+
from typing import Optional
|
|
5
|
+
from rich import box
|
|
6
|
+
from rich.console import Console
|
|
7
|
+
from rich.panel import Panel
|
|
8
|
+
from machineconfig.utils.schemas.installer.installer_types import InstallerData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
ps1 = r"""
|
|
12
|
+
winget install --no-upgrade --name "Powershell" --Id "Microsoft.PowerShell" --source winget --scope user --accept-package-agreements --accept-source-agreements # powershell require admin
|
|
13
|
+
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
|
+
winget install --no-upgrade --name "GNU Nano" --Id "GNU.Nano" --source winget --scope user --accept-package-agreements --accept-source-agreements
|
|
15
|
+
# --GROUP:gui:Brave+VSCode+Git+WezTerm
|
|
16
|
+
# --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
|
+
# --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
|
+
# 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
|
+
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
zsh = r"""
|
|
24
|
+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
25
|
+
echo "🔄 Updating Homebrew..."
|
|
26
|
+
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
|
+
# Note: git and nano are pre-installed on macOS, but we install via Homebrew to ensure latest versions
|
|
32
|
+
# brew install git || true
|
|
33
|
+
# brew install nano || true
|
|
34
|
+
# brew install curl || true
|
|
35
|
+
# Install NVM
|
|
36
|
+
if [ ! -s "$HOME/.nvm/nvm.sh" ]; then
|
|
37
|
+
echo "📥 Installing NVM (Node Version Manager)..."
|
|
38
|
+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
|
|
39
|
+
fi
|
|
40
|
+
echo "🔧 Configuring NVM environment..."
|
|
41
|
+
export NVM_DIR="$HOME/.nvm"
|
|
42
|
+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
|
43
|
+
echo "📥 Installing latest Node.js..."
|
|
44
|
+
nvm install node || true
|
|
45
|
+
# brew install make
|
|
46
|
+
# brew install ffmpeg
|
|
47
|
+
# brew install openssl
|
|
48
|
+
echo "✅ Essential tools installation complete."
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
bash = r"""
|
|
52
|
+
sudo apt update -y || true
|
|
53
|
+
sudo apt install nala -y || true
|
|
54
|
+
sudo nala install curl wget gpg lsb-release apt-transport-https -y || true
|
|
55
|
+
sudo nala install git net-tools htop nano -y || true
|
|
56
|
+
sudo nala install build-essential python3-dev -y || true # C build toolchain: Where build-essential brings gcc, make, etc., and python3-dev ensures headers for your Python version.
|
|
57
|
+
# sudo nala install libssl-dev -y
|
|
58
|
+
# sudo nala install libaa-bin -y
|
|
59
|
+
|
|
60
|
+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
|
|
61
|
+
echo "🔧 Configuring NVM environment..."
|
|
62
|
+
export NVM_DIR="$HOME/.nvm"
|
|
63
|
+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
|
64
|
+
echo "📥 Installing latest Node.js..."
|
|
65
|
+
nvm install node || true
|
|
66
|
+
|
|
67
|
+
sudo nala install samba
|
|
68
|
+
sudo nala install fuse3 -y || true
|
|
69
|
+
sudo nala install nfs-common -y || true
|
|
70
|
+
|
|
71
|
+
# echo 'keyboard-configuration keyboard-configuration/layout select US English' | sudo debconf-set-selections
|
|
72
|
+
# echo 'keyboard-configuration keyboard-configuration/layoutcode string us' | sudo debconf-set-selections
|
|
73
|
+
# sudo DEBIAN_FRONTEND=noninteractive nala install -y cmatrix
|
|
74
|
+
# sudo nala install hollywood -y || true
|
|
75
|
+
|
|
76
|
+
# sudo nala install ffmpeg -y || true # Required by some dev tools
|
|
77
|
+
# sudo nala install make -y || true # Required by LunarVim and SpaceVim
|
|
78
|
+
# (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh) || true
|
|
79
|
+
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def main(installer_data: InstallerData, version: Optional[str]) -> None:
|
|
84
|
+
console = Console()
|
|
85
|
+
_ = installer_data
|
|
86
|
+
console.print(
|
|
87
|
+
Panel.fit(
|
|
88
|
+
"\n".join([f"💻 Platform: {platform.system()}", f"🔄 Version: {'latest' if version is None else version}"]),
|
|
89
|
+
title="🔧 ABC Installer",
|
|
90
|
+
border_style="blue",
|
|
91
|
+
box=box.ROUNDED,
|
|
92
|
+
)
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
_ = version
|
|
96
|
+
if platform.system() == "Windows":
|
|
97
|
+
console.print("🪟 Installing ABC on Windows using winget...", style="bold")
|
|
98
|
+
program = ps1
|
|
99
|
+
elif platform.system() == "Linux":
|
|
100
|
+
console.print("🐧 Installing ABC on Linux...", style="bold")
|
|
101
|
+
program = bash
|
|
102
|
+
elif platform.system() == "Darwin":
|
|
103
|
+
console.print("🍎 Installing ABC on macOS...", style="bold")
|
|
104
|
+
program = zsh
|
|
105
|
+
else:
|
|
106
|
+
error_msg = f"Unsupported platform: {platform.system()}"
|
|
107
|
+
console.print(
|
|
108
|
+
Panel.fit(
|
|
109
|
+
"\n".join([error_msg]),
|
|
110
|
+
title="❌ Error",
|
|
111
|
+
subtitle="⚠️ Unsupported platform",
|
|
112
|
+
border_style="red",
|
|
113
|
+
box=box.ROUNDED,
|
|
114
|
+
)
|
|
115
|
+
)
|
|
116
|
+
raise NotImplementedError(error_msg)
|
|
117
|
+
from machineconfig.utils.code import print_code, run_shell_script
|
|
118
|
+
print_code(code=program, lexer="shell", desc="Installation Script Preview")
|
|
119
|
+
run_shell_script(program)
|
|
@@ -9,10 +9,6 @@ from rich.panel import Panel
|
|
|
9
9
|
|
|
10
10
|
from machineconfig.utils.schemas.installer.installer_types import InstallerData
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
# config_dict: InstallerData = {"appName": "Wezterm", "repoURL": "CMD", "doc": "Modern, GPU-accelerated terminal emulator"}
|
|
14
|
-
|
|
15
|
-
|
|
16
12
|
console = Console()
|
|
17
13
|
|
|
18
14
|
|
|
@@ -35,21 +31,8 @@ def main(installer_data: InstallerData, version: Optional[str]):
|
|
|
35
31
|
|
|
36
32
|
_ = version
|
|
37
33
|
if platform.system() == "Windows":
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
Panel.fit(
|
|
41
|
-
"\n".join(
|
|
42
|
-
[
|
|
43
|
-
f"❌ ERROR | {error_msg}",
|
|
44
|
-
"💡 TIP: Please download and install manually from the WezTerm website",
|
|
45
|
-
]
|
|
46
|
-
),
|
|
47
|
-
title="Unsupported Platform",
|
|
48
|
-
border_style="red",
|
|
49
|
-
padding=(1, 2),
|
|
50
|
-
)
|
|
51
|
-
)
|
|
52
|
-
raise NotImplementedError(error_msg)
|
|
34
|
+
program = """winget install --no-upgrade --name "WezTerm" --Id "wez.wezterm" --source winget --accept-package-agreements --accept-source-agreements
|
|
35
|
+
"""
|
|
53
36
|
elif platform.system() in ["Linux", "Darwin"]:
|
|
54
37
|
system_name = "LINUX" if platform.system() == "Linux" else "MACOS"
|
|
55
38
|
console.print(
|