Metadata-Version: 2.4
Name: kolega-code
Version: 0.3.2
Summary: Local-first AI coding agent for the terminal
Project-URL: Homepage, https://kolega-ai.github.io/kolega-code/
Project-URL: Documentation, https://kolega-ai.github.io/kolega-code/
Project-URL: Repository, https://github.com/kolega-ai/kolega-code
Project-URL: Issues, https://github.com/kolega-ai/kolega-code/issues
Author: Kolega Team
License: MIT License
        
        Copyright (c) 2026 Kolega Team
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: agent,ai,cli,coding-agent,developer-tools
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Requires-Dist: anthropic==0.101.0
Requires-Dist: beautifulsoup4==4.14.3
Requires-Dist: google-genai==2.0.1
Requires-Dist: jinja2==3.1.6
Requires-Dist: langfuse==3.14.5
Requires-Dist: nest-asyncio==1.6.0
Requires-Dist: openai==1.109.1
Requires-Dist: packaging==25.0
Requires-Dist: pathspec==1.1.1
Requires-Dist: playwright==1.59.0
Requires-Dist: psutil==7.2.2
Requires-Dist: pydantic==2.13.4
Requires-Dist: python-dotenv==1.2.2
Requires-Dist: pyyaml==6.0.3
Requires-Dist: tenacity==9.1.4
Requires-Dist: textual==8.2.5
Requires-Dist: tiktoken==0.12.0
Requires-Dist: trafilatura==2.0.0
Provides-Extra: cli
Provides-Extra: dev
Requires-Dist: pytest-asyncio==1.3.0; extra == 'dev'
Requires-Dist: pytest==9.0.3; extra == 'dev'
Requires-Dist: ruff==0.15.12; extra == 'dev'
Description-Content-Type: text/markdown

# kolega-code

Kolega Code is a local-first AI coding agent for the terminal.

The package owns the `kolega_code` import namespace and provides the
`kolega-code` command.

## Install

Install with the public installer:

```bash
curl -fsSL https://kolega.dev/install-kolega-code.sh | sh
```

Or install directly from PyPI with uv:

```bash
uv tool install kolega-code
```

Verify the command is available:

```bash
kolega-code --version
```

Upgrade or uninstall:

```bash
kolega-code update
uv tool uninstall kolega-code
```

Running the installer again also updates an existing install to the latest
released version.

Run the Textual UI and open the Settings tab to pick any provider and model from the catalog, choose the model's thinking effort, and save your API key:

```bash
kolega-code .
```

In the Textual UI, press `Shift+Tab` to switch between build mode and planning mode. Planning mode uses a standalone read-only planning agent; when it submits a complete plan, choose whether to implement it or keep discussing the plan.

All CLI sessions use the CLI-specific coding-agent prompt, including resumed sessions. Launching the UI starts a fresh thread by default. Resume an existing thread explicitly:

```bash
kolega-code . --resume
kolega-code . --resume <thread-or-session-id>
```

You can also use env/flag based configuration for non-UI commands. API key
variables provide credentials only; set a provider/model explicitly or save one
in the Settings UI:

```bash
export KOLEGA_CODE_PROVIDER=deepseek
export DEEPSEEK_API_KEY=...
kolega-code ask "summarize this repository" --project .
kolega-code ask "summarize this repository" --project . --provider deepseek --model deepseek-v4-pro
kolega-code sessions list --project .
kolega-code doctor --project .
```

The Settings UI exposes every model in the catalog (`kolega_code/llm/specs.py`) across all supported providers — the provider and model dropdowns are derived from that catalog, so adding a model there makes it selectable in the UI automatically. A saved UI selection is used for all agent model roles, and switching models resets thinking effort to that model's default. API keys are stored in the local CLI settings file with restrictive permissions. Existing environment and model/provider flag overrides continue to work, but API key variables alone never select a provider or model. Local session state is stored under the platform state directory unless `KOLEGA_CODE_STATE_DIR` is set.

## From source

```bash
git clone https://github.com/kolega-ai/kolega-code.git
cd kolega-code
uv sync --extra dev
uv run kolega-code --version
```

## Tests

Fast tests run by default:

```bash
./run_tests.sh
```

Some slow and integration tests require real provider credentials. To run them locally, create an ignored `.env` file from the example and fill only the keys you need:

```bash
cp .env.example .env
./run_tests.sh --all
```

The test runner loads `.env` through pytest and keeps existing shell environment variables higher priority than values in the file. You can pass additional pytest arguments through the wrapper:

```bash
./run_tests.sh kolega_code/agent/tests/llm/test_client.py -ra
```
