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 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 declared pin, verified against 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, 1 findings, 2 usage error); 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

leji-1.4.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

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

leji-1.4.0-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

Details for the file leji-1.4.0.tar.gz.

File metadata

  • Download URL: leji-1.4.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for leji-1.4.0.tar.gz
Algorithm Hash digest
SHA256 748528d327e6ad01a8c8ea7b2146bc5bb506e7aa978b5871ce4affd9474078ad
MD5 ff5c8c9ccfecfbd6a34686cf26b70901
BLAKE2b-256 085c8f9a765e20bc582349c2904d216096cdc5555c167305b98354642d10e68d

See more details on using hashes here.

Provenance

The following attestation bundles were made for leji-1.4.0.tar.gz:

Publisher: release.yml on leji-org/leji

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file leji-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: leji-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for leji-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54245c8ef1bece1ebd30d14a1f0287c0c370b3db2745a92eb1cf6fe8ca2444c6
MD5 c8fafe74b8da502e8af510ddbd3e9cb1
BLAKE2b-256 454ec051f8317e826db509a4a6b781d7215247c83941385c0d8b1cfd54cab7a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for leji-1.4.0-py3-none-any.whl:

Publisher: release.yml on leji-org/leji

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 files

1.3.1

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page