TheDocumentation Index
Fetch the complete documentation index at: https://docs.truthlocks.com/llms.txt
Use this file to discover all available pages before exploring further.
@truthlock/protect CLI lets creators and developers protect code, research, designs, and digital content from the terminal. Every protection creates a cryptographic proof of authorship anchored to the Truthlocks transparency log.
Installation
Install globally via npm, run directly with npx, or use Docker:Run with Docker
You can also run the CLI as a Docker container without installing Node.js. Pass your credentials as environment variables and mount your project directory:Authentication
You need a personal access token from your Truthlocks Verify account. Get one at verify.truthlocks.com/settings.Protecting Files
Theprotect command computes the SHA-256 hash of your file, mints a cryptographic attestation, and records it in the transparency log:
code— source code, scripts, configsresearch— papers, datasets, experimentsdesign— Figma, Sketch, XD filesmedia— video, audiodigital-art— images, illustrationswriting— documents, articlesdataset— CSV, Parquet, Arrowai-output— AI-generated contentother— anything else
Listing Protections
Verifying a Protection
CI/CD Integration
Protect artifacts automatically in your CI pipeline. SetTRUTHLOCK_TOKEN as a secret in your CI environment.
GitHub Actions
GitLab CI
All Commands
| Command | Description |
|---|---|
login --token <t> | Save authentication token |
logout | Remove stored token |
whoami | Show current user |
protect <file> | Protect a file |
list | List protections |
verify <id> | Verify an attestation |
Configuration
The CLI stores configuration in~/.truthlock/config.json. You can also override settings via environment variables:
| Variable | Default | Description |
|---|---|---|
TRUTHLOCK_TOKEN | — | Authentication token |
TRUTHLOCK_API_URL | https://api.truthlocks.com | API base URL |

