weehong revisó este gist 3 weeks ago. Ir a la revisión
1 file changed, 1 insertion, 1 deletion
README.md
| @@ -17,7 +17,7 @@ This script follows a **"Strict Official Source"** philosophy. It fetches binari | |||
| 17 | 17 | You can launch the interactive installer directly from your terminal with a single command: | |
| 18 | 18 | ||
| 19 | 19 | ```bash | |
| 20 | - | zsh -c "$(curl -fsSL https://tinyurl.com/4rskc9e7)" | |
| 20 | + | bash -c "$(curl -fsSL https://tinyurl.com/4rskc9e7)" | |
| 21 | 21 | ``` | |
| 22 | 22 | ||
| 23 | 23 | Once the menu loads, simply **follow the interactive prompts**. You can select multiple tools at once by entering space-separated numbers (e.g., `1 3 8 12`). | |
Vernon Wee Hong KOH revisó este gist 3 weeks ago. Ir a la revisión
2 files changed, 34 insertions, 16 deletions
README.md
| @@ -9,7 +9,7 @@ This script follows a **"Strict Official Source"** philosophy. It fetches binari | |||
| 9 | 9 | * **Zero-Brew Dependency:** By default, it bypasses Homebrew entirely, using official APIs, release pages, and signed OS repositories (Homebrew is available as an optional install). | |
| 10 | 10 | * **Idempotent:** Safe to run multiple times. It intelligently checks if a tool is already installed before attempting to download it. | |
| 11 | 11 | * **Dynamic Versioning:** Uses official APIs (like GitHub Releases or `go.dev/VERSION`) when maintainers publish versioned binaries. OS-packaged tools track the supported distribution version and security updates. | |
| 12 | - | * **Auto-Path Management:** Intelligently injects paths into a dedicated `~/.pathrc` (or your `.bashrc`/`.zshrc`) without mangling your config files. | |
| 12 | + | * **Auto-Path Management:** Consistently writes installed-tool paths to `~/.zshrc`, regardless of which shell launches the installer. | |
| 13 | 13 | * **Architecture Aware:** Automatically detects if you are running on Intel (`x86_64`) or Apple Silicon/ARM (`aarch64`/`arm64`) and downloads the correct binaries. | |
| 14 | 14 | ||
| 15 | 15 | ## 🚀 Usage | |
| @@ -17,7 +17,7 @@ This script follows a **"Strict Official Source"** philosophy. It fetches binari | |||
| 17 | 17 | You can launch the interactive installer directly from your terminal with a single command: | |
| 18 | 18 | ||
| 19 | 19 | ```bash | |
| 20 | - | bash -c "$(curl -fsSL https://tinyurl.com/4rskc9e7)" | |
| 20 | + | zsh -c "$(curl -fsSL https://tinyurl.com/4rskc9e7)" | |
| 21 | 21 | ``` | |
| 22 | 22 | ||
| 23 | 23 | Once the menu loads, simply **follow the interactive prompts**. You can select multiple tools at once by entering space-separated numbers (e.g., `1 3 8 12`). | |
| @@ -64,7 +64,7 @@ Choose **19) Update All Installed Software** to update every detected tool in th | |||
| 64 | 64 | ||
| 65 | 65 | ## ⚠️ Important Notes & Troubleshooting | |
| 66 | 66 | ||
| 67 | - | * **Restart Your Shell:** After running the script for the first time, you should restart your terminal or run `source ~/.bashrc` (or `~/.zshrc`) to ensure all new PATH variables (like NVM, Go, or .NET) take effect. | |
| 67 | + | * **Restart Your Shell:** After running the script for the first time, restart your terminal or run `source ~/.zshrc` to ensure all new PATH variables (like NVM, Go, or .NET) take effect. | |
| 68 | 68 | * **Docker Permissions (Linux):** The script automatically adds your user to the `docker` group. You will need to log out and log back in for this to take effect. | |
| 69 | 69 | * **AWS CLI on Linux:** Ensure you install **Build Tools (Option 1)** first if you are on a fresh Linux install, as the AWS installer requires `unzip` to extract the payload. | |
| 70 | 70 | * **Python Version on Linux:** Python follows the version supported by your distribution rather than the newest python.org patch release. This keeps installation precompiled, vendor-supported, and eligible for normal OS security updates. | |
menu.sh
| @@ -24,21 +24,18 @@ fi | |||
| 24 | 24 | set -u | |
| 25 | 25 | ||
| 26 | 26 | # ======================================================= | |
| 27 | - | # 2. CROSS-SHELL NORMALIZATION | |
| 27 | + | # 2. SHELL NORMALIZATION | |
| 28 | 28 | # ======================================================= | |
| 29 | + | PROFILE_FILE="$HOME/.zshrc" | |
| 30 | + | ||
| 29 | 31 | if [ -n "${ZSH_VERSION:-}" ]; then | |
| 30 | 32 | # Zsh: Enable Bash-like word splitting for unquoted variables (menu input) | |
| 31 | 33 | setopt shwordsplit 2>/dev/null || true | |
| 32 | 34 | CURRENT_SHELL="zsh" | |
| 33 | - | PROFILE_FILE="$HOME/.zshrc" | |
| 34 | 35 | elif [ -n "${BASH_VERSION:-}" ]; then | |
| 35 | - | # Bash | |
| 36 | 36 | CURRENT_SHELL="bash" | |
| 37 | - | PROFILE_FILE="$HOME/.bashrc" | |
| 38 | 37 | else | |
| 39 | - | # Fallback POSIX | |
| 40 | 38 | CURRENT_SHELL="sh" | |
| 41 | - | PROFILE_FILE="$HOME/.profile" | |
| 42 | 39 | fi | |
| 43 | 40 | ||
| 44 | 41 | # ======================================================= | |
| @@ -249,17 +246,34 @@ install_python() { | |||
| 249 | 246 | ||
| 250 | 247 | install_go() { | |
| 251 | 248 | log "Fetching latest Go version from official source..." | |
| 252 | - | LATEST_GO=$(curl -sL https://go.dev/VERSION?m=text | head -n 1) | |
| 249 | + | LATEST_GO=$(curl -fsSL 'https://go.dev/VERSION?m=text' | head -n 1) || { | |
| 250 | + | err "Could not determine the latest Go version." | |
| 251 | + | return 1 | |
| 252 | + | } | |
| 253 | 253 | TAR_FILE="${LATEST_GO}.${OS_LOWER}-${SYS_ARCH}.tar.gz" | |
| 254 | + | ||
| 255 | + | if [[ -x /usr/local/go/bin/go ]] && [[ "$(/usr/local/go/bin/go version)" == "go version $LATEST_GO "* ]]; then | |
| 256 | + | warn "$LATEST_GO is already installed." | |
| 257 | + | add_to_path_config "GO_BIN" 'export PATH="$PATH:/usr/local/go/bin"' | |
| 258 | + | return 0 | |
| 259 | + | fi | |
| 254 | 260 | ||
| 255 | 261 | log "Downloading $TAR_FILE..." | |
| 256 | - | curl -fsSL -o /tmp/go.tar.gz "https://go.dev/dl/$TAR_FILE" | |
| 262 | + | curl -fsSL -o /tmp/go.tar.gz "https://go.dev/dl/$TAR_FILE" || { | |
| 263 | + | err "Failed to download $TAR_FILE." | |
| 264 | + | rm -f /tmp/go.tar.gz | |
| 265 | + | return 1 | |
| 266 | + | } | |
| 257 | 267 | ||
| 258 | 268 | log "Installing to /usr/local/go..." | |
| 259 | - | sudo rm -rf /usr/local/go | |
| 260 | - | sudo tar -C /usr/local -xzf /tmp/go.tar.gz | |
| 261 | - | rm /tmp/go.tar.gz | |
| 269 | + | if ! sudo rm -rf /usr/local/go || ! sudo tar -C /usr/local -xzf /tmp/go.tar.gz; then | |
| 270 | + | err "Go installation failed. Run this installer from an interactive terminal so sudo can authenticate." | |
| 271 | + | rm -f /tmp/go.tar.gz | |
| 272 | + | return 1 | |
| 273 | + | fi | |
| 274 | + | rm -f /tmp/go.tar.gz | |
| 262 | 275 | add_to_path_config "GO_BIN" 'export PATH="$PATH:/usr/local/go/bin"' | |
| 276 | + | log "$(/usr/local/go/bin/go version) installed successfully." | |
| 263 | 277 | } | |
| 264 | 278 | ||
| 265 | 279 | install_sdkman() { | |
| @@ -723,7 +737,11 @@ while true; do | |||
| 723 | 737 | ||
| 724 | 738 | # Bulletproof prompt for both Bash and Zsh | |
| 725 | 739 | printf "Select options (space-separated): " | |
| 726 | - | read input | |
| 740 | + | if ! read input; then | |
| 741 | + | printf "\n" | |
| 742 | + | warn "Input closed. Exiting installer." | |
| 743 | + | exit 0 | |
| 744 | + | fi | |
| 727 | 745 | ||
| 728 | 746 | # Thanks to 'setopt shwordsplit' in Zsh, this behaves perfectly across both shells | |
| 729 | 747 | for choice in $input; do | |
| @@ -764,5 +782,5 @@ while true; do | |||
| 764 | 782 | done | |
| 765 | 783 | ||
| 766 | 784 | printf "Press Enter to continue..." | |
| 767 | - | read dummy | |
| 785 | + | read dummy || exit 0 | |
| 768 | 786 | done | |
Vernon Wee Hong KOH revisó este gist 3 weeks ago. Ir a la revisión
2 files changed, 23 insertions
README.md
| @@ -59,6 +59,8 @@ Choose **19) Update All Installed Software** to update every detected tool in th | |||
| 59 | 59 | * **Claude Code CLI:** Anthropic's official agent. | |
| 60 | 60 | * **OpenAI Codex CLI:** Required NVM/Node.js to run. | |
| 61 | 61 | * **OpenCode:** AI agent orchestration installed from the official OpenCode installer. | |
| 62 | + | * **Augment Code CLI (Auggie):** Installed from Augment's official NPM package; requires Node.js 20 or later. | |
| 63 | + | * **CodeRabbit CLI:** Local AI code reviews installed from CodeRabbit's official installer. | |
| 62 | 64 | ||
| 63 | 65 | ## ⚠️ Important Notes & Troubleshooting | |
| 64 | 66 | ||
menu.sh
| @@ -547,6 +547,19 @@ install_codex() { | |||
| 547 | 547 | npm i -g @openai/codex | |
| 548 | 548 | } | |
| 549 | 549 | ||
| 550 | + | install_augment() { | |
| 551 | + | if require_cmd auggie; then warn "Augment Code CLI exists"; return; fi | |
| 552 | + | log "Installing Augment Code CLI (Auggie)..." | |
| 553 | + | if ! require_cmd npm; then err "Node.js 20+/NPM is required. Install NVM (3) first."; return 1; fi | |
| 554 | + | npm install -g @augmentcode/auggie | |
| 555 | + | } | |
| 556 | + | ||
| 557 | + | install_coderabbit() { | |
| 558 | + | if require_cmd coderabbit || require_cmd cr; then warn "CodeRabbit CLI exists"; return; fi | |
| 559 | + | log "Installing CodeRabbit CLI..." | |
| 560 | + | curl -fsSL https://cli.coderabbit.ai/install.sh | sh | |
| 561 | + | } | |
| 562 | + | ||
| 550 | 563 | update_all() { | |
| 551 | 564 | log "Updating all installed software from official sources..." | |
| 552 | 565 | ||
| @@ -655,6 +668,10 @@ update_all() { | |||
| 655 | 668 | require_cmd claude && { curl -fsSL https://claude.ai/install.sh | $CURRENT_SHELL; } | |
| 656 | 669 | require_cmd codex && npm install -g @openai/codex@latest | |
| 657 | 670 | require_cmd opencode && { curl -fsSL https://opencode.ai/install | $CURRENT_SHELL; } | |
| 671 | + | require_cmd auggie && npm install -g @augmentcode/auggie@latest | |
| 672 | + | if require_cmd coderabbit || require_cmd cr; then | |
| 673 | + | curl -fsSL https://cli.coderabbit.ai/install.sh | sh | |
| 674 | + | fi | |
| 658 | 675 | ||
| 659 | 676 | log "Finished updating installed software. Review any warnings or errors above." | |
| 660 | 677 | } | |
| @@ -693,6 +710,8 @@ show_menu() { | |||
| 693 | 710 | printf " 16) Claude Code CLI\n" | |
| 694 | 711 | printf " 17) OpenAI Codex CLI\n" | |
| 695 | 712 | printf " 18) OpenCode\n" | |
| 713 | + | printf " 20) Augment Code CLI (Auggie)\n" | |
| 714 | + | printf " 21) CodeRabbit CLI\n" | |
| 696 | 715 | printf "${BLUE}==================================================${NC}\n" | |
| 697 | 716 | printf " 19) Update All Installed Software\n" | |
| 698 | 717 | printf " 99) Quit & Refresh Shell\n" | |
| @@ -728,6 +747,8 @@ while true; do | |||
| 728 | 747 | 17) install_codex ;; | |
| 729 | 748 | 18) install_opencode ;; | |
| 730 | 749 | 19) update_all ;; | |
| 750 | + | 20) install_augment ;; | |
| 751 | + | 21) install_coderabbit ;; | |
| 731 | 752 | 99) | |
| 732 | 753 | log "Installation complete! Refreshing terminal environment..." | |
| 733 | 754 | ||
weehong revisó este gist 3 weeks ago. Ir a la revisión
2 files changed, 116 insertions
README.md
| @@ -22,6 +22,8 @@ bash -c "$(curl -fsSL https://tinyurl.com/4rskc9e7)" | |||
| 22 | 22 | ||
| 23 | 23 | Once the menu loads, simply **follow the interactive prompts**. You can select multiple tools at once by entering space-separated numbers (e.g., `1 3 8 12`). | |
| 24 | 24 | ||
| 25 | + | Choose **19) Update All Installed Software** to update every detected tool in the menu from its official source. Tools that are not installed are skipped. | |
| 26 | + | ||
| 25 | 27 | ## 🛠️ Included Tools | |
| 26 | 28 | ||
| 27 | 29 | ### Essentials & Package Managers | |
menu.sh
| @@ -547,6 +547,118 @@ install_codex() { | |||
| 547 | 547 | npm i -g @openai/codex | |
| 548 | 548 | } | |
| 549 | 549 | ||
| 550 | + | update_all() { | |
| 551 | + | log "Updating all installed software from official sources..." | |
| 552 | + | ||
| 553 | + | if require_cmd apt-get; then | |
| 554 | + | sudo apt-get update && sudo apt-get install -y --only-upgrade \ | |
| 555 | + | build-essential curl wget git jq unzip libssl-dev zlib1g-dev libffi-dev libsqlite3-dev \ | |
| 556 | + | python3 python3-pip python3-venv | |
| 557 | + | elif require_cmd dnf; then | |
| 558 | + | sudo dnf upgrade -y python3 python3-pip | |
| 559 | + | elif require_cmd zypper; then | |
| 560 | + | sudo zypper --non-interactive update python3 python3-pip | |
| 561 | + | elif require_cmd pacman; then | |
| 562 | + | sudo pacman -Syu --noconfirm python python-pip | |
| 563 | + | elif require_cmd apk; then | |
| 564 | + | sudo apk upgrade | |
| 565 | + | fi | |
| 566 | + | ||
| 567 | + | if [[ "$OS" == "macOS" ]] && require_cmd python3; then | |
| 568 | + | install_python | |
| 569 | + | fi | |
| 570 | + | ||
| 571 | + | require_cmd brew && { brew update && brew upgrade; } | |
| 572 | + | ||
| 573 | + | if [[ -s "$HOME/.nvm/nvm.sh" ]]; then | |
| 574 | + | set +u | |
| 575 | + | export NVM_DIR="$HOME/.nvm" | |
| 576 | + | LATEST_NVM=$(curl -fsSL https://api.github.com/repos/nvm-sh/nvm/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') | |
| 577 | + | curl -fsSL "https://raw.githubusercontent.com/nvm-sh/nvm/${LATEST_NVM}/install.sh" | PROFILE=/dev/null $CURRENT_SHELL | |
| 578 | + | \. "$NVM_DIR/nvm.sh" | |
| 579 | + | nvm install --lts --reinstall-packages-from=current | |
| 580 | + | nvm alias default 'lts/*' | |
| 581 | + | nvm use --lts | |
| 582 | + | set -u | |
| 583 | + | fi | |
| 584 | + | ||
| 585 | + | require_cmd go && install_go | |
| 586 | + | ||
| 587 | + | if [[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]]; then | |
| 588 | + | set +u | |
| 589 | + | source "$HOME/.sdkman/bin/sdkman-init.sh" | |
| 590 | + | sdk selfupdate force | |
| 591 | + | sdk upgrade | |
| 592 | + | set -u | |
| 593 | + | fi | |
| 594 | + | ||
| 595 | + | if require_cmd dotnet; then | |
| 596 | + | curl -fsSL https://dot.net/v1/dotnet-install.sh | $CURRENT_SHELL | |
| 597 | + | fi | |
| 598 | + | ||
| 599 | + | local sdkmanager="${ANDROID_SDK_ROOT:-${ANDROID_HOME:-$HOME/Android/Sdk}}/cmdline-tools/latest/bin/sdkmanager" | |
| 600 | + | if [[ -x "$sdkmanager" ]]; then | |
| 601 | + | yes | "$sdkmanager" --licenses >/dev/null || true | |
| 602 | + | "$sdkmanager" --update | |
| 603 | + | fi | |
| 604 | + | ||
| 605 | + | if require_cmd docker; then | |
| 606 | + | if [[ "$OS" == "macOS" ]]; then | |
| 607 | + | docker desktop update || warn "Update Docker Desktop from its application menu." | |
| 608 | + | else | |
| 609 | + | curl -fsSL https://get.docker.com | sudo sh | |
| 610 | + | fi | |
| 611 | + | fi | |
| 612 | + | ||
| 613 | + | if require_cmd docker && docker ps -a --format '{{.Names}}' | grep -Fxq portainer; then | |
| 614 | + | log "Updating Portainer CE..." | |
| 615 | + | docker pull portainer/portainer-ce:sts && \ | |
| 616 | + | docker stop portainer && \ | |
| 617 | + | docker rm portainer && \ | |
| 618 | + | docker run -d \ | |
| 619 | + | -p 8000:8000 \ | |
| 620 | + | -p 9443:9443 \ | |
| 621 | + | --name portainer \ | |
| 622 | + | --restart=always \ | |
| 623 | + | -v /var/run/docker.sock:/var/run/docker.sock \ | |
| 624 | + | -v portainer_data:/data \ | |
| 625 | + | portainer/portainer-ce:sts | |
| 626 | + | fi | |
| 627 | + | ||
| 628 | + | if require_cmd aws; then | |
| 629 | + | if [[ "$OS" == "macOS" ]]; then | |
| 630 | + | curl -fsSL -o /tmp/AWSCLIV2.pkg https://awscli.amazonaws.com/AWSCLIV2.pkg && \ | |
| 631 | + | sudo installer -pkg /tmp/AWSCLIV2.pkg -target / | |
| 632 | + | rm -f /tmp/AWSCLIV2.pkg | |
| 633 | + | elif require_cmd unzip; then | |
| 634 | + | curl -fsSL -o /tmp/awscliv2.zip "https://awscli.amazonaws.com/awscli-exe-linux-${AWS_ARCH}.zip" && \ | |
| 635 | + | rm -rf /tmp/aws && unzip -q /tmp/awscliv2.zip -d /tmp && \ | |
| 636 | + | sudo /tmp/aws/install --update | |
| 637 | + | rm -rf /tmp/aws /tmp/awscliv2.zip | |
| 638 | + | fi | |
| 639 | + | fi | |
| 640 | + | ||
| 641 | + | require_cmd gcloud && gcloud components update --quiet | |
| 642 | + | require_cmd firebase && npm install -g firebase-tools@latest | |
| 643 | + | ||
| 644 | + | if require_cmd gh; then | |
| 645 | + | log "Updating GitHub CLI..." | |
| 646 | + | LATEST_GH=$(curl -s https://api.github.com/repos/cli/cli/releases/latest | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') | |
| 647 | + | TAR_NAME="gh_${LATEST_GH}_${OS_LOWER}_${SYS_ARCH}" | |
| 648 | + | curl -fsSL -o /tmp/gh.tar.gz "https://github.com/cli/cli/releases/download/v${LATEST_GH}/${TAR_NAME}.tar.gz" && \ | |
| 649 | + | tar -xzf /tmp/gh.tar.gz -C /tmp && \ | |
| 650 | + | sudo mv "/tmp/${TAR_NAME}/bin/gh" /usr/local/bin/ | |
| 651 | + | sudo rm -rf "/tmp/${TAR_NAME}" /tmp/gh.tar.gz | |
| 652 | + | fi | |
| 653 | + | ||
| 654 | + | require_cmd infisical && npm install -g @infisical/cli@latest | |
| 655 | + | require_cmd claude && { curl -fsSL https://claude.ai/install.sh | $CURRENT_SHELL; } | |
| 656 | + | require_cmd codex && npm install -g @openai/codex@latest | |
| 657 | + | require_cmd opencode && { curl -fsSL https://opencode.ai/install | $CURRENT_SHELL; } | |
| 658 | + | ||
| 659 | + | log "Finished updating installed software. Review any warnings or errors above." | |
| 660 | + | } | |
| 661 | + | ||
| 550 | 662 | # ======================================================= | |
| 551 | 663 | # MENU LOGIC | |
| 552 | 664 | # ======================================================= | |
| @@ -582,6 +694,7 @@ show_menu() { | |||
| 582 | 694 | printf " 17) OpenAI Codex CLI\n" | |
| 583 | 695 | printf " 18) OpenCode\n" | |
| 584 | 696 | printf "${BLUE}==================================================${NC}\n" | |
| 697 | + | printf " 19) Update All Installed Software\n" | |
| 585 | 698 | printf " 99) Quit & Refresh Shell\n" | |
| 586 | 699 | printf "${BLUE}==================================================${NC}\n" | |
| 587 | 700 | } | |
| @@ -614,6 +727,7 @@ while true; do | |||
| 614 | 727 | 16) install_claude ;; | |
| 615 | 728 | 17) install_codex ;; | |
| 616 | 729 | 18) install_opencode ;; | |
| 730 | + | 19) update_all ;; | |
| 617 | 731 | 99) | |
| 618 | 732 | log "Installation complete! Refreshing terminal environment..." | |
| 619 | 733 | ||
weehong revisó este gist 3 weeks ago. Ir a la revisión
2 files changed, 43 insertions, 63 deletions
README.md
| @@ -2,13 +2,13 @@ | |||
| 2 | 2 | ||
| 3 | 3 | A robust, idempotent, and interactive bash script to bootstrap your macOS, Linux, or WSL development environment. | |
| 4 | 4 | ||
| 5 | - | Unlike standard setup scripts that rely heavily on package managers like Homebrew or Apt (which can introduce bloat, dependency hell, or outdated packages), this script is designed with a **"Strict Official Source"** philosophy. It dynamically fetches the absolute latest binaries and pre-compiled releases directly from the official maintainers (e.g., GitHub API, Python.org, Amazon). | |
| 5 | + | This script follows a **"Strict Official Source"** philosophy. It fetches binaries and installers directly from official maintainers, or from the operating system vendor's signed repositories when upstream does not publish native binaries for that platform. | |
| 6 | 6 | ||
| 7 | 7 | ## ✨ Key Features | |
| 8 | 8 | ||
| 9 | - | * **Zero-Brew Dependency:** By default, it bypasses Homebrew entirely, fetching tools directly from official APIs and release pages (Homebrew is available as an optional install). | |
| 9 | + | * **Zero-Brew Dependency:** By default, it bypasses Homebrew entirely, using official APIs, release pages, and signed OS repositories (Homebrew is available as an optional install). | |
| 10 | 10 | * **Idempotent:** Safe to run multiple times. It intelligently checks if a tool is already installed before attempting to download it. | |
| 11 | - | * **Dynamic Versioning:** Pings official APIs (like GitHub Releases or `go.dev/VERSION`) to ensure you are downloading the exact latest version at the time of execution. | |
| 11 | + | * **Dynamic Versioning:** Uses official APIs (like GitHub Releases or `go.dev/VERSION`) when maintainers publish versioned binaries. OS-packaged tools track the supported distribution version and security updates. | |
| 12 | 12 | * **Auto-Path Management:** Intelligently injects paths into a dedicated `~/.pathrc` (or your `.bashrc`/`.zshrc`) without mangling your config files. | |
| 13 | 13 | * **Architecture Aware:** Automatically detects if you are running on Intel (`x86_64`) or Apple Silicon/ARM (`aarch64`/`arm64`) and downloads the correct binaries. | |
| 14 | 14 | ||
| @@ -30,7 +30,7 @@ Once the menu loads, simply **follow the interactive prompts**. You can select m | |||
| 30 | 30 | ||
| 31 | 31 | ### Languages & Runtimes | |
| 32 | 32 | * **NVM (Node Version Manager):** Includes interactive prompt to install LTS or Latest Node.js immediately. | |
| 33 | - | * **Python 3:** Fetches the latest stable `.pkg` for Mac or compiles strictly from source for Linux. | |
| 33 | + | * **Python 3:** Fetches Python.org's latest stable `.pkg` for macOS. Linux and WSL install precompiled Python, pip, and venv from the signed OS-vendor repository without source compilation or third-party repositories. | |
| 34 | 34 | * **Go:** Fetches the latest tarball and installs system-wide to `/usr/local/go`. | |
| 35 | 35 | * **SDKMAN:** For managing Java, Kotlin, and Gradle. | |
| 36 | 36 | * **.NET:** Installed via Microsoft's official script. | |
| @@ -63,6 +63,7 @@ Once the menu loads, simply **follow the interactive prompts**. You can select m | |||
| 63 | 63 | * **Restart Your Shell:** After running the script for the first time, you should restart your terminal or run `source ~/.bashrc` (or `~/.zshrc`) to ensure all new PATH variables (like NVM, Go, or .NET) take effect. | |
| 64 | 64 | * **Docker Permissions (Linux):** The script automatically adds your user to the `docker` group. You will need to log out and log back in for this to take effect. | |
| 65 | 65 | * **AWS CLI on Linux:** Ensure you install **Build Tools (Option 1)** first if you are on a fresh Linux install, as the AWS installer requires `unzip` to extract the payload. | |
| 66 | + | * **Python Version on Linux:** Python follows the version supported by your distribution rather than the newest python.org patch release. This keeps installation precompiled, vendor-supported, and eligible for normal OS security updates. | |
| 66 | 67 | ||
| 67 | 68 | --- | |
| 68 | 69 | *Built for developers who want total control over their toolchain.* | |
menu.sh
| @@ -188,22 +188,19 @@ install_nvm() { | |||
| 188 | 188 | } | |
| 189 | 189 | ||
| 190 | 190 | install_python() { | |
| 191 | - | log "Fetching latest stable Python version..." | |
| 192 | - | ||
| 193 | - | LATEST_PY=$( | |
| 194 | - | curl -fsSL --compressed https://www.python.org/downloads/ | | |
| 195 | - | sed -nE 's/.*Download Python ([0-9]+\.[0-9]+\.[0-9]+).*/\1/p' | | |
| 196 | - | head -1 | |
| 197 | - | ) | |
| 198 | - | ||
| 199 | - | if [[ -z "$LATEST_PY" ]]; then | |
| 200 | - | err "Could not detect the latest stable Python version from python.org." | |
| 201 | - | return 1 | |
| 202 | - | fi | |
| 203 | - | ||
| 204 | - | log "Detected Stable Version: $LATEST_PY" | |
| 205 | - | ||
| 206 | 191 | if [[ "$OS" == "macOS" ]]; then | |
| 192 | + | log "Fetching latest stable Python version..." | |
| 193 | + | LATEST_PY=$( | |
| 194 | + | curl -fsSL --compressed https://www.python.org/downloads/ | | |
| 195 | + | sed -nE 's/.*Download Python ([0-9]+\.[0-9]+\.[0-9]+).*/\1/p' | | |
| 196 | + | head -1 | |
| 197 | + | ) | |
| 198 | + | if [[ -z "$LATEST_PY" ]]; then | |
| 199 | + | err "Could not detect the latest stable Python version from python.org." | |
| 200 | + | return 1 | |
| 201 | + | fi | |
| 202 | + | ||
| 203 | + | log "Detected Stable Version: $LATEST_PY" | |
| 207 | 204 | log "Downloading official macOS package..." | |
| 208 | 205 | PKG_URL="https://www.python.org/ftp/python/${LATEST_PY}/python-${LATEST_PY}-macos11.pkg" | |
| 209 | 206 | curl -fsSL --compressed -o /tmp/python.pkg "$PKG_URL" || { | |
| @@ -219,53 +216,35 @@ install_python() { | |||
| 219 | 216 | } | |
| 220 | 217 | rm /tmp/python.pkg | |
| 221 | 218 | else | |
| 222 | - | log "Installing build dependencies (zlib, ssl, etc)..." | |
| 223 | - | sudo apt-get update && sudo apt-get install -y build-essential zlib1g-dev libssl-dev libffi-dev libsqlite3-dev || { | |
| 224 | - | err "Failed to install Python build dependencies." | |
| 225 | - | return 1 | |
| 226 | - | } | |
| 227 | - | ||
| 228 | - | SRC_URL="https://www.python.org/ftp/python/${LATEST_PY}/Python-${LATEST_PY}.tgz" | |
| 229 | - | ||
| 230 | - | log "Downloading $SRC_URL..." | |
| 231 | - | curl -fSL --compressed -o /tmp/Python.tgz "$SRC_URL" || { | |
| 232 | - | err "Failed to download Python source from $SRC_URL" | |
| 233 | - | return 1 | |
| 234 | - | } | |
| 235 | - | ||
| 236 | - | cd /tmp && tar -xzf Python.tgz && cd "Python-${LATEST_PY}" || { | |
| 237 | - | err "Failed to extract Python source archive." | |
| 238 | - | return 1 | |
| 239 | - | } | |
| 240 | - | ||
| 241 | - | log "Configuring build (with ensurepip)..." | |
| 242 | - | ./configure --enable-optimizations --with-ensurepip=install || { | |
| 243 | - | err "Python configure step failed." | |
| 244 | - | return 1 | |
| 245 | - | } | |
| 246 | - | ||
| 247 | - | log "Compiling Python (this may take a few minutes)..." | |
| 248 | - | sudo make altinstall || { | |
| 249 | - | err "Python build/install step failed." | |
| 250 | - | return 1 | |
| 251 | - | } | |
| 252 | - | ||
| 253 | - | PY_MINOR=$(echo "$LATEST_PY" | cut -d. -f1,2) | |
| 254 | - | ||
| 255 | - | log "Setting up symlinks..." | |
| 256 | - | sudo ln -sf /usr/local/bin/python${PY_MINOR} /usr/local/bin/python3 | |
| 257 | - | ||
| 258 | - | if [[ -f "/usr/local/bin/pip${PY_MINOR}" ]]; then | |
| 259 | - | sudo ln -sf /usr/local/bin/pip${PY_MINOR} /usr/local/bin/pip3 | |
| 260 | - | log "Successfully linked pip3!" | |
| 219 | + | log "Installing precompiled Python from the official OS repository..." | |
| 220 | + | if require_cmd apt-get; then | |
| 221 | + | sudo apt-get update && \ | |
| 222 | + | sudo apt-get install -y python3 python3-pip python3-venv | |
| 223 | + | elif require_cmd dnf; then | |
| 224 | + | sudo dnf install -y python3 python3-pip | |
| 225 | + | elif require_cmd zypper; then | |
| 226 | + | sudo zypper --non-interactive install python3 python3-pip | |
| 227 | + | elif require_cmd pacman; then | |
| 228 | + | sudo pacman -Sy --needed python python-pip | |
| 229 | + | elif require_cmd apk; then | |
| 230 | + | sudo apk add python3 py3-pip py3-virtualenv | |
| 261 | 231 | else | |
| 262 | - | err "pip${PY_MINOR} was not generated during the build!" | |
| 232 | + | err "No supported official OS package manager found for Python." | |
| 233 | + | return 1 | |
| 263 | 234 | fi | |
| 264 | - | ||
| 265 | - | cd ~ && sudo rm -rf /tmp/Python* | |
| 266 | 235 | fi | |
| 267 | - | ||
| 268 | - | log "Python $LATEST_PY installation sequence finished!" | |
| 236 | + | ||
| 237 | + | require_cmd python3 || { err "python3 was not installed successfully."; return 1; } | |
| 238 | + | python3 -m pip --version >/dev/null 2>&1 || { | |
| 239 | + | err "pip is unavailable for the installed Python." | |
| 240 | + | return 1 | |
| 241 | + | } | |
| 242 | + | python3 -m venv --help >/dev/null 2>&1 || { | |
| 243 | + | err "venv is unavailable for the installed Python." | |
| 244 | + | return 1 | |
| 245 | + | } | |
| 246 | + | ||
| 247 | + | log "$(python3 --version) installed with pip and venv support." | |
| 269 | 248 | } | |
| 270 | 249 | ||
| 271 | 250 | install_go() { | |
Vernon Wee Hong KOH revisó este gist 1 month ago. Ir a la revisión
2 files changed, 9 insertions, 6 deletions
README.md
| @@ -44,7 +44,7 @@ Once the menu loads, simply **follow the interactive prompts**. You can select m | |||
| 44 | 44 | ||
| 45 | 45 | ### Cloud & App Platforms | |
| 46 | 46 | * **AWS CLI:** Fetches the official binaries directly from Amazon. | |
| 47 | - | * **Google Cloud CLI (gcloud):** Official Google setup script. | |
| 47 | + | * **Google Cloud CLI (gcloud):** Official Google setup script, installed at `/opt/google-cloud-sdk`. | |
| 48 | 48 | * **Firebase CLI:** Installs `firebase-tools` via NPM, so Node.js/NPM is required. | |
| 49 | 49 | ||
| 50 | 50 | ### Developer Productivity | |
menu.sh
| @@ -500,14 +500,17 @@ install_aws() { | |||
| 500 | 500 | } | |
| 501 | 501 | ||
| 502 | 502 | install_gcloud() { | |
| 503 | - | if require_cmd gcloud; then warn "Google Cloud CLI exists"; return; fi | |
| 504 | - | log "Installing Google Cloud CLI..." | |
| 505 | - | curl -fsSL https://sdk.cloud.google.com | $CURRENT_SHELL -s -- --disable-prompts | |
| 503 | + | local gcloud_dir="/opt/google-cloud-sdk" | |
| 504 | + | ||
| 505 | + | if [[ -x "$gcloud_dir/bin/gcloud" ]]; then warn "Google Cloud CLI exists at $gcloud_dir"; return; fi | |
| 506 | + | log "Installing Google Cloud CLI to $gcloud_dir..." | |
| 507 | + | curl -fsSL https://sdk.cloud.google.com | sudo bash -s -- --disable-prompts --install-dir=/opt | |
| 508 | + | sudo chown -R "$(id -u):$(id -g)" "$gcloud_dir" | |
| 506 | 509 | ||
| 507 | 510 | if [[ "$CURRENT_SHELL" == "zsh" ]]; then | |
| 508 | - | add_to_path_config "GCLOUD" '[ -f "$HOME/google-cloud-sdk/path.zsh.inc" ] && source "$HOME/google-cloud-sdk/path.zsh.inc"' | |
| 511 | + | add_to_path_config "GCLOUD" '[ -f "/opt/google-cloud-sdk/path.zsh.inc" ] && source "/opt/google-cloud-sdk/path.zsh.inc"' | |
| 509 | 512 | else | |
| 510 | - | add_to_path_config "GCLOUD" '[ -f "$HOME/google-cloud-sdk/path.bash.inc" ] && source "$HOME/google-cloud-sdk/path.bash.inc"' | |
| 513 | + | add_to_path_config "GCLOUD" '[ -f "/opt/google-cloud-sdk/path.bash.inc" ] && source "/opt/google-cloud-sdk/path.bash.inc"' | |
| 511 | 514 | fi | |
| 512 | 515 | } | |
| 513 | 516 | ||
Vernon Wee Hong KOH revisó este gist 1 month ago. Ir a la revisión
2 files changed, 5 insertions
README.md
| @@ -56,6 +56,7 @@ Once the menu loads, simply **follow the interactive prompts**. You can select m | |||
| 56 | 56 | ### AI & Agentic Tools | |
| 57 | 57 | * **Claude Code CLI:** Anthropic's official agent. | |
| 58 | 58 | * **OpenAI Codex CLI:** Required NVM/Node.js to run. | |
| 59 | + | * **OpenCode:** AI agent orchestration installed from the official OpenCode installer. | |
| 59 | 60 | ||
| 60 | 61 | ## ⚠️ Important Notes & Troubleshooting | |
| 61 | 62 | ||
menu.sh
| @@ -557,6 +557,8 @@ install_infisical() { | |||
| 557 | 557 | ||
| 558 | 558 | install_claude() { log "Installing Claude Code..."; curl -fsSL https://claude.ai/install.sh | $CURRENT_SHELL; } | |
| 559 | 559 | ||
| 560 | + | install_opencode() { log "Installing OpenCode..."; curl -fsSL https://opencode.ai/install | $CURRENT_SHELL; } | |
| 561 | + | ||
| 560 | 562 | install_codex() { | |
| 561 | 563 | log "Installing @openai/codex..." | |
| 562 | 564 | if ! require_cmd npm; then err "Node.js/NPM is required. Install NVM (3) first."; return 1; fi | |
| @@ -596,6 +598,7 @@ show_menu() { | |||
| 596 | 598 | printf "${YELLOW}--- AI & Agentic Tools ---${NC}\n" | |
| 597 | 599 | printf " 16) Claude Code CLI\n" | |
| 598 | 600 | printf " 17) OpenAI Codex CLI\n" | |
| 601 | + | printf " 18) OpenCode\n" | |
| 599 | 602 | printf "${BLUE}==================================================${NC}\n" | |
| 600 | 603 | printf " 99) Quit & Refresh Shell\n" | |
| 601 | 604 | printf "${BLUE}==================================================${NC}\n" | |
| @@ -628,6 +631,7 @@ while true; do | |||
| 628 | 631 | 15) install_infisical ;; | |
| 629 | 632 | 16) install_claude ;; | |
| 630 | 633 | 17) install_codex ;; | |
| 634 | + | 18) install_opencode ;; | |
| 631 | 635 | 99) | |
| 632 | 636 | log "Installation complete! Refreshing terminal environment..." | |
| 633 | 637 | ||
Vernon Wee Hong KOH revisó este gist 1 month ago. Ir a la revisión
2 files changed, 34 insertions, 21 deletions
README.md
| @@ -24,25 +24,34 @@ Once the menu loads, simply **follow the interactive prompts**. You can select m | |||
| 24 | 24 | ||
| 25 | 25 | ## 🛠️ Included Tools | |
| 26 | 26 | ||
| 27 | - | ### Core Runtimes & Managers | |
| 27 | + | ### Essentials & Package Managers | |
| 28 | 28 | * **Build Tools:** GCC, Make, Git, Curl, Unzip, and core libraries. | |
| 29 | 29 | * **Homebrew:** (Optional) Installed officially. | |
| 30 | + | ||
| 31 | + | ### Languages & Runtimes | |
| 30 | 32 | * **NVM (Node Version Manager):** Includes interactive prompt to install LTS or Latest Node.js immediately. | |
| 31 | 33 | * **Python 3:** Fetches the latest stable `.pkg` for Mac or compiles strictly from source for Linux. | |
| 32 | 34 | * **Go:** Fetches the latest tarball and installs system-wide to `/usr/local/go`. | |
| 33 | 35 | * **SDKMAN:** For managing Java, Kotlin, and Gradle. | |
| 34 | 36 | * **.NET:** Installed via Microsoft's official script. | |
| 35 | 37 | ||
| 36 | - | ### Cloud & Infrastructure | |
| 38 | + | ### Mobile Development | |
| 39 | + | * **Android SDK:** Installs command-line tools, platform tools, emulator, and current Android platform/build tools. | |
| 40 | + | ||
| 41 | + | ### Containers & Infrastructure | |
| 37 | 42 | * **Docker:** Downloads the official `.dmg` (macOS) or runs the official `get.docker.com` script (Linux) with auto-group assignment. | |
| 43 | + | * **Portainer:** Deploys Portainer CE as a Docker container with persistent storage. | |
| 44 | + | ||
| 45 | + | ### Cloud & App Platforms | |
| 38 | 46 | * **AWS CLI:** Fetches the official binaries directly from Amazon. | |
| 39 | 47 | * **Google Cloud CLI (gcloud):** Official Google setup script. | |
| 40 | - | * **Firebase CLI:** Standalone binary (no Node.js required natively). | |
| 41 | - | * **Portainer:** Deploys Portainer CE as a Docker container with persistent storage. | |
| 48 | + | * **Firebase CLI:** Installs `firebase-tools` via NPM, so Node.js/NPM is required. | |
| 42 | 49 | ||
| 43 | - | ### Dev Tools & Security | |
| 50 | + | ### Developer Productivity | |
| 44 | 51 | * **GitHub CLI (gh):** Downloaded directly from GitHub Releases to `/usr/local/bin`. | |
| 45 | - | * **Infisical CLI:** Downloaded directly from GitHub Releases for secret management. | |
| 52 | + | ||
| 53 | + | ### Secrets & Security | |
| 54 | + | * **Infisical CLI:** Installs `@infisical/cli` via NPM for secret management, so Node.js/NPM is required. | |
| 46 | 55 | ||
| 47 | 56 | ### AI & Agentic Tools | |
| 48 | 57 | * **Claude Code CLI:** Anthropic's official agent. | |
menu.sh
| @@ -571,24 +571,28 @@ show_menu() { | |||
| 571 | 571 | printf "${BLUE}==================================================${NC}\n" | |
| 572 | 572 | printf "${GREEN} DEVELOPER ENVIRONMENT INSTALLER (Polyglot) ${NC}\n" | |
| 573 | 573 | printf "${BLUE}==================================================${NC}\n" | |
| 574 | - | printf "${YELLOW}--- Core Runtimes & Managers ---${NC}\n" | |
| 575 | - | printf " 1) Build Tools (GCC/Make)\n" | |
| 574 | + | printf "${YELLOW}--- Essentials & Package Managers ---${NC}\n" | |
| 575 | + | printf " 1) Build Tools (GCC/Make/Git/Curl/Unzip)\n" | |
| 576 | 576 | printf " 2) Homebrew (Optional)\n" | |
| 577 | - | printf " 3) NVM (Node.js)\n" | |
| 578 | - | printf " 4) Python 3 (Official API)\n" | |
| 579 | - | printf " 5) Go (Official -> /usr/local)\n" | |
| 580 | - | printf " 6) SDKMAN (Java/Kotlin)\n" | |
| 581 | - | printf " 7) .NET (Official Script)\n" | |
| 577 | + | printf "${YELLOW}--- Languages & Runtimes ---${NC}\n" | |
| 578 | + | printf " 3) NVM + Node.js\n" | |
| 579 | + | printf " 4) Python 3\n" | |
| 580 | + | printf " 5) Go\n" | |
| 581 | + | printf " 6) SDKMAN (Java/Kotlin/Gradle)\n" | |
| 582 | + | printf " 7) .NET\n" | |
| 583 | + | printf "${YELLOW}--- Mobile Development ---${NC}\n" | |
| 582 | 584 | printf " 8) Android SDK (CLI + Platform Tools)\n" | |
| 583 | - | printf "${YELLOW}--- Cloud & Infrastructure ---${NC}\n" | |
| 584 | - | printf " 9) Docker (Official DMG/sh)\n" | |
| 585 | - | printf " 10) AWS CLI (Official Bin)\n" | |
| 586 | - | printf " 11) Google Cloud CLI (gcloud)\n" | |
| 587 | - | printf " 12) Firebase CLI (NPM/ARM64 Safe)\n" | |
| 585 | + | printf "${YELLOW}--- Containers & Infrastructure ---${NC}\n" | |
| 586 | + | printf " 9) Docker\n" | |
| 588 | 587 | printf " 13) Portainer (Docker UI)\n" | |
| 589 | - | printf "${YELLOW}--- Dev Tools & Security ---${NC}\n" | |
| 590 | - | printf " 14) GitHub CLI (Official Bin)\n" | |
| 591 | - | printf " 15) Infisical (Official Bin)\n" | |
| 588 | + | printf "${YELLOW}--- Cloud & App Platforms ---${NC}\n" | |
| 589 | + | printf " 10) AWS CLI\n" | |
| 590 | + | printf " 11) Google Cloud CLI (gcloud)\n" | |
| 591 | + | printf " 12) Firebase CLI\n" | |
| 592 | + | printf "${YELLOW}--- Developer Productivity ---${NC}\n" | |
| 593 | + | printf " 14) GitHub CLI\n" | |
| 594 | + | printf "${YELLOW}--- Secrets & Security ---${NC}\n" | |
| 595 | + | printf " 15) Infisical CLI\n" | |
| 592 | 596 | printf "${YELLOW}--- AI & Agentic Tools ---${NC}\n" | |
| 593 | 597 | printf " 16) Claude Code CLI\n" | |
| 594 | 598 | printf " 17) OpenAI Codex CLI\n" | |
Vernon Wee Hong KOH revisó este gist 1 month ago. Ir a la revisión
2 files changed, 2 insertions, 6 deletions
README.md
| @@ -46,7 +46,6 @@ Once the menu loads, simply **follow the interactive prompts**. You can select m | |||
| 46 | 46 | ||
| 47 | 47 | ### AI & Agentic Tools | |
| 48 | 48 | * **Claude Code CLI:** Anthropic's official agent. | |
| 49 | - | * **OpenCode:** AI agent orchestration. | |
| 50 | 49 | * **OpenAI Codex CLI:** Required NVM/Node.js to run. | |
| 51 | 50 | ||
| 52 | 51 | ## ⚠️ Important Notes & Troubleshooting | |
menu.sh
| @@ -556,7 +556,6 @@ install_infisical() { | |||
| 556 | 556 | # ======================================================= | |
| 557 | 557 | ||
| 558 | 558 | install_claude() { log "Installing Claude Code..."; curl -fsSL https://claude.ai/install.sh | $CURRENT_SHELL; } | |
| 559 | - | install_opencode() { log "Installing OpenCode..."; curl -fsSL https://opencode.ai/install | $CURRENT_SHELL; } | |
| 560 | 559 | ||
| 561 | 560 | install_codex() { | |
| 562 | 561 | log "Installing @openai/codex..." | |
| @@ -592,8 +591,7 @@ show_menu() { | |||
| 592 | 591 | printf " 15) Infisical (Official Bin)\n" | |
| 593 | 592 | printf "${YELLOW}--- AI & Agentic Tools ---${NC}\n" | |
| 594 | 593 | printf " 16) Claude Code CLI\n" | |
| 595 | - | printf " 17) OpenCode (opencode.ai)\n" | |
| 596 | - | printf " 18) OpenAI Codex CLI\n" | |
| 594 | + | printf " 17) OpenAI Codex CLI\n" | |
| 597 | 595 | printf "${BLUE}==================================================${NC}\n" | |
| 598 | 596 | printf " 99) Quit & Refresh Shell\n" | |
| 599 | 597 | printf "${BLUE}==================================================${NC}\n" | |
| @@ -625,8 +623,7 @@ while true; do | |||
| 625 | 623 | 14) install_gh ;; | |
| 626 | 624 | 15) install_infisical ;; | |
| 627 | 625 | 16) install_claude ;; | |
| 628 | - | 17) install_opencode ;; | |
| 629 | - | 18) install_codex ;; | |
| 626 | + | 17) install_codex ;; | |
| 630 | 627 | 99) | |
| 631 | 628 | log "Installation complete! Refreshing terminal environment..." | |
| 632 | 629 | ||
Vernon Wee Hong KOH revisó este gist 1 month ago. Ir a la revisión
2 files changed, 57 insertions, 11 deletions
README.md
| @@ -38,6 +38,7 @@ Once the menu loads, simply **follow the interactive prompts**. You can select m | |||
| 38 | 38 | * **AWS CLI:** Fetches the official binaries directly from Amazon. | |
| 39 | 39 | * **Google Cloud CLI (gcloud):** Official Google setup script. | |
| 40 | 40 | * **Firebase CLI:** Standalone binary (no Node.js required natively). | |
| 41 | + | * **Portainer:** Deploys Portainer CE as a Docker container with persistent storage. | |
| 41 | 42 | ||
| 42 | 43 | ### Dev Tools & Security | |
| 43 | 44 | * **GitHub CLI (gh):** Downloaded directly from GitHub Releases to `/usr/local/bin`. | |
| @@ -55,4 +56,4 @@ Once the menu loads, simply **follow the interactive prompts**. You can select m | |||
| 55 | 56 | * **AWS CLI on Linux:** Ensure you install **Build Tools (Option 1)** first if you are on a fresh Linux install, as the AWS installer requires `unzip` to extract the payload. | |
| 56 | 57 | ||
| 57 | 58 | --- | |
| 58 | - | *Built for developers who want total control over their toolchain.* | |
| 59 | + | *Built for developers who want total control over their toolchain.* | |
menu.sh
| @@ -437,6 +437,49 @@ install_docker() { | |||
| 437 | 437 | fi | |
| 438 | 438 | } | |
| 439 | 439 | ||
| 440 | + | install_portainer() { | |
| 441 | + | log "Installing Portainer CE..." | |
| 442 | + | ||
| 443 | + | if ! require_cmd docker; then | |
| 444 | + | err "Docker is required. Please install Docker (Option 9) first." | |
| 445 | + | return 1 | |
| 446 | + | fi | |
| 447 | + | ||
| 448 | + | if ! docker info >/dev/null 2>&1; then | |
| 449 | + | err "Docker is installed but the daemon is not running. Start Docker, then retry Portainer." | |
| 450 | + | return 1 | |
| 451 | + | fi | |
| 452 | + | ||
| 453 | + | if docker ps -a --format '{{.Names}}' | grep -Fxq portainer; then | |
| 454 | + | warn "Portainer container already exists." | |
| 455 | + | if ! docker ps --format '{{.Names}}' | grep -Fxq portainer; then | |
| 456 | + | log "Starting existing Portainer container..." | |
| 457 | + | docker start portainer | |
| 458 | + | fi | |
| 459 | + | log "Portainer is available at https://localhost:9443" | |
| 460 | + | return 0 | |
| 461 | + | fi | |
| 462 | + | ||
| 463 | + | docker volume create portainer_data || { | |
| 464 | + | err "Failed to create the Portainer data volume." | |
| 465 | + | return 1 | |
| 466 | + | } | |
| 467 | + | ||
| 468 | + | if ! docker run -d \ | |
| 469 | + | -p 8000:8000 \ | |
| 470 | + | -p 9443:9443 \ | |
| 471 | + | --name portainer \ | |
| 472 | + | --restart=always \ | |
| 473 | + | -v /var/run/docker.sock:/var/run/docker.sock \ | |
| 474 | + | -v portainer_data:/data \ | |
| 475 | + | portainer/portainer-ce:sts; then | |
| 476 | + | err "Failed to start the Portainer container." | |
| 477 | + | return 1 | |
| 478 | + | fi | |
| 479 | + | ||
| 480 | + | log "Portainer is available at https://localhost:9443" | |
| 481 | + | } | |
| 482 | + | ||
| 440 | 483 | install_aws() { | |
| 441 | 484 | if require_cmd aws; then warn "AWS CLI exists"; return; fi | |
| 442 | 485 | log "Installing AWS CLI directly from Amazon..." | |
| @@ -543,13 +586,14 @@ show_menu() { | |||
| 543 | 586 | printf " 10) AWS CLI (Official Bin)\n" | |
| 544 | 587 | printf " 11) Google Cloud CLI (gcloud)\n" | |
| 545 | 588 | printf " 12) Firebase CLI (NPM/ARM64 Safe)\n" | |
| 589 | + | printf " 13) Portainer (Docker UI)\n" | |
| 546 | 590 | printf "${YELLOW}--- Dev Tools & Security ---${NC}\n" | |
| 547 | - | printf " 13) GitHub CLI (Official Bin)\n" | |
| 548 | - | printf " 14) Infisical (Official Bin)\n" | |
| 591 | + | printf " 14) GitHub CLI (Official Bin)\n" | |
| 592 | + | printf " 15) Infisical (Official Bin)\n" | |
| 549 | 593 | printf "${YELLOW}--- AI & Agentic Tools ---${NC}\n" | |
| 550 | - | printf " 15) Claude Code CLI\n" | |
| 551 | - | printf " 16) OpenCode (opencode.ai)\n" | |
| 552 | - | printf " 17) OpenAI Codex CLI\n" | |
| 594 | + | printf " 16) Claude Code CLI\n" | |
| 595 | + | printf " 17) OpenCode (opencode.ai)\n" | |
| 596 | + | printf " 18) OpenAI Codex CLI\n" | |
| 553 | 597 | printf "${BLUE}==================================================${NC}\n" | |
| 554 | 598 | printf " 99) Quit & Refresh Shell\n" | |
| 555 | 599 | printf "${BLUE}==================================================${NC}\n" | |
| @@ -577,11 +621,12 @@ while true; do | |||
| 577 | 621 | 10) install_aws ;; | |
| 578 | 622 | 11) install_gcloud ;; | |
| 579 | 623 | 12) install_firebase ;; | |
| 580 | - | 13) install_gh ;; | |
| 581 | - | 14) install_infisical ;; | |
| 582 | - | 15) install_claude ;; | |
| 583 | - | 16) install_opencode ;; | |
| 584 | - | 17) install_codex ;; | |
| 624 | + | 13) install_portainer ;; | |
| 625 | + | 14) install_gh ;; | |
| 626 | + | 15) install_infisical ;; | |
| 627 | + | 16) install_claude ;; | |
| 628 | + | 17) install_opencode ;; | |
| 629 | + | 18) install_codex ;; | |
| 585 | 630 | 99) | |
| 586 | 631 | log "Installation complete! Refreshing terminal environment..." | |
| 587 | 632 | ||