{
  "markdown": "# Vertex AI Gemini CLI Extension\n\nThis extension provides tools to manage prompts and work with data-driven prompt optimizer 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.\n\n## Features\n\n### Prompt Management\n*   **Create Prompt**: Save new prompts with specified content, system instructions, model, and display name.\n*   **Read Prompt**: Retrieve existing prompts by their ID.\n*   **Update Prompt**: Modify the content, system instructions, or model of an existing prompt.\n*   **Delete Prompt**: Remove prompts using their ID.\n*   **List Prompts**: Search and list prompts, useful for finding prompt IDs based on display names.\n\n### Data-Driven Prompt Optimizer\n*   **Configuration Generation**: Create the input configurations required to run data-driven prompt optimizer.\n*   **Job Execution**: Run large-scale prompt optimization jobs directly on Vertex AI.\n*   **Results Analysis**: Perform deep-dive analysis of optimization results, including learning curves and candidate comparisons.\n*   **Automated Reporting**: Generate comprehensive HTML reports with tuning suggestions for subsequent runs.\n\n### Few-Shot Prompt Optimizer\n*  **Prompt Optimization**: tunes the given prompt by utilizing small set of user-provided examples using few-shot prompt optimization. For more details about the algorithm, please refer to this [documentation](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/few-shot-optimizer) or this [guide](@./src/vertex/prompt_optimizer/docs/few_shot_prompt_optimization_guide.md).\n\n\n## Prerequisites\n\n*   You have the [Gemini CLI](https://github.com/google-gemini/gemini-cli) installed.\n*   You have a Google Cloud project with the Vertex AI API enabled.\n*   You have authenticated with Google Cloud (e.g., by running `gcloud auth application-default login`).\n\n## Installation\n\nInstall the extension using the Gemini CLI:\n\n```bash\ngemini extensions install https://github.com/gemini-cli-extensions/vertex\n```\n\nAfter installation, set your Google Cloud Project ID and location. The extension requires these to function.\n\n```bash\nexport GOOGLE_CLOUD_PROJECT=\"your-project-id\"\nexport GOOGLE_CLOUD_LOCATION=\"us-central1\"\n```\n\n## Usage\n\n### Prompt Management Examples\n\nOnce installed and configured, you can use the Vertex AI prompt management tools by passing natural language commands to the Gemini CLI.\n\nHere are a few examples:\n\n*   **Create a prompt**:\n    ```bash\n    gemini \"create a prompt with content 'Hello World' and display name 'My First Prompt'\"\n    ```\n\n*   **List existing prompts**:\n    ```bash\n    gemini \"list prompts\"\n    ```\n\n*   **Read a specific prompt by ID**:\n    ```bash\n    gemini \"read prompt <your-prompt-id>\"\n    ```\n\nFor more detailed information on all available commands and their parameters, please refer to the `extension/commands` files.\n\n### Data-Driven Prompt Optimizer Examples\n\n*   **Analyze optimization results**:\n    ```bash\n    gemini \"analyze my data drive prompt optimizer results at gs://your-bucket/optimization-run-1/\"\n    ```\n\n*   **Configure a new optimization job**:\n    ```bash\n    gemini \"help me configure a new optimization job based on my existing config at gs://your-bucket/config.json\"\n    ```\n\n*   **Run optimization job**:\n    ```bash\n    gemini \"start a data driven prompt optimizer job using my config at gs://your-bucket/config-new.json\"\n    ```\n\nFor more detailed information on all available commands and workflows, please refer to the `GEMINI.md` file in this repository.\n\n### Few-Shot Prompt Optimization Examples\n*   **Few-shot optimization with target response**:\nWhen user examples consit of `(question, model_response, target_response)`, few-shot optimization should be run with \"target response\" method.\n    ```bash\n    gemini \"Apply few-shot prompt optimization using target response with data from gs://your_bucket/your_examples.csv. Here is the prompt: '...'\"\n\n*   **Few-shot optimization with rubrics and evaluations**:\nWhen user examples consit of `(question, model_response, rubrics, rubrics_evaluations)`, few-shot optimization should be run with \"rubrics\" method.\n    ```bash\n    gemini \"Apply few-shot prompt optimization using rubrics with data from gs://your_bucket/your_examples.csv. Here is the prompt: '...'\"\n\n## Development\n\n### Local Development Setup\n\nTo set up your development environment, first make the setup script executable, then run it:\n\n```bash\nsh ./dev-setup.sh\n```\n\nAfter running the script, activate your virtual environment:\n\n```bash\nsource .venv/bin/activate\n```\n\n\n### Code Quality\n\nThis project uses:\n\n*   **Ruff**: For linting and formatting.\n*   **Pyright**: For static type checking.\n\nTo run the checks:\n\n```bash\nuv run ruff check .\nuv run pyright\n```\n\nTo automatically fix formatting issues:\n\n```bash\nuv run ruff format .\n```\n\n### Testing\n\nTo run the unit tests locally:\n\n```bash\nuv run python3 -m unittest discover\n```\n\n### Pre-commit Hooks\n\nThis 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.\n\n*   **On `git commit`**: `ruff` (linting and formatting) and `pyright` (static type checking) will run.\n*   **On `git push`**: `pytest` will run to execute the test suite.\n\n### Continuous Integration\n\nThis 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.\n",
  "bytes": 5574,
  "sha": "d9130e052db1b6e081bd6be334a0376b5497bc3a741b76aacf314a1747f01b91",
  "repo_slug": "gemini-cli-extensions/vertex",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_gemini_cli_extensions_vertex_5e1419b0/readme"
}