Skip to content

Vertex CLI

Vertex CLI is a powerful command-line tool that leverages Large Language Models (LLMs) to answer queries and debug faster. With just a few commands, you can set up and start using advanced features like querying LLMs and generating insights.

Complete Documentation: Vertex CLI Docs


Installation and Setup

Follow these steps to get started:

Install Vertex-CLI

To install Vertex-CLI, run:

pip install Vertex-CLI

Gemini is installed by default. Add a provider extra if you need one:

pip install "Vertex-CLI[openai]"
pip install "Vertex-CLI[anthropic]"

After installation, initialize the CLI configuration file:

tex --setup

This will create an empty models_config.json under ~/.config/ai_model_manager/.


Install the Editable Version (For Development)

If you want to modify or contribute to Vertex CLI, install it in editable mode:

  1. Clone the repository:
git clone https://github.com/prathamhole14/Vertex-CLI
cd Vertex-CLI
  1. Install dependencies and set up the project:
pip install -e ".[openai,anthropic]"
  1. Initialize the CLI configuration:
tex --setup

Configuration

You can configure the CLI to use a specific LLM model by adding or updating your API key:

tex config gemini-flash-latest YOUR_MODEL_API_KEY

Replace gemini-flash-latest with your preferred model name and YOUR_MODEL_API_KEY with your API key.

To list all configured models:

tex list

To remove a model:

tex remove gemini-flash-lite-latest

To select a model as the default:

tex select gemini-flash-latest

Usage

Once installed and configured, you can start chatting or debugging commands:

Quick Command Reference

  • Convert an array to a NumPy array
tex "how to convert an array into a NumPy array"
  • Manage API keys for models

  • Add or update a model’s API key:

    tex config <model-name> <api-key>
    
    * Remove a model:

    tex remove <model-name>
    
    * List all saved models and their API keys:

    tex list
    
    * Select a model to use:

    tex select <model-name>
    
    * Show available commands/help:

    tex -h
    tex chat -h
    

Debugging (Beta Feature)

  • Debug the last 3 commands (default):
tex debug
  • Debug a specific number of recent commands (e.g., last 5):
tex debug -n 5
  • Add a custom message to explain your assumptions or observations:
tex debug -n 5 -p "I think this issue might be related to environment variables"

🔗 Complete CLI Documentation: CLI Commands