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

Install with: cargo install llmcc

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

llmcc --design-graph --pagerank --top-k 100 --lang python --dir scikit-learn

scikit-learn: graph

llmcc --design-graph --pagerank --top-k 100 --lang rust --dir ripgrep

ripgrep: graph

llmcc --design-graph --pagerank --top-k 100 --lang rust --dir tokio

tokio: 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)

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

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.50.tar.gz (137.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.50-cp38-abi3-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.8+Windows x86-64

llmcc-0.2.50-cp38-abi3-manylinux_2_34_x86_64.whl (1.4 MB view details)

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

llmcc-0.2.50-cp38-abi3-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: llmcc-0.2.50.tar.gz
  • Upload date:
  • Size: 137.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.50.tar.gz
Algorithm Hash digest
SHA256 2cad926e4d9a2ed862380c7ca3e4ae528a975ed7da1c4e13eed08f7759d9a38a
MD5 4f8dd41cba9e8989a1159598cbb8066e
BLAKE2b-256 99d335d707b0d8e1bdbda0ae2169575efbbaf5e3b59c451dc6a64982e64392a0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llmcc-0.2.50-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.3 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.50-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b386e42db026e6a0e79ad30ec060d8f635feeac974e24c85d4cde40974778a37
MD5 c405453ec93860d25de9ce27c6097334
BLAKE2b-256 fce2ed2f1ed64863ce8c230ebcb13d6e151edf00912dba1ad9e85b8983f6e12c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llmcc-0.2.50-cp38-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 19bf534dfa8b3ab44678c3db54493f3c8357dc4a2e11fdb268adef56256c1f69
MD5 b45c41cbeaaa26b4cb6809bb89b998a1
BLAKE2b-256 b1336e009928805a1561f3f1d92f09f232c9fe961243dde33e84cf6f98966df3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llmcc-0.2.50-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fc3e9668b64ae9ca473ac76f043a870cc85b79d5cbc8bd24976ae0798e1d1a28
MD5 018601c011efba4ce837c33a4d289990
BLAKE2b-256 604007ae7497856e65abef715b39a46b07cb12013b72cfa2a259f3a79141bd1e

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