[project]
name = "kimi-cli"
version = "1.3"
description = "Kimi Code CLI is your next CLI agent."
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
    "agent-client-protocol==0.7.0",
    "aiofiles>=24.0,<26.0",
    "aiohttp==3.13.3",
    "typer==0.21.1",
    "kosong[contrib]==0.41.0",
    # loguru stays >=0.6.0 because notify-py (via batrachian-toad) caps it at <=0.6.0 on 3.14+.
    "loguru>=0.6.0,<0.8",
    "prompt-toolkit==3.0.52",
    "pillow==12.1.0",
    "pyyaml==6.0.3",
    "rich==14.2.0",
    "ripgrepy==2.2.0",
    "streamingjson==0.0.5",
    "trafilatura==2.0.0",
    # lxml is used by trafilatura/htmldate/justext; keep pinned for binary wheels.
    "lxml==6.0.2",
    "tenacity==9.1.2",
    "fastmcp==2.12.5",
    "pydantic==2.12.5",
    "httpx[socks]==0.28.1",
    "pykaos==0.6.0",
    "batrachian-toad==0.5.23; python_version >= \"3.14\"",
    "tomlkit==0.14.0",
    "jinja2==3.1.6",
    "pyobjc-framework-cocoa>=12.1 ; sys_platform == 'darwin'",
    "keyring>=25.7.0",
]

[dependency-groups]
dev = [
    "pyinstaller==6.18.0",
    "inline-snapshot[black]>=0.31.1",
    "pyright>=1.1.407",
    "ty>=0.0.9",
    "pytest>=9.0.2",
    "pytest-asyncio>=1.3.0",
    "ruff>=0.14.10",
]

[build-system]
requires = ["uv_build>=0.8.5,<0.10.0"]
build-backend = "uv_build"

[tool.uv.build-backend]
module-name = ["kimi_cli"]
source-exclude = ["examples/**/*", "tests/**/*", "src/kimi_cli/deps/**/*"]

[tool.uv.workspace]
members = [
    "packages/kosong",
    "packages/kaos",
    "packages/kimi-code",
    "sdks/kimi-sdk",
]

[tool.uv.sources]
kosong = { workspace = true }
pykaos = { workspace = true }
kimi-cli = { workspace = true }

[project.scripts]
kimi = "kimi_cli.cli:cli"
kimi-cli = "kimi_cli.cli:cli"

[tool.ruff]
line-length = 100

[tool.ruff.lint]
select = [
    "E",   # pycodestyle
    "F",   # Pyflakes
    "UP",  # pyupgrade
    "B",   # flake8-bugbear
    "SIM", # flake8-simplify
    "I",   # isort
]

[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["E501"]
"tests_e2e/**/*.py" = ["E501"]

[tool.pyright]
typeCheckingMode = "standard"
pythonVersion = "3.14"
include = [
    "src/**/*.py",
    "tests/**/*.py",
    "tests_ai/scripts/**/*.py",
    "tests_e2e/**/*.py",
]
strict = ["src/kimi_cli/**/*.py"]

[tool.ty.environment]
python-version = "3.14"

[tool.ty.src]
include = [
    "src/**/*.py",
    "tests/**/*.py",
    "tests_ai/scripts/**/*.py",
    "tests_e2e/**/*.py",
]

[tool.typos.files]
extend-exclude = ["kimi.spec", "pyinstaller.py"]

[tool.typos.default.extend-words]
datas = "datas"
