Skip to main content

LLM Context Compiler - Universal context builder for any language and document type

Project description

llmcc

"Prompts are the modern assembly language, models are the modern CPU."

llmcc is a universal context builder for any language, any document.

abstract

llmcc explores automated context generation through symbolic graph analysis. bridging the semantic gap between human-written code/documents and AI model understanding, using modern compiler design principles.

design

design

examples

llmcc --dir codex/codex-rs --lang rust --design-graph --pagerank --top-k 100

codex: graph

llmcc --dir kimi-cli --lang python --design-graph --pagerank --top-k 80

kimi-cli: graph

run

llmcc [OPTIONS] < --file <FILE>...|--dir <DIR>... >

Input (required, one of):

  • -f, --file <FILE>... — Individual files to compile (repeatable)
  • -d, --dir <DIR>... — Directories to scan recursively (repeatable)

Language (optional):

  • --lang <LANG> — Language: 'rust' or 'python' [default: rust]

Analysis (optional):

  • --design-graph — Generate high-level design graph
  • --pagerank --top-k <K> — Rank by importance (PageRank) and limit to top K
  • --query <NAME> — Symbol/function to analyze
  • --depends — Show what the symbol depends on
  • --dependents — Show what depends on the symbol
  • --recursive — Include transitive dependencies (vs. direct only)

Output format (optional):

  • --summary — Show file paths and line ranges (vs. full code texts)
  • --print-ir — Internal: print intermediate representation
  • --print-block — Internal: print basic block graph

Examples:

# Design graph with PageRank ranking
llmcc --dir crates --lang rust --design-graph --pagerank --top-k 100

# Dependencies and dependents of a symbol
llmcc --dir crates --lang rust --query CompileCtxt --depends
llmcc --dir crates --lang rust --query CompileCtxt --dependents --recursive

# Cross-directory analysis
llmcc --dir crates/llmcc-core/src --dir crates/llmcc-rust/src --lang rust --design-graph --pagerank --top-k 25

# Multiple files
llmcc --file crates/llmcc/src/main.rs --file crates/llmcc/src/lib.rs --lang rust --query run_main

python

Install the published package from PyPI:

pip install llmcc

With the package available, invoke the API directly:

import llmcc

graph = llmcc.run(
	dirs=["crates/llmcc-core/src"],
	lang="rust",
	query="CompileCtxt",
	design_graph=True,
)
print(graph)

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

llmcc-0.2.44.tar.gz (122.6 kB view details)

Uploaded Source

Built Distributions

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

llmcc-0.2.44-cp38-abi3-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.8+Windows x86-64

llmcc-0.2.44-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

llmcc-0.2.44-cp38-abi3-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

File details

Details for the file llmcc-0.2.44.tar.gz.

File metadata

  • Download URL: llmcc-0.2.44.tar.gz
  • Upload date:
  • Size: 122.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.6

File hashes

Hashes for llmcc-0.2.44.tar.gz
Algorithm Hash digest
SHA256 896bff524978f5adf5bef4dd62bf099a7f40adae1b21da63278a2dcca11aa2d9
MD5 da2f7c9a1158e7d29f00f75a430a7059
BLAKE2b-256 ba7aa4476ffe142d969869b14ac0b78d30ba4e64f8cbdbc6837f120dd8701128

See more details on using hashes here.

File details

Details for the file llmcc-0.2.44-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: llmcc-0.2.44-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.6

File hashes

Hashes for llmcc-0.2.44-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b0e6faf2caa0dae9eefa64448b1e761ee04aa5fe80871ceaebeb8b72803c1356
MD5 b02fcb4dfdaf7739614f11c7f0edd0df
BLAKE2b-256 cdb787423e7fe9b32321316a79d0f8547f8f38efc801da44571325cee79e5130

See more details on using hashes here.

File details

Details for the file llmcc-0.2.44-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for llmcc-0.2.44-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 adf55ed8e6009342d0dd5e587d8f703cc618cb084cdb4cf8e0b9fab76c475308
MD5 91fa9ebbb801d7e4b8c168c14d1be3df
BLAKE2b-256 c54f0d3356e8dd77b529f4ec28796eb1657351a55d0e8adf0fa87cfd3661c69e

See more details on using hashes here.

File details

Details for the file llmcc-0.2.44-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for llmcc-0.2.44-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9cb8c4bfe810faefcf68354f3298947cef652aea6264045d9b16016b273b4589
MD5 797b5b8aa638bdc11404ed0b1bdc1e93
BLAKE2b-256 4a1eba4e432768d8e28fc79b4df0cf20d1fbb6cd15d26d539a035ecf90195e35

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