🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@treza/cli

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@treza/cli

Command-line interface for the Treza platform - manage enclaves, KYC proofs, and more

Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
11
-45%
Maintainers
1
Weekly downloads
 
Created
Source

Treza CLI

Command-line interface for the Treza platform

npm version License Documentation

Manage secure enclaves, verify KYC proofs, and interact with the Treza platform directly from your terminal.

Installation

npm install -g @treza/cli

Or with yarn:

yarn global add @treza/cli

Quick Start

# Configure the CLI with your wallet
treza config init

# List your enclaves
treza enclave list

# Create an enclave from a Docker image
treza enclave create \
  --name "My Enclave" \
  --source-type registry \
  --image nginx:latest \
  --region us-west-2

# Create an enclave from a GitHub repository
treza enclave create \
  --name "My App Enclave" \
  --source-type github \
  --github-repo https://github.com/my-org/my-app \
  --github-branch main \
  --region us-west-2

Commands

Configuration

# Interactive setup
treza config init

# Show current configuration
treza config show

# Set individual values
treza config set walletAddress 0x...
treza config set apiUrl https://app.trezalabs.com

# Clear all configuration
treza config clear

Enclaves

List & inspect

# List all enclaves
treza enclave list
treza enc ls              # alias

# Get enclave details
treza enclave get <id>

Create

Enclaves support three deployment sources:

From a public Docker / container registry image:

treza enclave create \
  --name "My Enclave" \
  --source-type registry \
  --image nginx:latest \
  --region us-west-2 \
  --instance-type m6i.xlarge \
  --cpu 2 \
  --memory 1024

From a GitHub repository (Treza builds the image automatically):

treza enclave create \
  --name "My App Enclave" \
  --source-type github \
  --github-repo https://github.com/my-org/my-app \
  --github-branch main \
  --github-token ghp_xxxxxxxxxxxx \
  --region us-west-2

Your repository must contain a Dockerfile at its root. The build status will progress through PENDING_BUILD → BUILDING → PENDING_DEPLOY → DEPLOYING → DEPLOYED.

From a private container registry:

treza enclave create \
  --name "My Private Enclave" \
  --source-type private-registry \
  --image registry.example.com/my-org/my-app:latest \
  --registry-url registry.example.com \
  --registry-username myuser \
  --registry-password mypassword \
  --region us-west-2

Provider & hardware options

FlagDescriptionDefault
--provider <id>Provider IDaws-nitro
--instance-type <type>EC2 instance typem6i.xlarge
--cpu <count>vCPU count for the enclave2
--memory <mib>Memory in MiB for the enclave1024
--workload-type <type>service or taskservice

Lifecycle management

treza enclave pause <id>
treza enclave resume <id>
treza enclave terminate <id>
treza enclave delete <id>

Logs

# Application logs (default)
treza enclave logs <id>
treza enclave logs <id> --type application --limit 100

# Build logs (for GitHub-sourced enclaves)
treza enclave logs <id> --type build

# System logs
treza enclave logs <id> --type system

KYC Verification

# Verify a proof
treza kyc verify <proof-id>

# Get proof details
treza kyc get <proof-id>

# Quick status check
treza kyc status <proof-id>

Tasks

# List all tasks
treza task list
treza task ls --enclave <enclave-id>

# Create a scheduled task
treza task create
treza task create --name "Daily Sync" --enclave <id> --schedule "0 0 * * *"

# Delete a task
treza task delete <id>

# Show cron examples
treza task cron

Providers

# List available providers
treza provider list

Global Options

--json          # Output as JSON (available on most commands)
--help, -h      # Show help for any command
--version, -v   # Show CLI version

Configuration

The CLI stores configuration in a local config file:

SettingDescriptionDefault
walletAddressYour Ethereum wallet addressRequired
apiUrlTreza API endpointhttps://app.trezalabs.com
apiKeyOptional API key for authenticated requests

Configuration is stored at:

  • macOS: ~/Library/Preferences/treza-cli-nodejs/config.json
  • Linux: ~/.config/treza-cli-nodejs/config.json
  • Windows: %APPDATA%/treza-cli-nodejs/config.json

Examples

Deploy from a GitHub repository

# Configure CLI
treza config init

# Create an enclave that builds from your GitHub repo
treza enclave create \
  --name "Demo App" \
  --source-type github \
  --github-repo https://github.com/my-org/my-app \
  --github-branch main \
  --github-token ghp_xxxxxxxxxxxx \
  --region us-west-2

# Monitor build progress
treza enclave logs <id> --type build

# Once status is DEPLOYED, view application logs
treza enclave logs <id> --type application

Deploy from Docker Hub

treza enclave create \
  --name "Nginx Enclave" \
  --source-type registry \
  --image nginx:latest \
  --region us-west-2

# Check status
treza enclave get <id>

Deploy from a private registry

treza enclave create \
  --name "Internal Service" \
  --source-type private-registry \
  --image registry.example.com/my-org/service:v1.0.0 \
  --registry-url registry.example.com \
  --registry-username myuser \
  --registry-password mypassword \
  --region us-west-2

Verify KYC proofs

# Quick verification
treza kyc status 550e8400-e29b-41d4-a716-446655440000

# Detailed verification with JSON output
treza kyc verify 550e8400-e29b-41d4-a716-446655440000 --json

Scripting and automation

# List enclaves as JSON for parsing
treza enclave list --json | jq '.[] | select(.status == "DEPLOYED")'

# Create enclave non-interactively
treza enclave create \
  --name "Automated Enclave" \
  --source-type registry \
  --image my-org/my-service:latest \
  --region us-west-2 \
  --provider aws-nitro

Enclave Status Lifecycle

StatusDescription
PENDING_BUILDWaiting to start building from GitHub source
BUILDINGAWS CodeBuild is building the Docker image
BUILD_FAILEDBuild failed — check build logs
PENDING_DEPLOYImage ready, waiting to deploy
DEPLOYINGEC2 Nitro instance is being provisioned
DEPLOYEDRunning and healthy
PAUSEDInstance stopped
TERMINATEDInstance terminated

Development

# Clone the repository
git clone https://github.com/treza-labs/treza-cli.git
cd treza-cli

# Install dependencies
npm install

# Build
npm run build

# Link for local development
npm link

# Now you can use 'treza' command globally
treza --help

Support

License

MIT License - see LICENSE file for details.

Built by Treza Labs — Privacy infrastructure for the next era of finance.

Keywords

treza

FAQs

Package last updated on 16 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts