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.46.tar.gz (122.2 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.46-cp38-abi3-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.8+Windows x86-64

llmcc-0.2.46-cp38-abi3-manylinux_2_34_x86_64.whl (1.3 MB view details)

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

llmcc-0.2.46-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.46.tar.gz.

File metadata

  • Download URL: llmcc-0.2.46.tar.gz
  • Upload date:
  • Size: 122.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for llmcc-0.2.46.tar.gz
Algorithm Hash digest
SHA256 e078b69c17708d06f1482b369c469dfb09b5c5c0fbe950156102fda33f85949c
MD5 96529e52db9ff5a13b8c7958bd1925a8
BLAKE2b-256 0394efc137870261f93c87fc48800e9b12aa1bb090fb705cb4733f6bdc04e179

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llmcc-0.2.46-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: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for llmcc-0.2.46-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 87d1410f5e2de0b0f5fd63131cc8c5ed5a76fcf136bf42cbcf8263ac8eea107e
MD5 e6de8c51a153cdcef6a575df1d6c2542
BLAKE2b-256 5bbc2342867d372b59b7717e6477132caa74c9c7d8c62cdb8ad312af54038bdf

See more details on using hashes here.

File details

Details for the file llmcc-0.2.46-cp38-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for llmcc-0.2.46-cp38-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 34cd4e9e92ec5d57066fd7c3f2455acd6568cab74bf9692922ac970cccc7ddd8
MD5 2fe66d4f0bc534f229f88c2632f281b7
BLAKE2b-256 e36e500c6d85e930d9ea91abee502e00cba50945f581144e2e17c6797552ca99

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llmcc-0.2.46-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c6b9784a3d13d0b5f73c1adb0649fc213550115ab5ec5179fff5f05acc80aa35
MD5 cef36c380bbcc21560dea2039c4eb859
BLAKE2b-256 45bd5ac7f9f705833333167726b9a3a0a0961ac0e7cafef01cac5c16d2e8d0d1

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