Installation
Requirements
- Python 3.11 or higher
- pip (Python package installer)
Basic Installation
Install KTTC using pip:
Optional Language Enhancements
KTTC provides optional language-specific helpers for enhanced quality checks:
English
Install LanguageTool integration for 5,000+ grammar rules:
Chinese
Install HanLP for Chinese-specific checks (measure words, particles):
All Languages
Install all language helpers:
API Keys Setup
KTTC supports multiple LLM providers. You need at least one API key:
OpenAI
Anthropic (Claude)
GigaChat (Russian provider)
export KTTC_GIGACHAT_CLIENT_ID="your-client-id"
export KTTC_GIGACHAT_CLIENT_SECRET="your-client-secret"
YandexGPT
Using .env File
You can also create a .env file in your project directory:
KTTC will automatically load these variables.
Verify Installation
Check that KTTC is installed correctly:
You should see the version number:
Development Installation
If you want to contribute to KTTC or run the latest development version:
# Clone repository
git clone https://github.com/kttc-ai/kttc.git
cd kttc
# Create virtual environment
python3.11 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in editable mode with dev dependencies
pip install -e ".[dev]"
# Install pre-commit hooks
pre-commit install
Next Steps
Now that you have KTTC installed, check out the Quick Start guide to learn how to use it.