Gemini CLI: Vibe coding and deploying Hello World to Cloud Run!

Google for DevelopersAbout 2 min readJun 25, 2025Watch original
THE SUMMARYAI-generated

Key Concepts:

  • Gemini CLI: A command-line interface for Google's Gemini AI model.
  • Node.js: A JavaScript runtime environment.
  • Fastify: A web framework for Node.js.
  • Cloud Run: A managed compute platform that enables you to run stateless containers invocable via HTTP requests.
  • Artifact Registry: A service for storing, managing, and securing container images and other artifacts.
  • Cloud Build: A service that executes your builds on Google Cloud Platform.
  • Project ID: A unique identifier for a Google Cloud project.
  • gcloud: The command-line interface for Google Cloud Platform.
  • NPM: Node Package Manager

Gemini CLI Experiment: Node.js Hello World Deployment to Cloud Run

The speaker details their initial experience using the new Gemini CLI to automate the creation and deployment of a simple "Hello World" Node.js application using Fastify to Google Cloud Run.

Project Creation and Code Generation:

The speaker prompted the Gemini CLI to create a new "Hello World" Node.js project with Fastify and deploy it to Cloud Run. The CLI successfully generated the necessary commands to:

  • Create the project structure.
  • Install the Fastify dependency using NPM.
  • Write the code for the application. The speaker confirmed the generated code appeared correct.

Deployment and Error Handling:

The speaker then executed the gcloud run deploy command, which was also generated by the Gemini CLI. The initial deployment attempt failed due to missing project ID.

  • The speaker identified the project ID as "full-stack-improv" and re-executed the gcloud run deploy command.

The deployment process then revealed that Artifact Registry and Cloud Build services were not enabled.

  • The Gemini CLI prompted the speaker to enable these services, which they did by pressing Enter multiple times.

After enabling the required services, another deployment attempt revealed an error related to the application not exposing port 3000.

  • The Gemini CLI automatically added a port environment variable and re-executed the gcloud run deploy command.

Successful Deployment and Application Access:

After resolving the dependencies and port issue, the application was successfully deployed to Cloud Run.

  • The speaker then requested the URL of the deployed application from the Gemini CLI.
  • The CLI provided the URL, and the speaker confirmed that the "Hello World" application was accessible.

Conclusion:

The speaker concluded that their first experience with the Gemini CLI was "pretty cool," highlighting its ability to automate the creation and deployment of a Node.js application to Cloud Run, including handling dependencies and configuration issues.

AI summaries can miss context or contain errors. Check important details against the original video.

Go a little deeper.

Have a question about this video? Load its transcript to open the video chat.