Gordian Envelope command line tool
npm install @bcts/envelope-cli> Disclaimer: This package is under active development and APIs may change.
@bcts/envelope-cli is a command line tool for manipulating Gordian Envelope data structures. Gordian Envelope is a smart document format that supports encryption, elision, and cryptographic assertions.
Features:
- Create and manipulate Gordian Envelopes
- Add assertions (subject-predicate-object triples)
- Encrypt and decrypt envelope contents
- Sign and verify envelopes
- Elide (redact) portions of envelopes while maintaining verifiability
- Work with XID (Extensible Identifier) documents
- Pattern matching for querying envelope structures
This TypeScript implementation is based on bc-envelope-cli-rust v0.33.0 (commit).
``bashInstall globally
bun add -g @bcts/envelope-cli
Usage
$3
`bash
Create a simple envelope with a string subject
envelope subject string "Hello, World!"Create an envelope with assertions
envelope subject string "Alice" | envelope assertion add pred string "knows" obj string "Bob"Wrap an envelope
envelope subject string "Secret" | envelope wrap
`$3
`bash
Add a predicate-object assertion
envelope assertion add pred string "name" obj string "Alice"Find assertions matching a pattern
envelope assertion find pred string "name"Remove an assertion
envelope assertion remove pred string "name"
`$3
`bash
Generate a private key
envelope generate prvkeysSign an envelope
envelope sign --prvkeys $PRIVATE_KEYVerify a signature
envelope verify --pubkeys $PUBLIC_KEYEncrypt an envelope
envelope encrypt --key $SYMMETRIC_KEYDecrypt an envelope
envelope decrypt --key $SYMMETRIC_KEY
`$3
`bash
Create a new XID document
envelope xid new $PRVKEYSAdd a service to XID
envelope xid service add --name "website" --uri "https://example.com"Work with provenance marks
envelope xid provenance get
envelope xid provenance next
`$3
`bash
Elide a portion of an envelope
envelope elide removing $DIGESTReveal elided content
envelope elide revealing $DIGEST
`Command Line Reference
`
Usage: envelope [options] [command]Commands:
subject Create or extract envelope subject
assertion Work with assertions
wrap Wrap an envelope
unwrap Unwrap an envelope
sign Sign an envelope
verify Verify envelope signatures
encrypt Encrypt envelope content
decrypt Decrypt envelope content
elide Elide envelope content
compress Compress an envelope
decompress Decompress an envelope
extract Extract data from envelope
format Format envelope for display
generate Generate keys and other values
xid Work with XID documents
sskr Split/join using SSKR
walk Navigate envelope structure
Options:
-h, --help Display help
-V, --version Display version
``