bdh-linux 3.0.3__tar.gz → 3.1.0__tar.gz
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.
- {bdh_linux-3.0.3 → bdh_linux-3.1.0}/PKG-INFO +1 -1
- bdh_linux-3.1.0/bdh_linux/commands/setup.py +90 -0
- {bdh_linux-3.0.3 → bdh_linux-3.1.0}/bdh_linux/main.py +4 -3
- {bdh_linux-3.0.3 → bdh_linux-3.1.0}/bdh_linux.egg-info/PKG-INFO +1 -1
- {bdh_linux-3.0.3 → bdh_linux-3.1.0}/pyproject.toml +1 -1
- bdh_linux-3.0.3/bdh_linux/commands/setup.py +0 -75
- {bdh_linux-3.0.3 → bdh_linux-3.1.0}/bdh_linux/__init__.py +0 -0
- {bdh_linux-3.0.3 → bdh_linux-3.1.0}/bdh_linux/commands/install.py +0 -0
- {bdh_linux-3.0.3 → bdh_linux-3.1.0}/bdh_linux/commands/remove.py +0 -0
- {bdh_linux-3.0.3 → bdh_linux-3.1.0}/bdh_linux.egg-info/SOURCES.txt +0 -0
- {bdh_linux-3.0.3 → bdh_linux-3.1.0}/bdh_linux.egg-info/dependency_links.txt +0 -0
- {bdh_linux-3.0.3 → bdh_linux-3.1.0}/bdh_linux.egg-info/entry_points.txt +0 -0
- {bdh_linux-3.0.3 → bdh_linux-3.1.0}/bdh_linux.egg-info/requires.txt +0 -0
- {bdh_linux-3.0.3 → bdh_linux-3.1.0}/bdh_linux.egg-info/top_level.txt +0 -0
- {bdh_linux-3.0.3 → bdh_linux-3.1.0}/setup.cfg +0 -0
- {bdh_linux-3.0.3 → bdh_linux-3.1.0}/setup.py +0 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import typer
|
|
2
|
+
import subprocess
|
|
3
|
+
import os
|
|
4
|
+
from rich import print
|
|
5
|
+
|
|
6
|
+
app = typer.Typer(help="Setup bdh-linux components")
|
|
7
|
+
|
|
8
|
+
BASE_URL = "https://raw.githubusercontent.com/BackendDeveloperHub/bdh-linux/main"
|
|
9
|
+
|
|
10
|
+
def run(cmd: str):
|
|
11
|
+
subprocess.run(cmd, shell=True)
|
|
12
|
+
|
|
13
|
+
@app.command()
|
|
14
|
+
def terminal():
|
|
15
|
+
"""Setup ZSH + BDH prompt + aliases"""
|
|
16
|
+
print("[cyan]⚡ Setting up bdh-linux Terminal...[/cyan]")
|
|
17
|
+
print("=" * 30)
|
|
18
|
+
|
|
19
|
+
# Install ZSH
|
|
20
|
+
print("[yellow]📦 Installing ZSH...[/yellow]")
|
|
21
|
+
run("sudo pacman -S --noconfirm zsh git curl")
|
|
22
|
+
|
|
23
|
+
# Oh My Zsh
|
|
24
|
+
if not os.path.isdir(os.path.expanduser("~/.oh-my-zsh")):
|
|
25
|
+
print("[yellow]⚡ Installing Oh My Zsh...[/yellow]")
|
|
26
|
+
run("git clone --depth=1 https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh")
|
|
27
|
+
else:
|
|
28
|
+
print("[yellow]⚡ Oh My Zsh already exists, skipping...[/yellow]")
|
|
29
|
+
|
|
30
|
+
# Powerlevel10k
|
|
31
|
+
if not os.path.isdir(os.path.expanduser("~/.oh-my-zsh/custom/themes/powerlevel10k")):
|
|
32
|
+
print("[yellow]🎨 Installing Powerlevel10k...[/yellow]")
|
|
33
|
+
run("git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/custom/themes/powerlevel10k")
|
|
34
|
+
else:
|
|
35
|
+
print("[yellow]⚡ Powerlevel10k already exists, skipping...[/yellow]")
|
|
36
|
+
|
|
37
|
+
# Plugins
|
|
38
|
+
if not os.path.isdir(os.path.expanduser("~/.oh-my-zsh/custom/plugins/zsh-autosuggestions")):
|
|
39
|
+
run("git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions.git ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions")
|
|
40
|
+
|
|
41
|
+
if not os.path.isdir(os.path.expanduser("~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting")):
|
|
42
|
+
run("git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting")
|
|
43
|
+
|
|
44
|
+
# BDH Configs — curl வழியா
|
|
45
|
+
print("[yellow]🔧 Applying BDH configs...[/yellow]")
|
|
46
|
+
run(f"curl -fsSL {BASE_URL}/configs/.zshrc -o ~/.zshrc")
|
|
47
|
+
run(f"curl -fsSL {BASE_URL}/configs/aliases.sh -o ~/.aliases.sh")
|
|
48
|
+
|
|
49
|
+
# Shell மாத்த
|
|
50
|
+
run("sudo usermod -s /bin/zsh $USER")
|
|
51
|
+
|
|
52
|
+
print("")
|
|
53
|
+
print("[green]✅ Terminal setup done![/green]")
|
|
54
|
+
print("[green]💡 Run 'p10k configure' to customize prompt![/green]")
|
|
55
|
+
print("[green]⚡ Restart terminal to apply![/green]")
|
|
56
|
+
|
|
57
|
+
@app.command()
|
|
58
|
+
def packages():
|
|
59
|
+
"""Install all BDH packages"""
|
|
60
|
+
print("[cyan]⚡ Setting up BDH Packages...[/cyan]")
|
|
61
|
+
print("=" * 30)
|
|
62
|
+
run(f"curl -fsSL {BASE_URL}/scripts/install-packages.sh -o /tmp/install-packages.sh")
|
|
63
|
+
run("bash /tmp/install-packages.sh")
|
|
64
|
+
print("")
|
|
65
|
+
print("[green]✅ Packages setup done![/green]")
|
|
66
|
+
|
|
67
|
+
@app.command()
|
|
68
|
+
def git():
|
|
69
|
+
"""Setup Git global config"""
|
|
70
|
+
print("[cyan]⚡ Setting up Git...[/cyan]")
|
|
71
|
+
print("=" * 30)
|
|
72
|
+
name = typer.prompt("Your name")
|
|
73
|
+
email = typer.prompt("Your email")
|
|
74
|
+
run(f'git config --global user.name "{name}"')
|
|
75
|
+
run(f'git config --global user.email "{email}"')
|
|
76
|
+
run("git config --global init.defaultBranch main")
|
|
77
|
+
print("")
|
|
78
|
+
print("[green]✅ Git setup done![/green]")
|
|
79
|
+
|
|
80
|
+
@app.command()
|
|
81
|
+
def docker():
|
|
82
|
+
"""Install and setup Docker"""
|
|
83
|
+
print("[cyan]⚡ Setting up Docker...[/cyan]")
|
|
84
|
+
print("=" * 30)
|
|
85
|
+
run("sudo pacman -S --noconfirm docker docker-compose")
|
|
86
|
+
run("sudo systemctl enable docker")
|
|
87
|
+
run("sudo systemctl start docker")
|
|
88
|
+
run("sudo usermod -aG docker $USER")
|
|
89
|
+
print("")
|
|
90
|
+
print("[green]✅ Docker setup done![/green]")
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import typer
|
|
2
2
|
from rich import print
|
|
3
|
+
from importlib.metadata import version as get_version
|
|
3
4
|
from bdh_linux.commands import install, setup, remove
|
|
4
5
|
|
|
5
6
|
app = typer.Typer(
|
|
@@ -7,7 +8,6 @@ app = typer.Typer(
|
|
|
7
8
|
help="⚡ BDH Linux — Backend Developer OS setup tool",
|
|
8
9
|
)
|
|
9
10
|
|
|
10
|
-
# Sub commands
|
|
11
11
|
app.add_typer(install.app, name="install")
|
|
12
12
|
app.add_typer(setup.app, name="setup")
|
|
13
13
|
app.add_typer(remove.app, name="remove")
|
|
@@ -15,7 +15,8 @@ app.add_typer(remove.app, name="remove")
|
|
|
15
15
|
@app.command()
|
|
16
16
|
def version():
|
|
17
17
|
"""Show BDH Linux version"""
|
|
18
|
-
|
|
18
|
+
v = get_version("bdh-linux")
|
|
19
|
+
print(f"[cyan]⚡ bdh-linux v{v}[/cyan]")
|
|
19
20
|
print("[green]Backend Developer OS — Arch/Manjaro[/green]")
|
|
20
21
|
|
|
21
22
|
@app.command()
|
|
@@ -47,4 +48,4 @@ def doctor():
|
|
|
47
48
|
status()
|
|
48
49
|
|
|
49
50
|
if __name__ == "__main__":
|
|
50
|
-
app()
|
|
51
|
+
app()
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import typer
|
|
2
|
-
import subprocess
|
|
3
|
-
from rich import print
|
|
4
|
-
|
|
5
|
-
app = typer.Typer(help="Setup bdh-linux components")
|
|
6
|
-
|
|
7
|
-
def run(cmd: str):
|
|
8
|
-
subprocess.run(cmd, shell=True)
|
|
9
|
-
|
|
10
|
-
@app.command()
|
|
11
|
-
def terminal():
|
|
12
|
-
"""Setup ZSH + BDH prompt + aliases"""
|
|
13
|
-
print("[cyan]⚡ Setting up bdh-linux Terminal...[/cyan]")
|
|
14
|
-
print("=" * 30)
|
|
15
|
-
|
|
16
|
-
# Install ZSH
|
|
17
|
-
print("[yellow]📦 Installing ZSH...[/yellow]")
|
|
18
|
-
run("sudo pacman -S --noconfirm zsh")
|
|
19
|
-
|
|
20
|
-
# Oh My Zsh
|
|
21
|
-
print("[yellow]⚡ Installing Oh My Zsh...[/yellow]")
|
|
22
|
-
run('sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended')
|
|
23
|
-
|
|
24
|
-
# Copy configs
|
|
25
|
-
print("[yellow]🔧 Applying BDH configs...[/yellow]")
|
|
26
|
-
run("cp ~/.bdh-linux/configs/.zshrc ~/.zshrc")
|
|
27
|
-
run("cp ~/.bdh-linux/configs/aliases.sh ~/.aliases.sh")
|
|
28
|
-
|
|
29
|
-
# Set ZSH as default
|
|
30
|
-
run("chsh -s /bin/zsh")
|
|
31
|
-
|
|
32
|
-
print("")
|
|
33
|
-
print("[green]✅ Terminal setup done![/green]")
|
|
34
|
-
print("[green]Restart terminal to apply![/green]")
|
|
35
|
-
|
|
36
|
-
@app.command()
|
|
37
|
-
def packages():
|
|
38
|
-
"""Install all BDH packages"""
|
|
39
|
-
print("[cyan]⚡ Setting up BDH Packages...[/cyan]")
|
|
40
|
-
print("=" * 30)
|
|
41
|
-
|
|
42
|
-
run("bash ~/.bdh-linux/scripts/install-packages.sh")
|
|
43
|
-
|
|
44
|
-
print("")
|
|
45
|
-
print("[green]✅ Packages setup done![/green]")
|
|
46
|
-
|
|
47
|
-
@app.command()
|
|
48
|
-
def git():
|
|
49
|
-
"""Setup Git global config"""
|
|
50
|
-
print("[cyan]⚡ Setting up Git...[/cyan]")
|
|
51
|
-
print("=" * 30)
|
|
52
|
-
|
|
53
|
-
name = typer.prompt("Your name")
|
|
54
|
-
email = typer.prompt("Your email")
|
|
55
|
-
|
|
56
|
-
run(f'git config --global user.name "{name}"')
|
|
57
|
-
run(f'git config --global user.email "{email}"')
|
|
58
|
-
run("git config --global init.defaultBranch main")
|
|
59
|
-
|
|
60
|
-
print("")
|
|
61
|
-
print("[green]✅ Git setup done![/green]")
|
|
62
|
-
|
|
63
|
-
@app.command()
|
|
64
|
-
def docker():
|
|
65
|
-
"""Install and setup Docker"""
|
|
66
|
-
print("[cyan]⚡ Setting up Docker...[/cyan]")
|
|
67
|
-
print("=" * 30)
|
|
68
|
-
|
|
69
|
-
run("sudo pacman -S --noconfirm docker docker-compose")
|
|
70
|
-
run("sudo systemctl enable docker")
|
|
71
|
-
run("sudo systemctl start docker")
|
|
72
|
-
run("sudo usermod -aG docker $USER")
|
|
73
|
-
|
|
74
|
-
print("")
|
|
75
|
-
print("[green]✅ Docker setup done![/green]")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|