machineconfig 7.58__py3-none-any.whl → 7.59__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/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 +1 -20
- 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/python/croshell.py +4 -4
- machineconfig/scripts/python/devops.py +1 -1
- machineconfig/scripts/python/env_manager/path_manager_tui.py +1 -1
- 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 +2 -3
- machineconfig/scripts/python/utils.py +2 -1
- machineconfig/scripts/windows/mounts/mount_ssh.ps1 +1 -1
- machineconfig/setup_linux/web_shortcuts/interactive.sh +10 -10
- machineconfig/setup_windows/web_shortcuts/interactive.ps1 +10 -10
- machineconfig/utils/files/headers.py +2 -2
- machineconfig/utils/installer_utils/installer_class.py +38 -24
- machineconfig/utils/installer_utils/{installer.py → installer_cli.py} +29 -15
- machineconfig/utils/{installer.py → installer_utils/installer_runner.py} +1 -25
- machineconfig/utils/options.py +1 -1
- machineconfig/utils/path_extended.py +2 -2
- machineconfig/utils/path_helper.py +34 -31
- machineconfig/utils/ssh.py +1 -1
- {machineconfig-7.58.dist-info → machineconfig-7.59.dist-info}/METADATA +1 -1
- {machineconfig-7.58.dist-info → machineconfig-7.59.dist-info}/RECORD +53 -52
- 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.58.dist-info → machineconfig-7.59.dist-info}/WHEEL +0 -0
- {machineconfig-7.58.dist-info → machineconfig-7.59.dist-info}/entry_points.txt +0 -0
- {machineconfig-7.58.dist-info → machineconfig-7.59.dist-info}/top_level.txt +0 -0
|
@@ -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*")]
|
|
@@ -64,37 +64,18 @@ export NVM_DIR="$HOME/.nvm"
|
|
|
64
64
|
echo "📥 Installing latest Node.js..."
|
|
65
65
|
nvm install node || true
|
|
66
66
|
|
|
67
|
-
# --GROUP:TerminalEyeCandy:fortune,toilet,sl,aafire,cmatrix,hollywood,chafa
|
|
68
|
-
# echo "📥 Installing fortune - random wisdom generator..."
|
|
69
|
-
# echo "📥 Installing toilet - large ASCII text generator..."
|
|
70
|
-
# echo "📥 Installing sl - steam locomotive animation..."
|
|
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
|
|
84
67
|
# echo 'keyboard-configuration keyboard-configuration/layout select US English' | sudo debconf-set-selections
|
|
85
68
|
# echo 'keyboard-configuration keyboard-configuration/layoutcode string us' | sudo debconf-set-selections
|
|
86
69
|
# sudo DEBIAN_FRONTEND=noninteractive nala install -y cmatrix
|
|
87
70
|
# sudo nala install hollywood -y || true
|
|
88
|
-
|
|
89
|
-
# --GROUP:net: sshfs,samba,fuse3,nfs-common
|
|
90
71
|
sudo nala install samba
|
|
91
72
|
sudo nala install fuse3 -y || true
|
|
92
73
|
sudo nala install nfs-common -y || true
|
|
93
|
-
# --GROUP:dev: graphviz,make,rust,libssl-dev,sqlite3,postgresql-client,redis-tools
|
|
94
74
|
# sudo nala install ffmpeg -y || true # Required by some dev tools
|
|
95
75
|
# sudo nala install make -y || true # Required by LunarVim and SpaceVim
|
|
96
76
|
# (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh) || true
|
|
97
77
|
# sudo nala install libssl-dev -y
|
|
78
|
+
# sudo nala install libaa-bin -y
|
|
98
79
|
"""
|
|
99
80
|
|
|
100
81
|
|
|
@@ -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,
|
|
@@ -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.59" """
|
|
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.59" """
|
|
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.59"
|
|
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.59" """
|
|
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)}"
|
|
@@ -15,7 +15,7 @@ def install(which: Annotated[Optional[str], typer.Argument(..., help="Comma-sepa
|
|
|
15
15
|
interactive: Annotated[bool, typer.Option(..., "--interactive", "-ia", 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
|
|
|
@@ -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.59" """)
|
|
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.59" """)
|
|
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.59,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
|
|
@@ -40,7 +40,7 @@ def web_file_explorer(
|
|
|
40
40
|
over_internet: Annotated[bool, typer.Option("--over-internet", "-i", help="Expose the share server over the internet using ngrok")] = False,
|
|
41
41
|
backend: Annotated[str, typer.Option("--backend", "-b", help="Backend to use: filebrowser (default), miniserve, or easy-sharing")] = "filebrowser"
|
|
42
42
|
) -> None:
|
|
43
|
-
from machineconfig.utils.installer_utils.
|
|
43
|
+
from machineconfig.utils.installer_utils.installer_cli import install_if_missing
|
|
44
44
|
|
|
45
45
|
if backend not in ["filebrowser", "miniserve", "easy-sharing"]:
|
|
46
46
|
typer.echo(f"❌ ERROR: Invalid backend '{backend}'. Must be one of: filebrowser, miniserve, easy-sharing", err=True)
|
|
@@ -60,7 +60,7 @@ def main(
|
|
|
60
60
|
ssl_ca: Annotated[Optional[str], typer.Option("--ssl-ca", "-A", help="SSL CA file path for client certificate verification")] = None,
|
|
61
61
|
over_internet: Annotated[bool, typer.Option("--over-internet", "-i", help="Expose the terminal over the internet using ngrok")] = False
|
|
62
62
|
) -> None:
|
|
63
|
-
from machineconfig.utils.installer_utils.
|
|
63
|
+
from machineconfig.utils.installer_utils.installer_cli import install_if_missing
|
|
64
64
|
install_if_missing("ttyd")
|
|
65
65
|
if over_internet: install_if_missing("ngrok")
|
|
66
66
|
|
|
@@ -2,78 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import typer
|
|
4
4
|
from typing import Annotated, Optional
|
|
5
|
-
from pathlib import Path
|
|
6
|
-
|
|
7
|
-
def download(
|
|
8
|
-
url: Annotated[Optional[str], typer.Argument(..., help="The URL to download the file from.")] = None,
|
|
9
|
-
decompress: Annotated[bool, typer.Option("--decompress", "-d", help="Decompress the file if it's an archive.")] = False,
|
|
10
|
-
output: Annotated[Optional[str], typer.Option("--output", "-o", help="The output file path.")] = None,
|
|
11
|
-
) -> None:
|
|
12
|
-
if url is None:
|
|
13
|
-
typer.echo("❌ Error: URL is required.", err=True)
|
|
14
|
-
raise typer.Exit(code=1)
|
|
15
|
-
typer.echo(f"📥 Downloading from: {url}")
|
|
16
|
-
download_path = Path(output) if output else Path(url.split("/")[-1])
|
|
17
|
-
import requests
|
|
18
|
-
import subprocess
|
|
19
|
-
try:
|
|
20
|
-
response = requests.get(url, allow_redirects=True, stream=True, timeout=60)
|
|
21
|
-
response.raise_for_status()
|
|
22
|
-
|
|
23
|
-
total_size = int(response.headers.get('content-length', 0))
|
|
24
|
-
|
|
25
|
-
with open(download_path, 'wb') as f:
|
|
26
|
-
if total_size == 0:
|
|
27
|
-
f.write(response.content)
|
|
28
|
-
else:
|
|
29
|
-
downloaded = 0
|
|
30
|
-
chunk_size = 8192
|
|
31
|
-
for chunk in response.iter_content(chunk_size=chunk_size):
|
|
32
|
-
if chunk:
|
|
33
|
-
f.write(chunk)
|
|
34
|
-
downloaded += len(chunk)
|
|
35
|
-
progress = (downloaded / total_size) * 100
|
|
36
|
-
typer.echo(f"\r⏬ Progress: {progress:.1f}% ({downloaded}/{total_size} bytes)", nl=False)
|
|
37
|
-
typer.echo()
|
|
38
|
-
|
|
39
|
-
typer.echo(f"✅ Downloaded to: {download_path}")
|
|
40
|
-
except requests.exceptions.RequestException as e:
|
|
41
|
-
typer.echo(f"❌ Download failed: {e}", err=True)
|
|
42
|
-
raise typer.Exit(code=1)
|
|
43
|
-
except OSError as e:
|
|
44
|
-
typer.echo(f"❌ File write error: {e}", err=True)
|
|
45
|
-
raise typer.Exit(code=1)
|
|
46
|
-
|
|
47
|
-
if decompress:
|
|
48
|
-
typer.echo(f"📦 Decompressing: {download_path}")
|
|
49
|
-
|
|
50
|
-
base_name = download_path.name
|
|
51
|
-
parts = base_name.split('.')
|
|
52
|
-
base_name = parts[0] if parts else download_path.stem
|
|
53
|
-
|
|
54
|
-
extract_dir = download_path.parent / base_name
|
|
55
|
-
extract_dir.mkdir(parents=True, exist_ok=True)
|
|
56
|
-
|
|
57
|
-
try:
|
|
58
|
-
subprocess.run(
|
|
59
|
-
["ouch", "decompress", str(download_path), "--dir", str(extract_dir)],
|
|
60
|
-
check=True,
|
|
61
|
-
capture_output=True,
|
|
62
|
-
text=True
|
|
63
|
-
)
|
|
64
|
-
typer.echo(f"✅ Decompressed to: {extract_dir}")
|
|
65
|
-
|
|
66
|
-
if download_path.exists():
|
|
67
|
-
download_path.unlink()
|
|
68
|
-
typer.echo(f"🗑️ Removed archive: {download_path}")
|
|
69
|
-
|
|
70
|
-
except subprocess.CalledProcessError as e:
|
|
71
|
-
typer.echo(f"❌ Decompression failed: {e.stderr}", err=True)
|
|
72
|
-
raise typer.Exit(code=1)
|
|
73
|
-
except FileNotFoundError:
|
|
74
|
-
typer.echo("❌ Error: ouch command not found. Please install ouch.", err=True)
|
|
75
|
-
typer.echo("💡 Install with: cargo install ouch", err=True)
|
|
76
|
-
raise typer.Exit(code=1)
|
|
77
5
|
|
|
78
6
|
|
|
79
7
|
def merge_pdfs(
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
# import subprocess
|
|
4
4
|
from machineconfig.utils.io import read_ini
|
|
5
|
-
from machineconfig.utils.path_extended import PathExtended
|
|
6
5
|
from machineconfig.utils.source_of_truth import LIBRARY_ROOT, DEFAULTS_PATH
|
|
7
6
|
from machineconfig.utils.code import print_code
|
|
8
7
|
from machineconfig.utils.options import choose_cloud_interactively, choose_from_options
|
|
@@ -11,6 +10,7 @@ from platform import system
|
|
|
11
10
|
from typing import Any, Literal, Optional
|
|
12
11
|
from rich.console import Console
|
|
13
12
|
from rich.panel import Panel
|
|
13
|
+
from pathlib import Path
|
|
14
14
|
import tomllib
|
|
15
15
|
|
|
16
16
|
|
|
@@ -56,13 +56,13 @@ def main_backup_retrieve(direction: OPTIONS, which: Optional[str], cloud: Option
|
|
|
56
56
|
flags += "e" if item["encrypt"] == "True" else ""
|
|
57
57
|
flags += "r" if item["rel2home"] == "True" else ""
|
|
58
58
|
flags += "o" if system().lower() in item_name else ""
|
|
59
|
-
console.print(Panel(f"📦 PROCESSING: {item_name}\n📂 Path: {
|
|
59
|
+
console.print(Panel(f"📦 PROCESSING: {item_name}\n📂 Path: {Path(item['path']).as_posix()}\n🏳️ Flags: {flags or 'None'}", title=f"[bold blue]Processing Item: {item_name}[/bold blue]", border_style="blue"))
|
|
60
60
|
if flags:
|
|
61
61
|
flags = "-" + flags
|
|
62
62
|
if direction == "BACKUP":
|
|
63
|
-
program += f"""\ncloud_copy "{
|
|
63
|
+
program += f"""\ncloud_copy "{Path(item["path"]).as_posix()}" $cloud {flags}\n"""
|
|
64
64
|
elif direction == "RETRIEVE":
|
|
65
|
-
program += f"""\ncloud_copy $cloud "{
|
|
65
|
+
program += f"""\ncloud_copy $cloud "{Path(item["path"]).as_posix()}" {flags}\n"""
|
|
66
66
|
else:
|
|
67
67
|
console.print(Panel('❌ ERROR: INVALID DIRECTION\n⚠️ Direction must be either "BACKUP" or "RETRIEVE"', title="[bold red]Error: Invalid Direction[/bold red]", border_style="red"))
|
|
68
68
|
raise RuntimeError(f"Unknown direction: {direction}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from typing import Optional
|
|
2
2
|
import os
|
|
3
|
-
from
|
|
3
|
+
from pathlib import Path
|
|
4
4
|
import platform
|
|
5
5
|
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ def parse_pyfile(file_path: str):
|
|
|
12
12
|
func_args: list[list[args_spec]] = [[]] # this firt prepopulated dict is for the option 'RUN AS MAIN' which has no args
|
|
13
13
|
import ast
|
|
14
14
|
|
|
15
|
-
parsed_ast = ast.parse(
|
|
15
|
+
parsed_ast = ast.parse(Path(file_path).read_text(encoding="utf-8"))
|
|
16
16
|
functions = [node for node in ast.walk(parsed_ast) if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef))]
|
|
17
17
|
module__doc__ = ast.get_docstring(parsed_ast)
|
|
18
18
|
main_option = f"RUN AS MAIN -- {module__doc__ if module__doc__ is not None else 'NoDocs'}"
|
|
@@ -102,7 +102,6 @@ def wrap_import_in_try_except(import_line: str, pyfile: str, repo_root: Optional
|
|
|
102
102
|
print(fr"❌ Failed to import `{pyfile}` as a module: {ex} ")
|
|
103
103
|
print("⚠️ Attempting import with ad-hoc `$PATH` manipulation. DO NOT pickle any objects in this session as correct deserialization cannot be guaranteed.")
|
|
104
104
|
import sys
|
|
105
|
-
from pathlib import Path
|
|
106
105
|
sys.path.append(str(Path(pyfile).parent))
|
|
107
106
|
if repo_root is not None:
|
|
108
107
|
sys.path.append(repo_root)
|