loci-tools
Hardware-grounded, execution-aware analysis for compiled C/C++/Rust binaries — timing, energy, stack depth, memory, and security.
loci is the single console-script front door (loci <group> <command>) to LOCI's
analysis primitives. It wraps those primitives and emits self-describing JSON on
stdout, designed to be consumed by an agent as much as by a human at a terminal.
Install
pip install loci-tools
This installs the loci console script.
Releasing a new version of this package: see RELEASING.md.
Usage
loci --help
loci login # browser PKCE sign-in
loci elf symbols --arch aarch64 path/to/binary.elf
loci timing --arch aarch64 ... # Cortex-A53; --arch neoverse-v2 for Neoverse V2
loci usage
loci doctor # read-only environment diagnostics
Every command emits one self-describing document on stdout: success is
{"ok": true, "data": {...}}, failure is {"ok": false, "error": {...}}. The
process exit code additionally gates shells and hooks. Output serialization is
switchable with --format (json, yaml, toon, csv, tsv, md).
Exit codes
Every handled error exits non-zero. These are the CLI's own error codes. loci build is the exception: a compile that fails exits with the compiler's own status,
or 127 when the compiler cannot be found.
| Code | Name | Meaning |
|---|---|---|
| 0 | OK |
Success. |
| 1 | RUNTIME |
An unexpected failure. |
| 2 | USAGE |
A bad flag or argument (argparse fixes this number), or input that cannot be read. |
| 3 | AUTH_REQUIRED |
No valid session: run loci login. |
| 4 | BACKEND |
The backend refused the request (4xx/5xx, quota, entitlement). |
| 5 | NOT_IMPLEMENTED |
The command exists but is not wired yet. |
| 6 | MANIFEST_STALE |
analyse measure: the tree moved since analyse prepare; nothing was billed. |
| 7 | INVALID_MANIFEST |
analyse measure: a bad --select, or a missing, malformed or edited manifest. |
Verdict exit codes: loci contract check --exit-code
A contract verdict is a finding, not an error, so loci contract check exits 0
and puts the verdict in data.verdict. With --exit-code it also exits with the
verdict, for a caller that gates on the exit status, such as a CI step. These codes
are a stable contract. They have their own band, so a verdict is never read as an
error, and contract check exits with nothing else but the error codes above:
| Code | Name | Meaning |
|---|---|---|
| 0 | SUCCESS |
pass, caution, or nothing judged and nothing failed. |
| 10 | FAIL |
data.verdict is fail: a severity: fail bound was breached. |
| 11 | ANALYSIS_FAILED |
data.analysis_failed is not empty: a measurement a contract entry covers is marked failed. |
When a run earns more than one, the worst wins: 10, then 11, then 0. So a run whose
verdict is caution but which also could not measure a covered figure exits 11.
A measurement row with neither a figure (curr) nor a failed mark is not an
analysis failure: its bound is reported unjudged, and on its own it exits 0. Errors
keep the codes in the first table, with or without the flag. The verdict is the
exit status even when the reader closes the pipe early (| head).
The analyse verbs predate this and report a fail verdict as exit 2. Gate on
loci contract check --exit-code instead.
License
Proprietary. See LICENSE.md.
Metadata
Release files for loci-tools 0.2.142
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| loci_tools-0.2.142-py3-none-any.whl | Python 3 | none | any | Details for loci_tools-0.2.142-py3-none-any.whl |
Release files / loci_tools-0.2.142-py3-none-any.whl
| Download URL | loci_tools-0.2.142-py3-none-any.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5346fd7449c94a1b366adc80684e03706addfc046175bd7bb73cb0d805638873
|
|
BLAKE2b-256 checksum How to use checksums |
23edcf96aa6d95b8fb8b90bd9bea44adff2ce1de19834945f77a1d4f80e5f8cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for loci-tools 0.2.142
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.