Skip to main content

TRUGS cartography reference tool — sync a filesystem with its TRUG graph and render ARCHITECTURE.md. Single `trug-a-folder` binary. Implements TRUGS 2.0 (core_v2.0.0).

Project description

trugs-folder

TRUGS cartography. One binary, trug-a-folder — keep a directory tree and its TRUG graph in sync, validate it against the folder governance rules, and render a human-readable ARCHITECTURE.md from it. Implements TRUGS 2.0 (core_v2.0.0).

The idea: the folder is a graph. folder.trug.json holds one node per file, typed by the governance vocabulary (code is COMPONENT, prose is DOCUMENT), and the tool keeps that graph honest as the directory changes.

Install

pip install trugs-folder

Quickstart

trug-a-folder init myproject --scan -d "My first mapped folder"
trug-a-folder check myproject
trug-a-folder render architecture myproject
trug-a-folder sync myproject        # reconcile after files change

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

Command surface

Fourteen verbs on the trug-a-folder binary:

verb what it does
init Initialize folder.trug.json in a directory
check Validate against the governance rules
sync Reconcile the graph with the filesystem
render Render ARCHITECTURE.md from the graph
info Show summary information about a TRUG file
ls List directory contents with TRUG metadata
where Search all folder graphs for a concept, node, or file
find Query nodes by type / name / dimension
add Add files to the graph
mv Move/rename a node
link Create or remove typed edges between nodes
dim Manage dimensions
export Export folder.trug.json from the database
import Import folder.trug.json into the database

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

The language CLI — validating arbitrary TRUG graphs and compiling TRL — is the sibling package trugs-tools (binary: trug), which this package builds on.

Lineage

This package descends from the cartography half of trugs-tools 1.0.0; the 2.0 release split it onto its own wheel. History is in CHANGELOG.md.

License

Apache-2.0. See LICENSE and NOTICE.

Project details


Download files

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

Source Distribution

trugs_folder-2.0.0.tar.gz (99.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_folder-2.0.0-py3-none-any.whl (75.1 kB view details)

Uploaded Python 3

File details

Details for the file trugs_folder-2.0.0.tar.gz.

File metadata

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

File hashes

Hashes for trugs_folder-2.0.0.tar.gz
Algorithm Hash digest
SHA256 81c3b07c1c8d72b9656e547c85d603789924b5308e2a7cfb7398b948a3022abb
MD5 3e4d547e056a719eaf85eec84051c89c
BLAKE2b-256 ff55bc88c2ccccc0e60ee2624b18c16021d43f55f1bae93c90179f82535c6a7a

See more details on using hashes here.

File details

Details for the file trugs_folder-2.0.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for trugs_folder-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d866c81d1aa28d5288118124f59c3d1ce152676b950b05ed2e83accfebfee68
MD5 566b6e3f46369edee2f628b82558a10f
BLAKE2b-256 105afe04cca309ec14685a097f910a24129a601f941e4c54c1cd9153b9cd3c0c

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