Local-first AI coding agent for the terminal
Project description
Kolega Code
An AI coding agent that runs in your terminal — local-first, model-agnostic, plan-then-build.
Point Kolega Code at a project directory and it opens an interactive UI where you talk to an agent that can read and edit your code, run shell commands, search the codebase, browse the web, and dispatch specialized sub-agents to get work done.
It's local-first: the agent operates on your actual filesystem and terminal, and your sessions, settings, and API keys stay on your own machine.
Why Kolega Code
- Plans before it builds. A read-only Plan mode produces a reviewable plan and a
shared task list before anything changes; Build mode implements it. Toggle with
Shift+Tab. - Orchestrates many agents. For larger jobs, the main agent dispatches specialized sub-agents (investigation, browser, coding, general) and can fan them out in parallel for broad audits, large migrations, or implementing a plan's independent parts at once.
- Local-first by design. It works on your real files and terminal; sessions, settings, and credentials live on your machine, not in someone else's cloud.
- Bring your own model. Talks to a range of providers and lets you assign different models to different roles.
What it does
- Reads and edits your code. Opens files, searches across the codebase, creates new files, and applies precise edits.
- Runs commands. Executes shell commands and watches their output in a dedicated terminal view.
- Plans before it builds. Plan mode investigates and proposes; Build mode executes.
- Searches and browses the web. The agent can search for relevant pages, fetch URLs directly, or use the built-in browser agent (powered by Playwright) when a task needs site interaction.
- Dispatches sub-agents. Hands work off to specialized agents and tracks their activity live.
- Orchestrates workflows. With gigacode, it fans out many sub-agents in parallel.
- Works non-interactively too. Run a single prompt with
kolega-code ask, get JSON output, and save or resume sessions.
Quick start
1. Install with the script:
curl -fsSL https://kolega.dev/install-kolega-code.sh | sh
Or with uv (or pip):
uv tool install kolega-code
# or: pip install kolega-code
Verify the install:
kolega-code --version
2. Start a session in your project:
kolega-code .
3. Add a provider key. Open the Settings tab to pick a provider and model and save your
API key. Then press Shift+Tab anytime to switch between Plan and Build mode.
Resume a previous conversation:
kolega-code . --resume # latest session
kolega-code . --resume <id> # a specific thread or session
Two ways to use it
| Mode | Command | Best for |
|---|---|---|
| Interactive TUI | kolega-code . |
Day-to-day development, exploration, pair-programming |
| One-shot | kolega-code ask "…" |
Scripting, automation, quick questions, CI |
There are also helper commands for managing sessions and checking your setup:
kolega-code ask "summarize this repository" --project .
kolega-code sessions list --project .
kolega-code doctor --project .
Bring your own model
Kolega Code talks to a range of LLM providers — including Anthropic, OpenAI, Google, Moonshot, and DeepSeek — and lets you assign different models to different roles: a strong long-context model for coding, a fast cheap model for small utility calls, and one for extended "thinking". See Providers & Models.
Sign in with ChatGPT
If you have a paid ChatGPT plan (Plus, Pro, or Business), you can use it to run OpenAI models
instead of a separate API key. Run /login chatgpt in the TUI, complete the browser sign-in, and
Kolega Code switches to the OpenAI (ChatGPT subscription) provider (default gpt-5.5). Tokens are
stored locally (chmod 600) and refreshed automatically; /logout chatgpt removes them. See
Sign in with ChatGPT.
Configuration
Set your provider, model, and API keys from the Settings tab in the UI, or via environment variables and flags for non-interactive use:
export KOLEGA_CODE_PROVIDER=deepseek
export DEEPSEEK_API_KEY=...
kolega-code ask "summarize this repository" --project . --provider deepseek --model deepseek-v4-pro
API key variables only provide credentials — pick a provider/model explicitly or save one in
Settings. Local session state lives under your platform's state directory unless
KOLEGA_CODE_STATE_DIR is set. See the
Configuration docs
for the full story.
The web_search tool uses DuckDuckGo by default without a key. To choose another backend,
set it in Settings or export KOLEGA_CODE_WEB_SEARCH_BACKEND as firecrawl, tavily,
or searxng; use FIRECRAWL_API_KEY, TAVILY_API_KEY, or SEARXNG_BASE_URL as needed.
Requirements
- Python 3.11+
- An API key for at least one supported provider
- A terminal that supports a modern TUI (most do)
Documentation
Full documentation lives at kolega-ai.github.io/kolega-code:
Contributing
Contributions are welcome. See CONTRIBUTING.md for local setup, running the test suite, and building the docs site. Please report security issues privately per SECURITY.md.
License
Released under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kolega_code-0.8.0.tar.gz.
File metadata
- Download URL: kolega_code-0.8.0.tar.gz
- Upload date:
- Size: 9.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f2daa8c816305200a74fba8bf16dfe29bc7d29b62dcd67d98e0eb789e7e831b
|
|
| MD5 |
41366dde8b258b7435466d5fdbf4e46c
|
|
| BLAKE2b-256 |
564e75feaaf54e1e5c3b63d12c79a8caf7e2322634209892812c579ecc4f2bc2
|
Provenance
The following attestation bundles were made for kolega_code-0.8.0.tar.gz:
Publisher:
release.yml on kolega-ai/kolega-code
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kolega_code-0.8.0.tar.gz -
Subject digest:
9f2daa8c816305200a74fba8bf16dfe29bc7d29b62dcd67d98e0eb789e7e831b - Sigstore transparency entry: 1911889266
- Sigstore integration time:
-
Permalink:
kolega-ai/kolega-code@cb9148afeda9b3e74c92161ea5dd55884cf4cb15 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/kolega-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cb9148afeda9b3e74c92161ea5dd55884cf4cb15 -
Trigger Event:
push
-
Statement type:
File details
Details for the file kolega_code-0.8.0-py3-none-any.whl.
File metadata
- Download URL: kolega_code-0.8.0-py3-none-any.whl
- Upload date:
- Size: 671.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
554fd167c2009b3ca04153f2558beb179537b2fb4900f92b8dfcedf163408929
|
|
| MD5 |
a9c92e45926a48385f9ecf854e68a807
|
|
| BLAKE2b-256 |
e2c533c2cb9ffc29c0ee4929ecbfa0120e6dc641fe0ec6533e34229ca3e7f429
|
Provenance
The following attestation bundles were made for kolega_code-0.8.0-py3-none-any.whl:
Publisher:
release.yml on kolega-ai/kolega-code
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kolega_code-0.8.0-py3-none-any.whl -
Subject digest:
554fd167c2009b3ca04153f2558beb179537b2fb4900f92b8dfcedf163408929 - Sigstore transparency entry: 1911889479
- Sigstore integration time:
-
Permalink:
kolega-ai/kolega-code@cb9148afeda9b3e74c92161ea5dd55884cf4cb15 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/kolega-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cb9148afeda9b3e74c92161ea5dd55884cf4cb15 -
Trigger Event:
push
-
Statement type: