SuperAPI AI Directory

routing-prerequisites

Deployment & operations

View repository

Updated 10-16 09:30

About this skill

Check Prerequisites

Verify all required tools are installed and guide installation of missing dependencies.

Prerequisites

None - this skill helps you install prerequisites!

Error Logging

Follow the Error Logging convention in AGENTS.md. Log file prefix: routing-prerequisites.

Workflow

Step 1: Check All Prerequisites

Goal: Identify which tools are installed and which are missing

Actions:

  1. Check which container runtimes are installed:

    # Check Cortex Code CLI
    cortex --version 2>/dev/null && echo "Cortex Code: INSTALLED" || echo "Cortex Code: NOT FOUND"
    
    # Check Podman
    podman --version 2>/dev/null && echo "Podman: INSTALLED" || echo "Podman: NOT FOUND"
    
    # Check Docker (optional if Podman is installed)
    docker --version 2>/dev/null && echo "Docker: INSTALLED" || echo "Docker: NOT FOUND"
    
    # Check container runtime is running (Podman or Docker)
    podman info >/dev/null 2>&1 && echo "Podman Daemon: RUNNING" || docker info >/dev/null 2>&1 && echo "Docker Daemon: RUNNING" || echo "Container Runtime: NOT RUNNING"
    
    # Check Snowflake CLI
    snow --version 2>/dev/null && echo "Snowflake CLI: INSTALLED" || echo "Snowflake CLI: NOT FOUND"
    
    # Check Git
    git --version 2>/dev/null && echo "Git: INSTALLED" || echo "Git: NOT FOUND"
    
    # Check GitHub CLI (optional)
    gh --version 2>/dev/null && echo "GitHub CLI: INSTALLED" || echo "GitHub CLI: NOT FOUND (optional)"
    
  2. Check Snowflake CLI connections:

    snow connection list 2>/dev/null || echo "No Snowflake connections configured"
    
  3. Present results to user in a summary table:

    Prerequisite Status Required
    Cortex Code CLI ✅/❌ Yes
    Podman ✅/❌ Yes (or Docker)
    Docker ✅/❌ Yes (or Podman)
    Container Runtime ✅/❌ Yes
    Snowflake CLI ✅/❌ Yes
    Snowflake Connection ✅/❌ Yes
    Git ✅/❌ Yes
    GitHub CLI ✅/❌ No (optional)
  4. If all required prerequisites are installed: Inform user they are ready to proceed and skip to Verification section.

  5. If any required prerequisites are missing: Proceed to Step 2.

Output: Prerequisites status summary

Step 2: Installation Wizard

Goal: Guide user through installing missing prerequisites

Actions:

  1. Ask user which missing prerequisites they want to install now.

  2. For each selected prerequisite, provide installation guidance:

Cortex Code CLI Installation

Container Runtime Installation (Podman or Docker)

Podman (recommended - no daemon required):

  • macOS:

    brew install podman
    podman machine init
    podman machine start
    
  • Windows: Download Podman Desktop: https://podman-desktop.io/downloads

  • Linux:

    # Ubuntu/Debian
    sudo apt-get update
    sudo apt-get install podman
    
    # RHEL/CentOS/Fedora
    sudo dnf install podman
    
  • Verify: podman --version && podman info

Docker (alternative if Podman is not available):

Snowflake CLI Installation

  • All platforms:

    pip install snowflake-cli-labs
    
  • Configure connection:

    snow connection add
    

    Follow prompts to enter:

    • Connection name (e.g., my-snowflake)
    • Account identifier
    • Username
    • Authentication method (password, SSO, key-pair)
  • Verify: snow --version && snow connection list

Git Installation

  • macOS:

    brew install git
    

    Or install Xcode Command Line Tools: xcode-select --install

  • Windows: Download from https://git-scm.com/download/win

  • Linux:

    # Ubuntu/Debian
    sudo apt-get install git
    
    # RHEL/CentOS
    sudo yum install git
    
  • Configure:

    git config --global user.name "Your Name"
    git config --global user.email "your.email@example.com"
    
  • Verify: git --version

GitHub CLI Installation (Optional)

  • macOS:

    brew install gh
    
  • Windows:

    winget install --id GitHub.cli
    
  • Linux:

    # Ubuntu/Debian
    curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
    echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
    sudo apt update
    sudo apt install gh
    
  • Authenticate:

    gh auth login
    
  • Verify: gh --version

Output: Installation commands executed or provided

Step 3: Verify Installation

Goal: Confirm all prerequisites are now installed correctly

Actions:

  1. Re-run the checks from Step 1

  2. If all required prerequisites pass:

    • Congratulate user
    • Inform them they can now run: build routing solution
  3. If any required prerequisites still missing:

    • List the remaining missing items
    • Offer to retry installation or provide manual installation links

Output: Final verification status

Stopping Points

  • ✋ After Step 1: Review which prerequisites need to be installed
  • ✋ After Step 2: Confirm installations completed without errors

Verification

After completion, all these commands should succeed:

cortex --version        # Cortex Code CLI  
podman --version        # Podman (or docker --version for Docker)
podman info             # Podman running (or docker info for Docker)
snow --version          # Snowflake CLI
snow connection list    # At least one connection configured
git --version           # Git

Note: Either Podman or Docker is required - you don't need both.

Common Issues

Issue: brew command not found (macOS)

  • Solution: Install Homebrew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Issue: Docker daemon not running

  • Solution:
    • macOS/Windows: Open Docker Desktop application
    • Linux: sudo systemctl start docker

Issue: Permission denied for Docker

  • Solution: Add user to docker group: sudo usermod -aG docker $USER then log out and back in

Issue: pip command not found

  • Solution: Install Python first, or use pip3 instead

Issue: snow CLI prints version update warnings

  • Solution: Set export SNOWFLAKE_CLI_NO_UPDATE_CHECK=1 in your shell profile to suppress update check noise during builds

Issue: Snowflake connection fails

  • Solution: Verify account identifier format (e.g., ACCOUNT.REGION or ORG-ACCOUNT)

Output

All prerequisites verified and installed. Environment ready for deploying Route Optimizer.