Skip to main content

A modular toolkit for LLM powered codebase understanding.

Project description

CodeKite Code Intelligence Toolkit

codekite is a modular, production-grade Python toolkit for codebase mapping, symbol extraction, code search, and building LLM-powered developer tools, agents, and workflows.

Use codekite to build things like code reviewers, code generators, even IDEs, all enriched with the right code context.

Quick Installation

Install from PyPI

# Installation (includes all features)
uv tool install codekite # not implemented yet

Install from Source

git clone https://github.com/shaneholloman/codekite.git
cd codekite
uv sync
uv pip install -e .

Basic Usage

from codekite import Repository

# Load a local repository
repo = Repository("/path/to/your/local/codebase")

# Load a remote public GitHub repo
# repo = Repository("https://github.com/owner/repo")

# Explore the repo
print(repo.get_file_tree())
# Output: [{"path": "src/main.py", "is_dir": False, ...}, ...]

print(repo.extract_symbols('src/main.py'))
# Output: [{"name": "main", "type": "function", "file": "src/main.py", ...}, ...]

Key Features & Capabilities

codekite helps your apps and agents deeply understand and interact with codebases, providing the core components to build your own AI-powered developer tools. Here are just a few of the things you can do:

  • Explore Code Structure:

    • Get a bird's-eye view with repo.get_file_tree() to list all files and directories.
    • Dive into specifics with repo.extract_symbols() to identify all functions, classes, and other code constructs, either across the entire repository or within a single file.
  • Pinpoint Information:

    • Perform precise textual or regular expression searches across your codebase using repo.search_text().
    • Track down every definition and reference of a specific symbol (like a function or class) with repo.find_symbol_usages().
  • Prepare Code for LLMs & Analysis:

    • Break down large files into manageable pieces for LLM context windows using repo.chunk_file_by_lines() or repo.chunk_file_by_symbols().
    • Instantly grab the full definition of a function or class just by knowing a line number within it using repo.extract_context_around_line().
  • Generate Code Summaries (Alpha):

    • Leverage LLMs to create natural language summaries for files, functions, or classes using the Summarizer (e.g., summarizer.summarize_file(), summarizer.summarize_function()).
    • Build a searchable semantic index of these AI-generated docstrings with DocstringIndexer and query it with SummarySearcher to find code based on intent and meaning.
  • And much more... codekite also offers capabilities for semantic search on raw code, building custom context for LLMs, and more.

License

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

codekite-0.1.5.tar.gz (56.5 kB view details)

Uploaded Source

Built Distribution

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

codekite-0.1.5-py3-none-any.whl (40.0 kB view details)

Uploaded Python 3

File details

Details for the file codekite-0.1.5.tar.gz.

File metadata

  • Download URL: codekite-0.1.5.tar.gz
  • Upload date:
  • Size: 56.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.2

File hashes

Hashes for codekite-0.1.5.tar.gz
Algorithm Hash digest
SHA256 873a1c5453f17d6d31023e0c8b747760b89faf4f85b1245bf4ef586700decd84
MD5 f6d69c2a054952ed76cbd7332538cb4b
BLAKE2b-256 9d9d575da6c886bdb9fd6a2ecde2b551ce78f6e8f95b826255b6072b807096a2

See more details on using hashes here.

File details

Details for the file codekite-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: codekite-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 40.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.2

File hashes

Hashes for codekite-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8859067932c2e86933e519d7e5c4faae5e965b1cd3e2941bf2b60e705f4f65fb
MD5 1d3a903df96444b02fb91ecd5cd68817
BLAKE2b-256 708d8fa04ae9e45dcf6bb450f71eba04f047d166e25614491857268ee9b272cc

See more details on using hashes here.

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