Skip to main content

View on GitHub

tinfoilsh/tinfoil-cli

Overview

The Tinfoil CLI verifies enclave attestations, audits TLS certificates, and makes verified HTTP requests against Tinfoil enclaves. For a local OpenAI-compatible proxy, see the Local Proxy section.

Installation

Pre-built Binaries

Download the latest release for your OS from the Releases page.

Install Script

You can install tinfoil CLI using our install script. This script automatically detects your operating system and architecture, downloads the correct binary, and installs it to /usr/local/bin.
If you receive permission errors (for example, if you’re not running as root), you may need to run the command with sudo.

Build from Source

  1. Ensure you have Go installed.
  2. Clone the repository:
  1. Build the binary:

Command Reference

HTTP Requests

The http command makes verified HTTP requests to Tinfoil enclaves with attestation verification.

GET Request

POST Request

Streaming

Use the -s flag to stream the response line by line:

Command Options

  • -b, --body: HTTP POST body
  • -H, --header: HTTP request header, in Name: Value format. May be repeated
  • -s, --stream: Stream response output (POST only)

Attestation Verification

Verify Attestation

Use the attestation verify command to manually verify that an enclave is running the expected code. The output will be a series of INFO logs describing each verification step. Sample successful output:

JSON Output

You can also record the verification to a machine-readable audit log:
Or use the -l flag to specify the output file directly:
The audit log record includes the timestamp, enclave host, code and enclave measurement fingerprints, and the verification status.

Command Options

  • -j, --json: Output in JSON format
  • -l, --log-file: Path to write the JSON log
  • -e, --host: The hostname of the enclave. If omitted, auto-selects the default router.
  • -r, --repo: The enclave config repo. If omitted, skips code measurement verification.

Docker

A docker image is available at ghcr.io/tinfoilsh/tinfoil-cli.