Last active
October 4, 2025 16:21
-
-
Save CypherpunkSamurai/2c1f01a9d6b754d635b1d0765c9a1e66 to your computer and use it in GitHub Desktop.
cli tools installer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # check for required tool | |
| # TODO: implement posix compliant check | |
| # requires bash curl unzip | |
| # List of required commands | |
| REQUIRED_CMDS="bash curl unzip" | |
| missing=0 | |
| for cmd in $REQUIRED_CMDS; do | |
| if ! command -v "$cmd" >/dev/null 2>&1; then | |
| echo "Missing command: $cmd" | |
| missing=1 | |
| fi | |
| done | |
| if [ "$missing" -eq 0 ]; then | |
| echo "All required commands are available." | |
| exit 0 | |
| else | |
| echo "Some required commands are missing." | |
| # Pause instead of exit | |
| echo "Press Enter to continue..." | |
| # shellcheck disable=SC2034 | |
| dummy_input= | |
| IFS= read -r dummy_input | |
| fi | |
| # or use bun | |
| curl -fsSL https://bun.sh/install | bash | |
| # ---------------------------------------------- | |
| # Next Lines are copied from nodejs website | |
| # ---------------------------------------------- | |
| # USING NVM | |
| # Download and install nvm: | |
| curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash | |
| # in lieu of restarting the shell | |
| \. "$HOME/.nvm/nvm.sh" | |
| # Download and install Node.js: | |
| NODE_LTS_VERSION=$(nvm ls-remote --lts | tail -n 1 | grep -Eo "v[0-9]+\." | grep -oe '\([0-9]*\)') | |
| echo "Found LTS Version: $NODE_LTS_VERSION" | |
| nvm install $NODE_LTS_VERSION | |
| # Download and install fnm: | |
| # curl -o- https://fnm.vercel.app/install | bash | |
| # ---------------------------------------------- | |
| # IMPROVISE TO ADD TO PATH | |
| # ---------------------------------------------- | |
| # FNM_PATH="/root/.local/share/fnm" | |
| # if [ -d "$FNM_PATH" ]; then | |
| # export PATH="$FNM_PATH:$PATH" | |
| # eval "`fnm env`" | |
| #fi | |
| # Download and install Node.js: | |
| # fnm install 22 | |
| # Verify the Node.js version: | |
| node -v # Should print "v22.20.0". | |
| # Download and install pnpm: | |
| corepack enable pnpm | |
| # Verify pnpm version: | |
| pnpm -v | |
| # ---------------------------------------------- | |
| # install claude code, gemini cli, qwen code, and ccr | |
| # ---------------------------------------------- | |
| pnpm install -g @anthropic-ai/claude-code @musistudio/claude-code-router | |
| pnpm install -g @google/gemini-cli | |
| pnpm install -g @qwen-code/qwen-code@latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment