Skip to main content

Command-line interface for Lablytics BYOD - Secure biotech data processing with zero-knowledge encryption

Project description

BYOD CLI

Secure biotech data processing with zero-knowledge encryption.

Your data is encrypted on your machine, processed inside a cryptographically attested AWS Nitro Enclave, and returned encrypted. No one — including Lablytics — can access your plaintext data.

Install

pip install byod-cli

Requirements: Python 3.9+ and AWS credentials (aws configure or environment variables).

Get Started

1. Sign up and get an API key

Go to https://byod.cultivatedcode.co, create an account, then go to Settings > API Keys and create a key. Copy it — it's only shown once.

2. Authenticate

byod auth login

Paste your API key when prompted (sk_live_xxxxx).

3. Set up your AWS resources (one-time)

byod setup

This creates a KMS key and IAM role in your AWS account. Only the verified Nitro Enclave can use the key to decrypt — not Lablytics, not anyone else.

4. Submit data

byod submit genomic-qc ./sample.fastq.gz

The CLI encrypts your file locally, uploads the ciphertext, and returns a job ID.

5. Get results

byod status <job-id>          # Check progress
byod retrieve <job-id> -o ./results/   # Download encrypted results
byod decrypt ./results/ -o ./output/   # Decrypt locally

That's it. Your data was never visible to anyone outside the enclave.


Commands

Command What it does
byod auth login Authenticate with your API key
byod auth logout Clear stored credentials
byod auth status Check if you're authenticated
byod setup Create KMS key + IAM role in your AWS account
byod submit <plugin> <file> Encrypt and submit data for processing
byod status <job-id> Check job status
byod list List your jobs
byod retrieve <job-id> -o <dir> Download encrypted results
byod decrypt <dir> -o <output> Decrypt results locally
byod plugins List available processing plugins
byod config show Show current configuration

Plugins

Plugin Description Accepts
genomic-qc FastQC + MultiQC quality control .fastq, .fastq.gz
demo-count Line/word counting (for testing) Any text file
byod plugins   # See all available plugins

Examples

# Submit a directory (auto-archived as tar.gz)
byod submit genomic-qc ./samples/

# Submit with metadata
byod submit genomic-qc ./sample.fastq.gz \
  --description "Batch 2026-02" \
  --tags experiment=exp001 \
  --tags batch=batch_a

# Submit with custom pipeline config
echo '{"min_quality": 20}' > config.json
byod submit genomic-qc ./sample.fastq.gz --config config.json

# Wait for completion (blocks until done)
byod submit genomic-qc ./sample.fastq.gz --wait --timeout 3600

# List completed jobs
byod list --status completed

# JSON output for scripting
byod list --format json

# Use API key via environment variable (useful for CI/CD)
export BYOD_API_KEY=sk_live_xxxxx
byod submit genomic-qc ./sample.fastq.gz

How Security Works

 Your Machine                        Lablytics
┌──────────────────┐                ┌──────────────────────────┐
│ byod-cli         │  ciphertext    │ S3 (encrypted blobs)     │
│ - encrypt locally│───────────────>│          │               │
│ - decrypt locally│                │          v               │
└────────┬─────────┘                │ Nitro Enclave            │
         │                          │ - attests to your KMS key│
         v                          │ - decrypts, processes,   │
 Your AWS Account                   │   re-encrypts            │
┌──────────────────┐                │ - no network access      │
│ KMS Key          │<───────────────│                          │
│ - you own it     │  attestation   └──────────────────────────┘
│ - PCR0 condition │
└──────────────────┘
Who Can decrypt your data? Why
You Yes Your KMS key, your AWS credentials
Nitro Enclave Yes Cross-account role with PCR0 attestation
Lablytics operators No No access to your KMS key
Lablytics infrastructure No Attestation check blocks non-enclave access

Environment Variables

Variable Description Default
BYOD_API_KEY API key (alternative to byod auth login)
BYOD_API_URL Custom API endpoint https://byod.cultivatedcode.co
BYOD_DEBUG Enable debug logging (1 or true) false
AWS_PROFILE AWS credentials profile default
AWS_REGION Region for KMS operations us-east-1

Troubleshooting

"Not authenticated" — Run byod auth login with your API key from https://byod.cultivatedcode.co.

"No KMS key configured" — Run byod setup to create your KMS key and IAM role.

"Failed to get AWS identity" — Configure AWS credentials: aws configure or set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.

"AccessDenied when creating KMS key" — Your AWS user needs: kms:CreateKey, kms:CreateAlias, kms:PutKeyPolicy, iam:CreateRole, iam:PutRolePolicy.

"Decryption failed: AccessDeniedException" — Make sure you're using the same AWS account that ran byod setup. Check that the KMS key hasn't been deleted.

Debug mode:

byod --debug submit genomic-qc ./sample.fastq.gz

Development

pip install -e ".[dev]"
pytest              # Run tests
ruff check src/     # Lint
ruff format src/    # Format

License

MIT — see LICENSE.

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

byod_cli-1.0.1.tar.gz (31.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

byod_cli-1.0.1-py3-none-any.whl (35.9 kB view details)

Uploaded Python 3

File details

Details for the file byod_cli-1.0.1.tar.gz.

File metadata

  • Download URL: byod_cli-1.0.1.tar.gz
  • Upload date:
  • Size: 31.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for byod_cli-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b6ca176f13105425bfbe1e3a3a05ce6b7268a2515fc93e1a105e4d603e4d3be2
MD5 b6f2f3c79f2087dcf64cca2b817007ef
BLAKE2b-256 6a4a354e5e134ef03aad6af6b04a8fb41eb5c45e63f21319285b0702e49251bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for byod_cli-1.0.1.tar.gz:

Publisher: publish.yml on lablytics/byod-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file byod_cli-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: byod_cli-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 35.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for byod_cli-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 05ddf3789078bbfb3c183aaebb8079c5e59ba0406ce17e76b5eecfd656c753ea
MD5 a89b8d2986b367c0eed882311f0cbf6b
BLAKE2b-256 ed3b3c7ab254ede28a1f785809511b82a05ccdb542742b2e07a2597a195daf00

See more details on using hashes here.

Provenance

The following attestation bundles were made for byod_cli-1.0.1-py3-none-any.whl:

Publisher: publish.yml on lablytics/byod-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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