Command-line tools for creating and managing TREF blocks.
Download and install the TREF CLI tool.
curl -sSL https://tref.lpmwfx.com/install.sh | bash
Publish your first TREF block from the command line.
tref publish "The speed of light is 299,792,458 m/s"
Include source URLs for verifiability.
tref publish "Fact here" --refs '[{"type":"url","url":"https://source.com"}]'
Create a new block based on an existing one, preserving lineage.
tref derive sha256:abc123... "Updated content with corrections"
Create a new TREF block.
tref publish "content"
tref publish -f file.md
echo "content" | tref publish --stdin
tref publish "content" --refs '[...]' --license CC-BY-4.0
Create a child block from a parent, preserving lineage.
tref derive <parent-id> "new content"
tref derive sha256:abc... "Updated" --refs '[{"type":"url","url":"..."}]'
Verify a block's integrity (ID matches content hash).
tref validate block.tref
tref validate published/ab/abc123...def.tref
Browse and read published blocks.
tref list # List all blocks
tref info sha256:abc... # Show metadata
tref cat sha256:abc... # Output content
tref cat sha256:abc... --format json