This extension provides tools to manage prompts in Vertex AI directly from the Gemini CLI. It allows you to create, read, update, list, and delete prompts, making it easier to integrate prompt management into your development workflow.
- Create Prompt: Save new prompts with specified content, system instructions, model, and display name.
- Read Prompt: Retrieve existing prompts by their ID.
- Update Prompt: Modify the content, system instructions, or model of an existing prompt.
- Delete Prompt: Remove prompts using their ID.
- List Prompts: Search and list prompts, useful for finding prompt IDs based on display names.
- You have the Gemini CLI installed.
- You have a Google Cloud project with the Vertex AI API enabled.
- You have authenticated with Google Cloud (e.g., by running
gcloud auth application-default login).
Install the extension using the Gemini CLI:
gemini extensions install https://github.com/gemini-cli-extensions/vertexAfter installation, set your Google Cloud Project ID and location. The extension requires these to function.
export GOOGLE_CLOUD_PROJECT="your-project-id"
export GOOGLE_CLOUD_LOCATION="us-central1"Once installed and configured, you can use the Vertex AI prompt management tools by passing natural language commands to the Gemini CLI.
Here are a few examples:
-
Create a prompt:
gemini "create a prompt with content 'Hello World' and display name 'My First Prompt'" -
List existing prompts:
gemini "list prompts" -
Read a specific prompt by ID:
gemini "read prompt <your-prompt-id>"
For more detailed information on all available commands and their parameters, please refer to the extension/commands files.
To set up your development environment, first make the setup script executable, then run it:
sh ./dev-setup.shAfter running the script, activate your virtual environment:
source .venv/bin/activateThis project uses:
- Ruff: For linting and formatting.
- Pyright: For static type checking.
To run the checks:
uv run ruff check .
uv run pyrightTo automatically fix formatting issues:
uv run ruff format .To run the unit tests locally:
uv run python3 -m unittest discoverThis project uses pre-commit to enforce code quality checks automatically before commits and pushes. The dev-setup.sh script automatically installs these hooks for you.
- On
git commit:ruff(linting and formatting) andpyright(static type checking) will run. - On
git push:pytestwill run to execute the test suite.
This project uses GitHub Actions for CI. The workflow in .github/workflows/ci.yml automatically runs linting and type checking on every push and pull request.