Skip to main content

TRUGS Tools

The TRUGS language CLI. One binary, trug — validate TRUG graphs, compile and decompile TRL, graph-node CRUD, Dark Code compliance, and corpus audit. Implements TRUGS 2.0 (core_v2.0.0).

TRUG/L (TRL) is a constrained subset of English: every valid sentence compiles to a graph and every graph decompiles back to the sentence, losslessly. You write TRL when communicating; you store and validate TRUGS (the JSON graph) when executing. The sentence is the graph.

Install

pip install trugs-tools

Quickstart

trug --help                          # the verb list, one summary per verb
trug validate first.trug.json        # the 16 CORE rules -> VALID / INVALID
trug trl compile hello.trl > hello.trug.json   # TRL sentence -> TRUG graph (saved to file)
trug trl decompile hello.trug.json             # graph -> the sentence, losslessly
trug compliance src/                 # Dark Code compliance scan

New to TRUGS? The five-minute on-ramp: GETTING_STARTED.md

Command surface

Eight verbs on the trug binary:

verb what it does
validate Validate a TRUG JSON file against the 16 CORE rules
trl Compile / decompile / validate TRL ↔ TRUG
get Read full content of a node in a TRUG graph
update Update properties on an existing node
delete Remove nodes and their connected edges
unlink Remove specific edges from a TRUG graph
compliance Dark Code compliance check over a source tree
audit Corpus-side audit bridges (markdown / vocab)

Every verb documents examples and exit codes: trug <verb> --help.

Folder cartography — keeping a directory tree and its TRUG graph in sync and rendering ARCHITECTURE.md — is the sibling package trugs-folder (binary: trug-a-folder).

Role in the TRUGS-LLC portfolio

  • TRUGS — the specification (CORE + TRL + reference papers) and the getting-started guide.
  • TRUGS-TOOLS (this repo) — the language CLI trug (this package) + the cartography tool trug-a-folder (trugs-folder/).
  • TRUGS-STORE — the swappable graph-storage backend both tools sit on.

Documentation

Development

make dev      # editable installs: the trug CLI + the bundled trugs-folder suite
make check    # the Tier-1 gate — the bundled trugs-folder tests + self-validation

The last make check step is Layer-4 self-description: the engine validates the repo's own folder.trug.json against the TRUGS CORE rules it implements.

License

Apache-2.0 — see LICENSE and NOTICE.

Download files

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

Source Distribution

trugs_tools-2.2.0.tar.gz (118.3 kB view details)

Uploaded Source

Built Distribution

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

trugs_tools-2.2.0-py3-none-any.whl (134.5 kB view details)

Uploaded Python 3

File details

Details for the file trugs_tools-2.2.0.tar.gz.

File metadata

  • Download URL: trugs_tools-2.2.0.tar.gz
  • Upload date:
  • Size: 118.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for trugs_tools-2.2.0.tar.gz
Algorithm Hash digest
SHA256 6abbd9e3fc765e4aab07b3522360e2d2a91e6a77c8c12c18eecda738dc015afe
MD5 7da1d2baaaffc6d52095db1bd66e010a
BLAKE2b-256 c4d1cc3990a7794b61771cb2ccc00a7c7d8ff1020fc2a83926bda6fba32ff9d9

See more details on using hashes here.

File details

Details for the file trugs_tools-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: trugs_tools-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 134.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for trugs_tools-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 387d4f0186c986831df47dc45aeb086a70df6e3b1ef486af0ce1f67ecdcb1618
MD5 569e28b5250f09c6ca92f8eab163e243
BLAKE2b-256 3bb9f16cb3a2951d69091aa5c4661efb4f181449f41f522f68a712156dadf632

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 Sentry Error logging StatusPage Status page