Skip to main content

Get Started with Gemini CLI 🤖

Use Gemini CLI to create and deploy websites to Firebase Hosting with AI assistance - all in one conversation.

Prerequisites​

  • ✅ Node.js version 20 or higher
  • ✅ A Google account for Firebase
  • ✅ A Gemini API key (Get one free)

Step 1: Install Tools​

# Install Firebase CLI
npm install -g firebase-tools

# Install Gemini CLI
npm install -g @google/gemini-cli

# Set your API key
export GEMINI_API_KEY="your-api-key-here"

Learn more about Gemini CLI at github.com/google-gemini/gemini-cli

Step 2: Initialize Firebase​

Create a project and initialize Firebase Hosting:

# Create and enter project directory
mkdir my-website
cd my-website

# Login to Firebase
firebase login

# Initialize hosting (interactive)
firebase init hosting

When prompted:

  • Create a new project or select existing
  • Public directory: public
  • Single-page app: N
  • Automatic builds: N

Step 3: Build and Deploy with Gemini​

Now let Gemini create AND deploy your site in one go:

# Start Gemini
gemini

# Tell Gemini to build and deploy:
> I've already initialized Firebase Hosting with public as my directory.
> Create a modern landing page for a coffee shop called "Bean There" and deploy it to Firebase.

Gemini will:

  1. Create the HTML/CSS files in your public directory
  2. Run firebase deploy for you
  3. Show you the live URL

That's it! Your site is live in one conversation. 🎉

Learn More​

For advanced Gemini CLI features, Firebase MCP server integration, and AI development best practices:


Prefer traditional commands? Check out the standard Firebase CLI workflow.

Use Firebase CLI Instead →