Skip to content

vladkol/gemini-cli-media-generation

Repository files navigation

Gemini CLI for Video Generation

An experimental demonstration of using MCP Servers for Genmedia in Gemini CLI with planned iterative ideation and media generation.

AI Generated Capybara

It uses Imagen 4 and Veo 3 models through MCP Servers for Genmedia.

It also edits images using gemini-2.5-flash-image-preview model (aka nano-🍌) for character and scene consistency.

Demo video: TODO

How to try

  1. Install gcloud CLI and Gemini CLI.

    If you didn't use Google Cloud before, get a free trial.

    If gcloud auth print-identity-token -q CLI command result is empty, run gcloud auth login --update-adc.

  2. Enable Vertex AI APIs in your project.

NOTE: From here, you can ask Gemini CLI to perform steps 2 to 5 for you. Simply run gemini, choose Vertex AI authentication option, and ask it to perform steps 2 to 5 from the instructions below. Sometimes, it may need your help 🙂

  1. Clone Vertex AI Creative Studio repository inside this repo's clone:

    git clone https://github.com/GoogleCloudPlatform/vertex-ai-creative-studio
  2. Install MCP Servers for Genmedia.

  3. Create a Cloud Storage Bucket, and give Vertex AI Service Agent service account read and write access to the bucket.

    Vertex AI Service Agent is service-PROJECT_NUMBER@gcp-sa-aiplatform.iam.gserviceaccount.com account PROJECT_NUMBER is your project's number. You can give it access on Permissions tab of your bucket's page. Project number can be found here.

  4. Clone this repository (finally!):

    git clone https://github.com/vladkol/gemini-cli-media-generation
    cd gemini-cli-media-generation
  5. Create .env file with your Google Cloud Project Id, location/region, and the bucket name. Use .env.template as a starter.

  6. Configure MCP Servers in Gemini CLI. Use .gemini/settings.sample.json as a starter (we only need Imagen, Veo and AVTool servers).

  7. Delete or rename the following sub-directories:

    • generated_images
    • generated_videos
    • prompts

    They are here as an example.

  8. Run a new session of Gemini CLI - gemini

  9. Ask it to create a video based on your idea!

  10. Sign up for an Accelerate AI with Cloud Run developer workshop near you! 🚀

NOTE

This project is a demonstration of vibe coding intended to provide an example with verification through human feedback. The goal is to show an idea for further development. It is not intended for use in a production environment.

All media assets and code in this repository are AI generated.