KittyCode - Hackable coding agent
KittyCode is a minimal terminal coding agent focused on a compact, readable implementation. It keeps the core runtime straightforward, with an agent loop, local tools, context compression, a small command-line interface, and support for both OpenAI-compatible and Anthropic APIs.
Get Started
- Install KittyCode:
pip install kittycode
- Configure KittyCode with the guided setup:
kittycode --config
This is the recommended way to create or repair ~/.kittycode/config.json.
- Start the interactive terminal UI:
kittycode
Background
KittyCode is inspired by NanoCoder and keeps the same general idea of a small terminal coding agent while simplifying the project around the core runtime.
KittyCode follows a simple terminal-agent runtime model:
- A user message is sent through the configured model interface.
- The model can either answer directly or call tools.
- Tool calls are executed locally and the results are fed back into the conversation.
- The loop continues until the model returns plain text.
The project is intentionally small. It includes the core agent runtime, a compact CLI, session persistence, context compression, and a default built-in tool set.
Features
- Minimal agent loop with optional parallel execution for multiple tool calls.
- LLM adapter that supports both OpenAI-compatible and Anthropic interfaces.
- Core built-in tools for shell execution, file operations, web search, web fetch/crawling, TODO tracking, and sub-agents.
- Interactive REPL and one-shot command mode, with
Escinterrupt support. - Context compression to keep long sessions manageable.
- Session save and resume support.
Requirements
- Python 3.10 or newer
- An API key for either an OpenAI-compatible endpoint or an Anthropic-compatible endpoint
Skills
At startup, KittyCode scans ~/.kittycode/skills for skill folders. Each skill should live in its own directory and include a SKILL.md file at the top level.
Expected layout:
~/.kittycode/skills/
example-skill/
SKILL.md
other-files...
KittyCode reads the leading name and description fields from each SKILL.md, keeps the resulting skill list in memory, and appends that list to each user turn inside a <system-reminder> block. The reminder includes:
namedescriptionpath
This allows the model to see which local skills are available and decide when to read and use them.
KittyCode loads skills once at startup and keeps that snapshot fixed for the lifetime of the process. Restart KittyCode after adding or editing skills.
You can also invoke a loaded skill directly from the CLI with /<skill name>.
/<skill name>selects that skill for your next non-command message./<skill name> <task>runs the next request immediately with that skill.
Usage
Run the interactive terminal UI:
kittycode
When the CLI is busy, press Esc to interrupt the current run. The stop is cooperative: KittyCode cancels at the next safe checkpoint between LLM streaming, tool dispatch, and loop rounds. A blocking external call may still need to return before the run fully stops.
You can also use the module entry point:
python -m kittycode
Run a one-shot prompt and exit:
kittycode -p "Explain the project structure"
Resume a saved session:
kittycode -r session_1234567890
Run the configuration wizard:
kittycode --config
Interactive Commands
Inside the REPL, KittyCode supports:
/help/reset/skills/<skill name>/model <name>/tokens/compact/save/sessions/quit
The /skills command prints the skills loaded at startup.
Slash commands also support prefix matching while typing, so entering / shows matching commands and skills through completion suggestions.
Project Layout
kittycode/__init__.py: public exports and compatibility aliases for moved runtime moduleskittycode/main.py: CLI entrypoint wrapperkittycode/cli.py: interactive and one-shot CLIkittycode/config/__init__.py: config.json loadingkittycode/llm/__init__.py: provider adapter and streaming parsingkittycode/prompt/__init__.py: system/user prompt builderskittycode/skills/__init__.py: local skill discovery and cachingkittycode/runtime/: agent loop, context compression, interrupts, session helpers, and logging setupkittycode/tools/: built-in toolstests/: focused runtime and tool tests
Development
Run the test suite:
python -m pytest -q
The current test suite covers the exported API, config-file behavior, provider conversion helpers, context compression, session helpers, the default tool registry, and skill discovery/prompt injection.
Metadata
Release files for kittycode 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kittycode-1.0.0.tar.gz | 291.7 kB | Without provenance | Details for kittycode-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kittycode-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for kittycode-1.0.0-py3-none-any.whl |
Total release size: 361.2 kB
Release files / kittycode-1.0.0.tar.gz
| Download URL | kittycode-1.0.0.tar.gz |
|---|---|
| Size | 291.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c8cad78d4afbc597c153c86dc324a6e23aa7cd20208291951cf21db02bfc2de5
|
|
BLAKE2b-256 checksum How to use checksums |
283113153ad605b7983a58517c0353d4ad477062ae36b59e99202e90b05d7fe9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / kittycode-1.0.0-py3-none-any.whl
| Download URL | kittycode-1.0.0-py3-none-any.whl |
|---|---|
| Size | 69.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2df7b82d18bafc2996e1a7a53f78e25261a86549e72ad27cbac0964164ff86c3
|
|
BLAKE2b-256 checksum How to use checksums |
cb32dee3727c568cbb205ea47c9d22c63f14e6e3f2bf3672b0f49021e2c6a9a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for kittycode 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.