#!/bin/bash
set -euo pipefail

apt-get update
apt-get install -y curl

curl -LsSf https://astral.sh/uv/install.sh | bash
export PATH="$HOME/.local/bin:$PATH"

{% if version %}
uv tool install --python 3.13 kimi-cli=={{ version }}
{% else %}
uv tool install --python 3.13 kimi-cli
{% endif %}

kimi --version
