Skip to main content

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.

PyPI version Python versions License: MIT CI Docs

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.

Kolega Code in action

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.
  • Browses the web. A built-in browser agent (powered by Playwright) fetches pages and interacts with sites when a task needs it.
  • 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.

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.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kolega_code-0.6.0.tar.gz (9.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kolega_code-0.6.0-py3-none-any.whl (565.3 kB view details)

Uploaded Python 3

File details

Details for the file kolega_code-0.6.0.tar.gz.

File metadata

  • Download URL: kolega_code-0.6.0.tar.gz
  • Upload date:
  • Size: 9.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kolega_code-0.6.0.tar.gz
Algorithm Hash digest
SHA256 469acce26c93ef5575ff80933f9364e7bd88ebbc7513cad9a3b38ec9f7cb6b06
MD5 497703808b92d2045630789b43c333ef
BLAKE2b-256 bb8b1ecde08585b8007fdae5e3a4a776e66cfd8c6361c33e26e499e7c257114b

See more details on using hashes here.

Provenance

The following attestation bundles were made for kolega_code-0.6.0.tar.gz:

Publisher: release.yml on kolega-ai/kolega-code

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kolega_code-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: kolega_code-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 565.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kolega_code-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5ff4e8ff17bb46546a0bd18e343abe7283326dd9bff61feaaecac1bdeb1f0676
MD5 b6654561f8f9d904ff5ddec1f5dd4582
BLAKE2b-256 c09f868acc9df20a3256d4bbd15daf5c18fb37ee87024d05cf09ec0960cf862d

See more details on using hashes here.

Provenance

The following attestation bundles were made for kolega_code-0.6.0-py3-none-any.whl:

Publisher: release.yml on kolega-ai/kolega-code

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page