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 12 structural 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 12 structural 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.1.0.tar.gz (106.8 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.1.0-py3-none-any.whl (121.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: trugs_tools-2.1.0.tar.gz
  • Upload date:
  • Size: 106.8 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.1.0.tar.gz
Algorithm Hash digest
SHA256 b021b87a65c3bf06cba5f135736eced8a3f490d044570dad69a5b8fd5827707b
MD5 a4e2e7072af4f4acb3cc783fc2106f83
BLAKE2b-256 04b00d8b5b9cab2733fdb0b1965c83efcad312f5d67f366a9bb093d153833ad1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: trugs_tools-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 121.9 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5eadace58da860c795690730b873ddd56002cde6d6fa017fec8ab37d891fd1e6
MD5 51a2d638e47b742ac6fbcc508409e4cf
BLAKE2b-256 3e65b4ceb7e463b96a02732687af3ce031308d63383dae4ad73980aa29abd53a

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