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 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.
- Specification: https://leji.org
- Source: https://github.com/leji-org/leji (
packages/sdk-py) - License: Apache-2.0
Metadata
Release files for leji 1.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| leji-1.5.1.tar.gz | 1.4 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| leji-1.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.9 MB
Release files / leji-1.5.1.tar.gz
| Download URL | leji-1.5.1.tar.gz |
|---|---|
| Size | 1.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0015d0517587e839e3aaa2e4ed30410e9fb06fe1a6fbb272d518ff70b2affc9d
|
|
BLAKE2b-256 checksum How to use checksums |
f2be56029cb52fe6b0113a6667729ec6627ddb4cd6e852aaf046d43ec38c5b95
|
| 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 18, 2026.
Transparency logRelease files / leji-1.5.1-py3-none-any.whl
| Download URL | leji-1.5.1-py3-none-any.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd4794b1d0e2a920b569532b45e8581d8af7e530c93d0a9e8fee4da628dc15bd
|
|
BLAKE2b-256 checksum How to use checksums |
3801d173b5b554c2b72939d7b78ecac6edcc3a1dfbf3b94c8b3cb80be99fbb6d
|
| 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 18, 2026.
Transparency log