machineconfig 7.57__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 +19 -9
- machineconfig/jobs/installer/custom/boxes.py +2 -2
- machineconfig/jobs/installer/custom/hx.py +3 -3
- machineconfig/jobs/installer/custom_dev/cloudflare_warp_cli.py +23 -0
- machineconfig/jobs/installer/custom_dev/dubdb_adbc.py +1 -1
- machineconfig/jobs/installer/custom_dev/nerfont_windows_helper.py +1 -1
- machineconfig/jobs/installer/custom_dev/sysabc.py +10 -28
- machineconfig/jobs/installer/custom_dev/wezterm.py +0 -4
- machineconfig/jobs/installer/installer_data.json +57 -23
- machineconfig/jobs/installer/package_groups.py +20 -13
- machineconfig/scripts/linux/wrap_mcfg +1 -1
- machineconfig/scripts/python/croshell.py +4 -4
- machineconfig/scripts/python/devops.py +2 -3
- machineconfig/scripts/python/env_manager/path_manager_tui.py +1 -1
- machineconfig/scripts/python/fire_jobs.py +6 -5
- machineconfig/scripts/python/helpers_croshell/crosh.py +2 -2
- machineconfig/scripts/python/helpers_devops/cli_config_dotfile.py +4 -5
- machineconfig/scripts/python/helpers_devops/cli_self.py +3 -3
- 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 +0 -72
- machineconfig/scripts/python/helpers_devops/devops_backup_retrieve.py +4 -4
- machineconfig/scripts/python/helpers_fire_command/file_wrangler.py +2 -3
- machineconfig/scripts/python/helpers_fire_command/fire_jobs_route_helper.py +3 -4
- machineconfig/scripts/python/helpers_repos/cloud_repo_sync.py +3 -2
- 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 +5 -5
- machineconfig/scripts/python/helpers_utils/download.py +151 -0
- machineconfig/scripts/python/helpers_utils/path.py +1 -1
- machineconfig/scripts/python/interactive.py +2 -2
- 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 +35 -20
- machineconfig/scripts/python/utils.py +2 -1
- machineconfig/scripts/windows/mounts/mount_ssh.ps1 +1 -1
- machineconfig/settings/shells/zsh/init.sh +0 -7
- machineconfig/setup_linux/web_shortcuts/interactive.sh +10 -10
- machineconfig/setup_windows/web_shortcuts/interactive.ps1 +10 -10
- machineconfig/utils/code.py +2 -2
- machineconfig/utils/files/headers.py +2 -2
- machineconfig/utils/installer_utils/installer_class.py +39 -41
- machineconfig/utils/installer_utils/{installer.py → installer_cli.py} +59 -58
- machineconfig/utils/{installer.py → installer_utils/installer_runner.py} +1 -25
- machineconfig/utils/meta.py +29 -15
- machineconfig/utils/options.py +1 -1
- machineconfig/utils/path_extended.py +2 -2
- machineconfig/utils/path_helper.py +34 -31
- machineconfig/utils/schemas/layouts/layout_types.py +1 -1
- machineconfig/utils/ssh.py +1 -1
- {machineconfig-7.57.dist-info → machineconfig-7.64.dist-info}/METADATA +1 -1
- {machineconfig-7.57.dist-info → machineconfig-7.64.dist-info}/RECORD +60 -59
- machineconfig/jobs/installer/linux_scripts/pgsql.sh +0 -41
- /machineconfig/jobs/installer/linux_scripts/{warp-cli.sh → cloudflare_warp_cli.sh} +0 -0
- /machineconfig/utils/installer_utils/{installer_abc.py → installer_locator_utils.py} +0 -0
- {machineconfig-7.57.dist-info → machineconfig-7.64.dist-info}/WHEEL +0 -0
- {machineconfig-7.57.dist-info → machineconfig-7.64.dist-info}/entry_points.txt +0 -0
- {machineconfig-7.57.dist-info → machineconfig-7.64.dist-info}/top_level.txt +0 -0
|
@@ -4,18 +4,22 @@ 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
|
|
@@ -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,11 +3,11 @@ 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
|
|
@@ -45,7 +45,7 @@ def main(installer_data: InstallerData, version: Optional[str], install_lib: boo
|
|
|
45
45
|
inst = Installer(installer_data=config_dict_copy)
|
|
46
46
|
|
|
47
47
|
print("\n📥 [Step 1/5] Downloading Helix editor...")
|
|
48
|
-
downloaded, _version_to_be_installed = inst.
|
|
48
|
+
downloaded, _version_to_be_installed = inst.binary_download(version=version)
|
|
49
49
|
print(" ✨ Download complete.")
|
|
50
50
|
|
|
51
51
|
print("\n🔍 [Step 2/5] Locating executable and components...")
|
|
@@ -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
|
+
|
|
@@ -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)
|
|
@@ -116,7 +116,7 @@ def install_nerd_fonts() -> None:
|
|
|
116
116
|
console.print(f"🔍 Missing fonts detected: {', '.join(missing)}. Proceeding with installation...")
|
|
117
117
|
console.print("🔍 Downloading Nerd Fonts package...")
|
|
118
118
|
|
|
119
|
-
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)
|
|
120
120
|
|
|
121
121
|
console.print("🧹 Cleaning up unnecessary files...")
|
|
122
122
|
[p.delete(sure=True) for p in folder.search("*Windows*")]
|
|
@@ -49,14 +49,14 @@ echo "✅ Essential tools installation complete."
|
|
|
49
49
|
"""
|
|
50
50
|
|
|
51
51
|
bash = r"""
|
|
52
|
-
echo "🔄 Updating apt package lists..."
|
|
53
|
-
echo "📥 Installing nala package manager..."
|
|
54
|
-
echo "📥 Installing essential network tools..."
|
|
55
|
-
echo "📥 Installing Node Version Manager (NVM)..."
|
|
56
52
|
sudo apt update -y || true
|
|
57
53
|
sudo apt install nala -y || true
|
|
58
54
|
sudo nala install curl wget gpg lsb-release apt-transport-https -y || true
|
|
59
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
60
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
|
|
61
61
|
echo "🔧 Configuring NVM environment..."
|
|
62
62
|
export NVM_DIR="$HOME/.nvm"
|
|
@@ -64,37 +64,19 @@ export NVM_DIR="$HOME/.nvm"
|
|
|
64
64
|
echo "📥 Installing latest Node.js..."
|
|
65
65
|
nvm install node || true
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
# echo "📥 Installing aafire - ASCII art fire animation..."
|
|
72
|
-
# echo "📥 Installing cmatrix - Matrix-style terminal animation..."
|
|
73
|
-
# echo "📥 Installing hollywood - Hollywood hacker terminal effect..."
|
|
74
|
-
# echo "📥 Installing chafa - terminal image viewer..."
|
|
75
|
-
# sudo nala install cowsay -y || true
|
|
76
|
-
# sudo nala install lolcat -y || true
|
|
77
|
-
# sudo nala install boxes -y || true
|
|
78
|
-
# sudo nala install figlet -y || true
|
|
79
|
-
# sudo nala install fortune -y || true
|
|
80
|
-
# sudo nala install toilet -y || true
|
|
81
|
-
# sudo nala install chafa -y
|
|
82
|
-
# sudo nala install sl -y || true
|
|
83
|
-
# sudo nala install libaa-bin -y
|
|
67
|
+
sudo nala install samba
|
|
68
|
+
sudo nala install fuse3 -y || true
|
|
69
|
+
sudo nala install nfs-common -y || true
|
|
70
|
+
|
|
84
71
|
# echo 'keyboard-configuration keyboard-configuration/layout select US English' | sudo debconf-set-selections
|
|
85
72
|
# echo 'keyboard-configuration keyboard-configuration/layoutcode string us' | sudo debconf-set-selections
|
|
86
73
|
# sudo DEBIAN_FRONTEND=noninteractive nala install -y cmatrix
|
|
87
74
|
# sudo nala install hollywood -y || true
|
|
88
75
|
|
|
89
|
-
# --GROUP:net: sshfs,samba,fuse3,nfs-common
|
|
90
|
-
sudo nala install samba
|
|
91
|
-
sudo nala install fuse3 -y || true
|
|
92
|
-
sudo nala install nfs-common -y || true
|
|
93
|
-
# --GROUP:dev: graphviz,make,rust,libssl-dev,sqlite3,postgresql-client,redis-tools
|
|
94
76
|
# sudo nala install ffmpeg -y || true # Required by some dev tools
|
|
95
77
|
# sudo nala install make -y || true # Required by LunarVim and SpaceVim
|
|
96
78
|
# (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh) || true
|
|
97
|
-
|
|
79
|
+
|
|
98
80
|
"""
|
|
99
81
|
|
|
100
82
|
|
|
@@ -133,5 +115,5 @@ def main(installer_data: InstallerData, version: Optional[str]) -> None:
|
|
|
133
115
|
)
|
|
134
116
|
raise NotImplementedError(error_msg)
|
|
135
117
|
from machineconfig.utils.code import print_code, run_shell_script
|
|
136
|
-
print_code(program, lexer="shell", desc="Installation Script Preview")
|
|
118
|
+
print_code(code=program, lexer="shell", desc="Installation Script Preview")
|
|
137
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
|
|
|
@@ -528,6 +528,40 @@
|
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
530
|
},
|
|
531
|
+
{
|
|
532
|
+
"appName": "cloudflare-warp",
|
|
533
|
+
"repoURL": "CMD",
|
|
534
|
+
"doc": "🌐 Cloudflare WARP VPN client",
|
|
535
|
+
"fileNamePattern": {
|
|
536
|
+
"amd64": {
|
|
537
|
+
"linux": null,
|
|
538
|
+
"windows": "winget install --no-upgrade --name \"Cloudflare WARP\" --Id \"Cloudflare.Warp\" --source winget --scope user --accept-package-agreements --accept-source-agreements",
|
|
539
|
+
"macos": null
|
|
540
|
+
},
|
|
541
|
+
"arm64": {
|
|
542
|
+
"linux": null,
|
|
543
|
+
"windows": "winget install --no-upgrade --name \"Cloudflare WARP\" --Id \"Cloudflare.Warp\" --source winget --scope user --accept-package-agreements --accept-source-agreements",
|
|
544
|
+
"macos": null
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"appName": "cloudflare-warp-cli",
|
|
550
|
+
"repoURL": "CMD",
|
|
551
|
+
"doc": "🌐 Cloudflare WARP VPN client in the terminal",
|
|
552
|
+
"fileNamePattern": {
|
|
553
|
+
"amd64": {
|
|
554
|
+
"linux": "cloudflare_warp_cli.py",
|
|
555
|
+
"windows": "cloudflare_warp_cli.py",
|
|
556
|
+
"macos": "cloudflare_warp_cli.py"
|
|
557
|
+
},
|
|
558
|
+
"arm64": {
|
|
559
|
+
"linux": "cloudflare_warp_cli.py",
|
|
560
|
+
"windows": "cloudflare_warp_cli.py",
|
|
561
|
+
"macos": "cloudflare_warp_cli.py"
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
},
|
|
531
565
|
{
|
|
532
566
|
"appName": "cpufetch",
|
|
533
567
|
"repoURL": "https://github.com/Dr-Noob/cpufetch",
|
|
@@ -2488,16 +2522,33 @@
|
|
|
2488
2522
|
"appName": "warp",
|
|
2489
2523
|
"repoURL": "CMD",
|
|
2490
2524
|
"doc": "Modern terminal with AI-powered features",
|
|
2525
|
+
"fileNamePattern": {
|
|
2526
|
+
"amd64": {
|
|
2527
|
+
"linux": "https://app.warp.dev/get_warp?package=deb",
|
|
2528
|
+
"windows": "winget install Warp.Warp",
|
|
2529
|
+
"macos": "brew install --cask warp"
|
|
2530
|
+
},
|
|
2531
|
+
"arm64": {
|
|
2532
|
+
"linux": "https://app.warp.dev/get_warp?package=deb_arm64",
|
|
2533
|
+
"windows": "winget install Warp.Warp",
|
|
2534
|
+
"macos": "brew install --cask warp"
|
|
2535
|
+
}
|
|
2536
|
+
}
|
|
2537
|
+
},
|
|
2538
|
+
{
|
|
2539
|
+
"appName": "warp-terminal-cli",
|
|
2540
|
+
"repoURL": "CMD",
|
|
2541
|
+
"doc": "Modern terminal cli with AI-powered features",
|
|
2491
2542
|
"fileNamePattern": {
|
|
2492
2543
|
"amd64": {
|
|
2493
2544
|
"linux": "https://app.warp.dev/download/cli?os=linux&package=deb&arch=x86_64",
|
|
2494
2545
|
"windows": null,
|
|
2495
|
-
"macos":
|
|
2546
|
+
"macos": " brew tap warpdotdev/warp; brew update; brew install --cask warp-cli"
|
|
2496
2547
|
},
|
|
2497
2548
|
"arm64": {
|
|
2498
2549
|
"linux": "https://app.warp.dev/download/cli?os=linux&package=deb&arch=aarch64",
|
|
2499
2550
|
"windows": null,
|
|
2500
|
-
"macos":
|
|
2551
|
+
"macos": " brew tap warpdotdev/warp; brew update; brew install --cask warp-cli"
|
|
2501
2552
|
}
|
|
2502
2553
|
}
|
|
2503
2554
|
},
|
|
@@ -2638,7 +2689,7 @@
|
|
|
2638
2689
|
}
|
|
2639
2690
|
},
|
|
2640
2691
|
{
|
|
2641
|
-
"appName": "
|
|
2692
|
+
"appName": "gorilla",
|
|
2642
2693
|
"repoURL": "https://github.com/ShishirPatil/gorilla",
|
|
2643
2694
|
"doc": "natural language to API",
|
|
2644
2695
|
"fileNamePattern": {
|
|
@@ -2689,7 +2740,7 @@
|
|
|
2689
2740
|
}
|
|
2690
2741
|
},
|
|
2691
2742
|
{
|
|
2692
|
-
"appName": "
|
|
2743
|
+
"appName": "redis",
|
|
2693
2744
|
"repoURL": "CMD",
|
|
2694
2745
|
"doc": "submillisecond fast key-value db",
|
|
2695
2746
|
"fileNamePattern": {
|
|
@@ -2994,23 +3045,6 @@
|
|
|
2994
3045
|
}
|
|
2995
3046
|
}
|
|
2996
3047
|
},
|
|
2997
|
-
{
|
|
2998
|
-
"appName": "cloudflare-warp",
|
|
2999
|
-
"repoURL": "CMD",
|
|
3000
|
-
"doc": "🌐 Cloudflare WARP VPN client",
|
|
3001
|
-
"fileNamePattern": {
|
|
3002
|
-
"amd64": {
|
|
3003
|
-
"linux": null,
|
|
3004
|
-
"windows": "winget install --no-upgrade --name \"Cloudflare WARP\" --Id \"Cloudflare.Warp\" --source winget --scope user --accept-package-agreements --accept-source-agreements",
|
|
3005
|
-
"macos": null
|
|
3006
|
-
},
|
|
3007
|
-
"arm64": {
|
|
3008
|
-
"linux": null,
|
|
3009
|
-
"windows": "winget install --no-upgrade --name \"Cloudflare WARP\" --Id \"Cloudflare.Warp\" --source winget --scope user --accept-package-agreements --accept-source-agreements",
|
|
3010
|
-
"macos": null
|
|
3011
|
-
}
|
|
3012
|
-
}
|
|
3013
|
-
},
|
|
3014
3048
|
{
|
|
3015
3049
|
"appName": "mouse-without-borders",
|
|
3016
3050
|
"repoURL": "CMD",
|
|
@@ -3323,12 +3357,12 @@
|
|
|
3323
3357
|
"doc": "🖼️ Terminal graphics and image viewer",
|
|
3324
3358
|
"fileNamePattern": {
|
|
3325
3359
|
"amd64": {
|
|
3326
|
-
"linux":
|
|
3360
|
+
"linux": "sudo nala install chafa -y",
|
|
3327
3361
|
"windows": "winget install --no-upgrade --name \"Chafa\" --Id \"hpjansson.Chafa\" --source winget --scope user --accept-package-agreements --accept-source-agreements",
|
|
3328
3362
|
"macos": "brew install chafa"
|
|
3329
3363
|
},
|
|
3330
3364
|
"arm64": {
|
|
3331
|
-
"linux":
|
|
3365
|
+
"linux": "sudo nala install chafa -y",
|
|
3332
3366
|
"windows": "winget install --no-upgrade --name \"Chafa\" --Id \"hpjansson.Chafa\" --source winget --scope user --accept-package-agreements --accept-source-agreements",
|
|
3333
3367
|
"macos": "brew install chafa"
|
|
3334
3368
|
}
|
|
@@ -24,6 +24,7 @@ AGENTS = [
|
|
|
24
24
|
"kilocode",
|
|
25
25
|
"cline",
|
|
26
26
|
"auggie",
|
|
27
|
+
# "gorilla",
|
|
27
28
|
]
|
|
28
29
|
|
|
29
30
|
|
|
@@ -62,11 +63,13 @@ PACKAGES_CODE_EDITORS = [
|
|
|
62
63
|
PACKAGES_DATABASE = [
|
|
63
64
|
"SqliteBrowser",
|
|
64
65
|
"sqlite3",
|
|
66
|
+
"redis",
|
|
65
67
|
"redis-cli",
|
|
66
68
|
"postgresql-client",
|
|
67
69
|
"duckdb",
|
|
68
70
|
"DBeaver",
|
|
69
71
|
"rainfrog",
|
|
72
|
+
|
|
70
73
|
]
|
|
71
74
|
|
|
72
75
|
|
|
@@ -146,20 +149,23 @@ PACKAGES_PRODUCTIVITY = [
|
|
|
146
149
|
"hx",
|
|
147
150
|
]
|
|
148
151
|
|
|
149
|
-
|
|
150
|
-
|
|
152
|
+
|
|
153
|
+
# sudo nala install cowsay -y || true
|
|
154
|
+
# sudo nala install lolcat -y || true
|
|
155
|
+
# sudo nala install boxes -y || true
|
|
156
|
+
# sudo nala install figlet -y || true
|
|
157
|
+
# sudo nala install fortune -y || true
|
|
158
|
+
# sudo nala install toilet -y || true
|
|
159
|
+
TERMINAL_EYE_CANDY = [
|
|
151
160
|
"lolcatjs",
|
|
152
161
|
"figlet-cli",
|
|
153
162
|
"boxes",
|
|
154
|
-
"
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
"
|
|
160
|
-
"obsidian",
|
|
161
|
-
"istio",
|
|
162
|
-
"cointop",
|
|
163
|
+
# "transmission",
|
|
164
|
+
# "bytehound",
|
|
165
|
+
# "xcrawl3r",
|
|
166
|
+
# "obsidian",
|
|
167
|
+
# "istio",
|
|
168
|
+
# "cointop",
|
|
163
169
|
]
|
|
164
170
|
|
|
165
171
|
|
|
@@ -216,6 +222,7 @@ PACKAGES_TERMINAL_SHELL = [
|
|
|
216
222
|
"zellij",
|
|
217
223
|
"mprocs",
|
|
218
224
|
"mcfly",
|
|
225
|
+
"atuin",
|
|
219
226
|
"starship",
|
|
220
227
|
"gotty",
|
|
221
228
|
"ttyd",
|
|
@@ -229,9 +236,9 @@ PACKAGE_GROUP2NAMES: dict[str, list[str]] = {
|
|
|
229
236
|
"sysabc": ["sysabc"],
|
|
230
237
|
"termabc": [*PACKAGES_CODE_ANALYSIS, *PACKAGES_SYSTEM_MONITORS, *PACKAGES_TERMINAL_SHELL, *PACKAGES_FILE,],
|
|
231
238
|
"gui": GUI,
|
|
232
|
-
"dev": [*PACKAGES_TERMINAL_EMULATORS, *PACKAGES_BROWSERS, *PACKAGES_CODE_EDITORS, *PACKAGES_DATABASE, *PACKAGES_MEDIA, *PACKAGES_FILE_SHARING, *PACKAGES_DEV_UTILS, *PACKAGES_CODE_ANALYSIS, *PACKAGES_PRODUCTIVITY, *
|
|
239
|
+
"dev": [*PACKAGES_TERMINAL_EMULATORS, *PACKAGES_BROWSERS, *PACKAGES_CODE_EDITORS, *PACKAGES_DATABASE, *PACKAGES_MEDIA, *PACKAGES_FILE_SHARING, *PACKAGES_DEV_UTILS, *PACKAGES_CODE_ANALYSIS, *PACKAGES_PRODUCTIVITY, *TERMINAL_EYE_CANDY,],
|
|
233
240
|
"dev-utils": PACKAGES_DEV_UTILS,
|
|
234
|
-
"
|
|
241
|
+
"term-eye-candy": TERMINAL_EYE_CANDY,
|
|
235
242
|
"agents": AGENTS,
|
|
236
243
|
"terminal-emulator": PACKAGES_TERMINAL_EMULATORS,
|
|
237
244
|
"shell": PACKAGES_TERMINAL_SHELL,
|
|
@@ -13,7 +13,7 @@ wrap_in_shell_script() {
|
|
|
13
13
|
|
|
14
14
|
local command="$1"
|
|
15
15
|
shift
|
|
16
|
-
local RANDOM_NAME=$(
|
|
16
|
+
local RANDOM_NAME=$(uuidgen | tr -d '-' | head -c 16)
|
|
17
17
|
local OP_DIR="$HOME/tmp_results/tmp_scripts/machineconfig"
|
|
18
18
|
local OP_PROGRAM_PATH="$OP_DIR/${RANDOM_NAME}.sh"
|
|
19
19
|
export OP_PROGRAM_PATH
|
|
@@ -107,7 +107,7 @@ def croshell(
|
|
|
107
107
|
fire_line = f"uv run --python 3.14 --with visidata,pyarrow vd {str(file_obj)}"
|
|
108
108
|
elif marimo:
|
|
109
109
|
if Path.home().joinpath("code/machineconfig").exists(): requirements = f"""--with marimo --project "{str(Path.home().joinpath("code/machineconfig"))}" """
|
|
110
|
-
else: requirements = """--python 3.14 --with "marimo,cowsay,machineconfig[plot]>=7.
|
|
110
|
+
else: requirements = """--python 3.14 --with "marimo,cowsay,machineconfig[plot]>=7.64" """
|
|
111
111
|
fire_line = f"""
|
|
112
112
|
cd {str(pyfile.parent)}
|
|
113
113
|
uv run --python 3.14 --with "marimo" marimo convert {pyfile.name} -o marimo_nb.py
|
|
@@ -115,14 +115,14 @@ uv run {requirements} marimo edit --host 0.0.0.0 marimo_nb.py
|
|
|
115
115
|
"""
|
|
116
116
|
elif jupyter:
|
|
117
117
|
if Path.home().joinpath("code/machineconfig").exists(): requirements = f"""--project "{str(Path.home().joinpath("code/machineconfig"))}" --with jupyterlab """
|
|
118
|
-
else: requirements = """--with "cowsay,machineconfig[plot]>=7.
|
|
118
|
+
else: requirements = """--with "cowsay,machineconfig[plot]>=7.64" """
|
|
119
119
|
fire_line = f"uv run {requirements} jupyter-lab {str(nb_target)}"
|
|
120
120
|
elif vscode:
|
|
121
121
|
fire_line = f"""
|
|
122
122
|
cd {str(pyfile.parent)}
|
|
123
123
|
uv init --python 3.14
|
|
124
124
|
uv venv
|
|
125
|
-
uv add "cowsay,machineconfig[plot]>=7.
|
|
125
|
+
uv add "cowsay,machineconfig[plot]>=7.64"
|
|
126
126
|
# code serve-web
|
|
127
127
|
code --new-window {str(pyfile)}
|
|
128
128
|
"""
|
|
@@ -130,7 +130,7 @@ code --new-window {str(pyfile)}
|
|
|
130
130
|
if interpreter == "ipython": profile = f" --profile {ipython_profile} --no-banner"
|
|
131
131
|
else: profile = ""
|
|
132
132
|
if Path.home().joinpath("code/machineconfig").exists(): ve_line = f"""--project "{str(Path.home().joinpath("code/machineconfig"))}" """
|
|
133
|
-
else: ve_line = """--python 3.14 --with "cowsay,machineconfig[plot]>=7.
|
|
133
|
+
else: ve_line = """--python 3.14 --with "cowsay,machineconfig[plot]>=7.64" """
|
|
134
134
|
# ve_path_maybe, ipython_profile_maybe = get_ve_path_and_ipython_profile(Path.cwd())
|
|
135
135
|
# --python 3.14
|
|
136
136
|
fire_line = f"uv run {ve_line} {interpreter} {interactivity} {profile} {str(pyfile)}"
|
|
@@ -12,17 +12,16 @@ import machineconfig.scripts.python.helpers_devops.cli_nw as cli_network
|
|
|
12
12
|
|
|
13
13
|
def install(which: Annotated[Optional[str], typer.Argument(..., help="Comma-separated list of program names to install, or group name if --group flag is set.")] = None,
|
|
14
14
|
group: Annotated[bool, typer.Option(..., "--group", "-g", help="Treat 'which' as a group name. A group is bundle of apps.")] = False,
|
|
15
|
-
interactive: Annotated[bool, typer.Option(..., "--interactive", "-
|
|
15
|
+
interactive: Annotated[bool, typer.Option(..., "--interactive", "-i", help="Interactive selection of programs to install.")] = False,
|
|
16
16
|
) -> None:
|
|
17
17
|
"""📦 Install packages"""
|
|
18
|
-
import machineconfig.utils.installer_utils.
|
|
18
|
+
import machineconfig.utils.installer_utils.installer_cli as installer_entry_point
|
|
19
19
|
installer_entry_point.main(which=which, group=group, interactive=interactive)
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
def get_app():
|
|
23
23
|
app = typer.Typer(help="🛠️ DevOps operations", no_args_is_help=True, add_help_option=False,
|
|
24
24
|
add_completion=False)
|
|
25
|
-
_ = install
|
|
26
25
|
app.command("install", no_args_is_help=True, help="🛠️ [i] Install essential packages")(install)
|
|
27
26
|
app.command("i", no_args_is_help=True, help="Install essential packages", hidden=True)(install)
|
|
28
27
|
app_repos = cli_repos.get_app()
|
|
@@ -32,7 +32,6 @@ uv run --python 3.14 --with marimo marimo convert {choice_file} -o marimo_nb.py
|
|
|
32
32
|
uv run --project {repo_root} --with marimo marimo edit --host 0.0.0.0 marimo_nb.py
|
|
33
33
|
"""
|
|
34
34
|
from machineconfig.utils.code import exit_then_run_shell_script
|
|
35
|
-
|
|
36
35
|
print(f"🚀 Launching Marimo notebook for `{choice_file}`...")
|
|
37
36
|
exit_then_run_shell_script(script)
|
|
38
37
|
return
|
|
@@ -76,9 +75,8 @@ uv run --project {repo_root} --with marimo marimo edit --host 0.0.0.0 marimo_nb.
|
|
|
76
75
|
else:
|
|
77
76
|
raise NotImplementedError(f"File type {choice_file.suffix} not supported, in the sense that I don't know how to fire it.")
|
|
78
77
|
|
|
79
|
-
if (
|
|
80
|
-
|
|
81
|
-
): # because debugging tools do not support choosing functions and don't interplay with fire module. So the only way to have debugging and choose function options is to import the file as a module into a new script and run the function of interest there and debug the new script.
|
|
78
|
+
if args.module or (args.debug and args.choose_function):
|
|
79
|
+
# because debugging tools do not support choosing functions and don't interplay with fire module. So the only way to have debugging and choose function options is to import the file as a module into a new script and run the function of interest there and debug the new script.
|
|
82
80
|
assert choice_file.suffix == ".py", f"File must be a python file to be imported as a module. Got {choice_file}"
|
|
83
81
|
from machineconfig.scripts.python.helpers_fire_command.file_wrangler import get_import_module_code, wrap_import_in_try_except
|
|
84
82
|
from machineconfig.utils.meta import lambda_to_python_script
|
|
@@ -92,9 +90,12 @@ uv run --project {repo_root} --with marimo marimo edit --host 0.0.0.0 marimo_nb.
|
|
|
92
90
|
in_global=True,
|
|
93
91
|
import_module=False,
|
|
94
92
|
)
|
|
93
|
+
# print(f"🧩 Preparing import code for module import:\n{import_code}")
|
|
95
94
|
code_printing = lambda_to_python_script(
|
|
96
|
-
lambda: print_code(code=import_code_robust, lexer="python", desc="import code"),
|
|
95
|
+
lambda: print_code(code=import_code_robust, lexer="python", desc="import as module code"),
|
|
96
|
+
in_global=True, import_module=False
|
|
97
97
|
)
|
|
98
|
+
print(f"🧩 Preparing import code for module import:\n{import_code}")
|
|
98
99
|
if choice_function is not None:
|
|
99
100
|
calling = f"""res = {choice_function}({("**" + str(kwargs_dict)) if kwargs_dict else ""})"""
|
|
100
101
|
else:
|
|
@@ -20,9 +20,9 @@ def get_read_data_pycode(path: str):
|
|
|
20
20
|
from rich.panel import Panel
|
|
21
21
|
from rich.text import Text
|
|
22
22
|
from rich.console import Console
|
|
23
|
-
from
|
|
23
|
+
from pathlib import Path
|
|
24
24
|
console = Console()
|
|
25
|
-
p =
|
|
25
|
+
p = Path(path).absolute()
|
|
26
26
|
try:
|
|
27
27
|
from machineconfig.utils.files.read import Read
|
|
28
28
|
from machineconfig.utils.accessories import pprint
|
|
@@ -45,18 +45,17 @@ def main(
|
|
|
45
45
|
dest_path = Path(destination).expanduser().absolute()
|
|
46
46
|
dest_path.mkdir(parents=True, exist_ok=True)
|
|
47
47
|
new_path = dest_path.joinpath(orig_path.name)
|
|
48
|
-
from machineconfig.utils.path_extended import PathExtended
|
|
49
48
|
match method:
|
|
50
49
|
case "copy" | "c":
|
|
51
50
|
try:
|
|
52
|
-
copy_map(config_file_default_path=
|
|
51
|
+
copy_map(config_file_default_path=orig_path, self_managed_config_file_path=new_path, on_conflict=ON_CONFLICT_MAPPER[on_conflict]) # type: ignore[arg-type]
|
|
53
52
|
except Exception as e:
|
|
54
53
|
typer.echo(f"[red]Error:[/] {e}")
|
|
55
54
|
typer.Exit(code=1)
|
|
56
55
|
return
|
|
57
56
|
case "symlink" | "s":
|
|
58
57
|
try:
|
|
59
|
-
symlink_map(config_file_default_path=
|
|
58
|
+
symlink_map(config_file_default_path=orig_path, self_managed_config_file_path=new_path, on_conflict=ON_CONFLICT_MAPPER[on_conflict]) # type: ignore[arg-type]
|
|
60
59
|
except Exception as e:
|
|
61
60
|
typer.echo(f"[red]Error:[/] {e}")
|
|
62
61
|
typer.Exit(code=1)
|
|
@@ -66,10 +65,10 @@ def main(
|
|
|
66
65
|
|
|
67
66
|
# mapper_snippet = "\n".join(
|
|
68
67
|
# [
|
|
69
|
-
# f"[bold]📝 Edit configuration file:[/] [cyan]nano {
|
|
68
|
+
# f"[bold]📝 Edit configuration file:[/] [cyan]nano {Path(CONFIG_ROOT)}/symlinks/mapper.toml[/cyan]",
|
|
70
69
|
# "",
|
|
71
70
|
# f"[{new_path.parent.name}]",
|
|
72
|
-
# f"{orig_path.name.split('.')[0]} = {{ this = '{orig_path.
|
|
71
|
+
# f"{orig_path.name.split('.')[0]} = {{ this = '{orig_path.as_posix()}', to_this = '{new_path.as_posix()}' }}",
|
|
73
72
|
# ]
|
|
74
73
|
# )
|
|
75
74
|
# console.print(
|
|
@@ -52,9 +52,9 @@ def install(no_copy_assets: Annotated[bool, typer.Option("--no-assets-copy", "-n
|
|
|
52
52
|
else:
|
|
53
53
|
import platform
|
|
54
54
|
if platform.system() == "Windows":
|
|
55
|
-
run_shell_script(r"""& "$HOME\.local\bin\uv.exe" tool install --upgrade "machineconfig>=7.
|
|
55
|
+
run_shell_script(r"""& "$HOME\.local\bin\uv.exe" tool install --upgrade "machineconfig>=7.64" """)
|
|
56
56
|
else:
|
|
57
|
-
run_shell_script("""$HOME/.local/bin/uv tool install --upgrade "machineconfig>=7.
|
|
57
|
+
run_shell_script("""$HOME/.local/bin/uv tool install --upgrade "machineconfig>=7.64" """)
|
|
58
58
|
from machineconfig.profile.create_shell_profile import create_default_shell_profile
|
|
59
59
|
if not no_copy_assets:
|
|
60
60
|
create_default_shell_profile() # involves copying assets too
|
|
@@ -79,7 +79,7 @@ def navigate():
|
|
|
79
79
|
path = Path(navigator.__file__).resolve().parent.joinpath("devops_navigator.py")
|
|
80
80
|
from machineconfig.utils.code import run_shell_script
|
|
81
81
|
if Path.home().joinpath("code/machineconfig").exists(): executable = f"""--project "{str(Path.home().joinpath("code/machineconfig"))}" --with textual"""
|
|
82
|
-
else: executable = """--with "machineconfig>=7.
|
|
82
|
+
else: executable = """--with "machineconfig>=7.64,textual" """
|
|
83
83
|
run_shell_script(f"""uv run {executable} {path}""")
|
|
84
84
|
|
|
85
85
|
|
|
@@ -12,7 +12,7 @@ Usage examples:
|
|
|
12
12
|
devops network receive -- --relay 10.17.62.206:443 7121-donor-olympic-bicycle
|
|
13
13
|
devops network receive -- croc --relay 10.17.62.206:443 7121-donor-olympic-bicycle
|
|
14
14
|
"""
|
|
15
|
-
from machineconfig.utils.installer_utils.
|
|
15
|
+
from machineconfig.utils.installer_utils.installer_cli import install_if_missing
|
|
16
16
|
install_if_missing(which="croc")
|
|
17
17
|
import platform
|
|
18
18
|
import sys
|
|
@@ -100,7 +100,7 @@ def share_file_send(path: Annotated[str, typer.Argument(help="Path to the file o
|
|
|
100
100
|
qrcode: Annotated[bool, typer.Option("--qrcode", "--qr", help="Show receive code as a qrcode")] = False,
|
|
101
101
|
) -> None:
|
|
102
102
|
"""Send a file using croc with relay server."""
|
|
103
|
-
from machineconfig.utils.installer_utils.
|
|
103
|
+
from machineconfig.utils.installer_utils.installer_cli import install_if_missing
|
|
104
104
|
install_if_missing(which="croc")
|
|
105
105
|
# Get relay server IP from environment or use default
|
|
106
106
|
import socket
|