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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

llmcc-0.2.40-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.40-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.40-cp38-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for llmcc-0.2.40-cp38-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 48b0f9755bb7a00da31f2d37e1710a833d99931c2d78ab6c2d7fc46652d114cd
MD5 b4257bd827e0cd8b340ec9b5c6c7c47f
BLAKE2b-256 5c96104af6ef7691f55a556cf5a3e775e0e7efed9be546214452b34ffcd56ade

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llmcc-0.2.40-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0cfa652d0405900466a55da683b3e28359263bf2e5b7f0ff522bf26f991171fc
MD5 48ac7299d61aa6f5de45879523700ac2
BLAKE2b-256 71e1c52b1448de300463c7238c49535a634120b0756d3b43900fdb0ada2f3a7a

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