This repository contains an automated installation script for setting up a complete development environment with NVM, Node.js, NPM, and Google's Gemini CLI.
- NVM (Node Version Manager) v0.39.0 - Manage multiple Node.js versions
- Node.js (Latest LTS) - JavaScript runtime
- NPM - Node.js package manager
- Gemini CLI - Google's AI CLI tool
- Environment Setup - Adds GOOGLE_CLOUD_PROJECT to bashrc
- Gemini CLI + VS Code - Refer here for more details.
# Make the script executable and r
9333
un it
chmod +x install_nvm_node_gemini.sh
./install_nvm_node_gemini.sh# Download and execute the script
curl -o install_nvm_node_gemini.sh https://raw.githubusercontent.com/johanesalxd/gemini-cli-1c/main/install_nvm_node_gemini.sh
chmod +x install_nvm_node_gemini.sh
./install_nvm_node_gemini.sh-
Restart your terminal or run:
source ~/.bashrc
-
Set your Google Cloud Project ID by editing
~/.bashrc:vi ~/.bashrcFind the line with
GOOGLE_CLOUD_PROJECTand replaceyour-project-id-herewith your actual project ID. -
Load the environment variable:
source ~/.bashrc
-
Verify installation:
nvm --version node --version npm --version gemini --version echo $GOOGLE_CLOUD_PROJECT
# List installed Node.js versions
nvm list
# Install a specific Node.js version
nvm install 18.17.0
# Switch to a specific version
nvm use 18.17.0
# Set default version
nvm alias default 18.17.0# Get help
gemini --help
# Start interactive session
gemini
# Run a specific command
gemini "Explain how to use Node.js"- Linux (Ubuntu, Debian, CentOS, etc.)
- curl (for downloading NVM)
- bash shell
- Internet connection
# Manually load NVM
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"# Configure npm to use a different directory for global packages
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrcMake sure you have:
- Set up your Google Cloud Project ID
- Configured authentication (gcloud auth or API keys)
- ✅ Downloads and installs NVM v0.39.0
- ✅ Installs the latest LTS version of Node.js
- ✅ Verifies NPM installation
- ✅ Installs Google Gemini CLI globally
- ✅ Adds GOOGLE_CLOUD_PROJECT environment variable to bashrc
- ✅ Provides colored output and error handling
- ✅ Includes verification steps for all installations
This script is provided as-is for educational and development purposes.