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

help(llmcc.run)

graph = llmcc.run(
	dirs=["crates/llmcc-core/src"],
	lang="rust",
	query="CompileCtxt",
	depends=True,
	summary=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.47.tar.gz (123.1 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.47-cp38-abi3-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.8+Windows x86-64

llmcc-0.2.47-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.47-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.47.tar.gz.

File metadata

  • Download URL: llmcc-0.2.47.tar.gz
  • Upload date:
  • Size: 123.1 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.47.tar.gz
Algorithm Hash digest
SHA256 2cd1b54d1f0d484c1d70db03c642745ac5d467faba96d9a1a59da34043090651
MD5 168554f6d8a20bf6d2bb8c2ce0caed9d
BLAKE2b-256 224785d6acd78c7ad0358dd05a280e9cff0398154fadd3e299a3582c738d94a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llmcc-0.2.47-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.47-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 2b8d74b7cf0e611160f3d715475d93c7a0fd38a5246a1d717bec5691daa62850
MD5 d9bfd39f3aad5723b0409f792df6326a
BLAKE2b-256 8b110fb22ca74c3201af1c6b4c28f1c53eba9816ca3a12cb4620e08f19412355

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llmcc-0.2.47-cp38-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d41eecdd108fca13986ce3ad2e3f65fcf92c6d2838f3338a83148db303aabb4b
MD5 fbd9504d4f0c0932344cbf763b018e90
BLAKE2b-256 6ee8ddf560e4b02f766220e716507b4dde28e47ff642dc57a68d5b083bec3ac9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llmcc-0.2.47-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 861c0c5a3551dc0c3aff63e56e43125ea5b6d9c8cb89a9446d36e6c4599b26a4
MD5 18a827307c7c9e21f99b680c768167a5
BLAKE2b-256 67fd94639783728e27379925e66cf8d2e85d81e00b9a18f73b76b86a502aabb5

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