#!/bin/bash
set -e

echo "This is a \"comma script\", meaning a script starts with a comma."
echo "The benefit is: type \",\" and press TAB, and you can see all comma scripts!"

echo ""

echo "Shell:" $(echo $SHELL)
echo "PATH:" $(echo "$PATH" | tr ':' '\n' | wc -l) "paths [Please run ',path' to view path list]"

echo ""

error() {
    echo -e "\033[31m$1\033[0m"
}

echo -e "Need for scripts:\n"

echo "ruby:" $(command -v ruby || error "not found")
echo "llm:" $(command -v llm || error "not found")
echo ""

echo -e "Recommendation:\n"

echo "python:" $(command -v python || error "not found")
echo "uv:" $(command -v uv || error "not found")
echo "pipx:" $(command -v pipx || error "not found")
echo "nodejs:": $(command -v node || error "not found")
echo "pnpm:" $(command -v pnpm || error "not found")
echo "go:" $(command -v go || error "not found")
echo "ruby_llm:" $(gem list -i '^ruby_llm$')

echo ""
echo "mise:" $(command -v mise || error "not found")
echo ""

