Skip to main content

leji (Python)

Reference SDK and CLI for the Leji specification: the open specification for the shared context layer of AI-native teams.

pip install leji        # or: uv tool install leji / pipx install leji
leji init               # bootstrap a context layer interactively
leji validate           # manifest, artifacts, frontmatter, lint rules
leji index              # generate the context index
leji index --check      # fail when the index is stale
leji changelog check    # append-only discipline
leji freshness          # review-horizon report
leji conformance        # score the layer against its claimed level
leji badge              # write the self-attested conformance badge and its markdown
leji status             # unindexed, dangling, and stale documents
leji route              # the governed context a task's scope routes to
leji viewer             # generate the static viewer for the context layer
leji viewer build       # export a self-contained static viewer folder
leji viewer serve       # generate, then serve it locally
leji view               # generate, serve, and open it in your browser
leji detect             # find installed agent hosts
leji start              # open the layer in a detected agent host
leji doctor             # report this clone's setup without launching an agent
leji adopt              # map an existing entrypoint into a context layer
leji ci                 # add a validate workflow (--provider github|gitlab|circleci|azure)
leji agent --name <n>   # bind an additional named agent into the layer
leji mounts hydrate     # materialize declared federation mounts into the resolver cache
leji mounts status      # each mount's availability, integrity, and pin ancestry
leji mounts locate      # resolver state for one mount: projection path, pin, verification
leji mounts update-pin  # move one mount's pin, checked against the local witness (--fetch: the source)
leji changelog compact  # fold the oldest changelog entries into one compaction entry

See the full command reference (flags, exit codes, examples) at https://leji.org/cli/.

Inside a repository that declares leji, has a project environment inside the repository (.venv, or uv's UV_PROJECT_ENVIRONMENT) with a copy meeting the layer's minimum, leji runs that copy; set LEJI_NO_LOCAL to any value to run this one.

Behaviorally identical to the @leji-org/leji npm package and the Go SDK: same commands, same flags, same findings, same exit codes (0 clean, warnings included; 1 a check that did not pass, with or without a finding; 2 a usage error or an internal failure); the one runtime-specific behavior is the hand-off above, which the Node and Python CLIs perform and the Go CLI does not (there, run the pinned copy with go tool leji). All three implementations are tested against one shared fixture suite. Install whichever matches your toolchain; agents and CI see the same tool either way.

Supports spec line 1.0. Schemas and templates for that line ship inside the package; no network access is needed.

Metadata

Release files for leji 1.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for leji 1.5.2
File Size Uploaded
leji-1.5.2.tar.gz 1.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for leji 1.5.2
File Interpreter ABI Platform
leji-1.5.2-py3-none-any.whl Python 3 none any Details

Total release size: 2.9 MB

Release files / leji-1.5.2.tar.gz

Download URL leji-1.5.2.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
4b37c942c5db091791eb44817fae96197e8eac5fa126268541cf6059e98c4246
BLAKE2b-256 checksum
How to use checksums
a021ce4c5e7932124d6e6c1fd8d0a888588029b34d4804921a04f20665c7fb7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / leji-1.5.2-py3-none-any.whl

Download URL leji-1.5.2-py3-none-any.whl
Size 1.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
bcdf27dc68c996ae0b873cc2d28e438ef547b2316f9ba85521f0771607dd2676
BLAKE2b-256 checksum
How to use checksums
a84eb3bed45d79f7973ede04ec17959635addf4957c51ced7349708a815af208
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.5.2 This release

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page