Skip to content

Install CLI

Run HolmesGPT from your terminal as a standalone CLI tool.

Installation Options

  1. Add our tap:

    brew tap robusta-dev/homebrew-holmesgpt
    

  2. Install HolmesGPT:

    brew install holmesgpt
    

  3. To upgrade to the latest version:

    brew upgrade holmesgpt
    

  4. Verify installation:

    holmes ask help
    

  1. Install pipx

  2. Install HolmesGPT:

    pipx install "https://github.com/robusta-dev/holmesgpt/archive/refs/heads/master.zip"
    

  3. Verify installation:

    holmes version
    

For development or custom builds:

  1. Install Poetry

  2. Install HolmesGPT:

    git clone https://github.com/robusta-dev/holmesgpt.git
    cd holmesgpt
    poetry install --no-root
    

  3. Run HolmesGPT:

    poetry run python3 holmes_cli.py ask "what pods are unhealthy and why?"
    

Run HolmesGPT using the prebuilt Docker container:

docker run -it --net=host \
  -v ~/.holmes:/root/.holmes \
  -v ~/.aws:/root/.aws \
  -v ~/.config/gcloud:/root/.config/gcloud \
  -v $HOME/.kube/config:/root/.kube/config \
  us-central1-docker.pkg.dev/genuine-flight-317411/devel/holmes ask "what pods are unhealthy and why?"

Quick Start

After installation, set up your AI provider and run your first investigation:

  1. Set up API key:

    # OpenAI
    export OPENAI_API_KEY="your-api-key"
    
    # Anthropic
    export ANTHROPIC_API_KEY="your-api-key"
    
    # Azure OpenAI
    export AZURE_API_VERSION="2024-02-15-preview"
    export AZURE_API_BASE="https://your-resource.openai.azure.com/"
    export AZURE_API_KEY="your-azure-api-key"
    
    # Google
    export GOOGLE_API_KEY="your-api-key"
    
    See supported AI Providers for more details.

  2. Create a test pod to investigate:

    kubectl apply -f https://raw.githubusercontent.com/robusta-dev/kubernetes-demos/main/pending_pods/pending_pod_node_selector.yaml
    

  3. Ask your first question:

    holmes ask "what is wrong with the user-profile-import pod?"
    
    Ask follow-up questions to refine your investigation

Next Steps

Need Help?