Prerequisites
Install the CLI:ghcr.io/tinfoilsh/tinfoil-cli.
You also need a Tinfoil organization with Containers enabled, the same prerequisite as the quickstart.
Authenticating
Container management endpoints accept an admin API key scoped to a single organization. Create one from the dashboard’s Admin tab by following Getting a Tinfoil admin key, then run:~/.tinfoil/config.json with mode 0600. Two environment variables override the saved values for one-off invocations:
Admin keys carry the organization ID, so the CLI never asks for an org. To act on a different org, log out and log in with that org’s admin key.
Inspecting your organization
-o json to get machine-readable output suitable for scripting:
owner/repo) or deployment UUID. Containers can be referenced by name or container UUID. If you have a debug-mode and a production-mode container with the same name, pass --debug-mode to disambiguate.
Publishing a config release
Before a tag can be deployed, the config repo must publish a measured release. The CLI uses the GitHub App connected to your Tinfoil organization, so you do not need a GitHub token or thegh CLI.
Fetch the current config, then open a pull request with your local version:
--file - to read the config from stdin, and --body to add a pull request description. Repository commands also support -o json.
Check whether the pull request has been merged:
Deploying a container
Once you have a measured release in your config repo (see quickstart for the GitHub setup), deploy it:
The command returns once the deployment is queued. Poll for readiness with
tinfoil container get my-app.
Managing deployments
One deployment contains all container instances in your organization that use the same GitHub repository. Inspect its aggregate status and instance counts with:--instance with each container UUID:
--staging true or --staging false to override the deployment’s default for one update. Only running or failed instances are eligible. An instance is skipped if it is in any other state or already has an update in progress. Results are reported per instance, and the command exits non-zero if any instance is skipped or fails.
Lifecycle
start and relaunch support --tag, --variable, --secret, --ssh-key, --debug, --staging, --custom-domain, and --host. Any override you pass replaces the stored value entirely. For example, --secret A --secret B sets the secrets list to [A, B], not [A, B, ...existing].
Managing in-progress updates
Updates triggered byrelaunch go through a blue-green window. While the new version is booting, you can inspect or cancel it:
update accept; production containers promote automatically once the candidate is ready.
Secrets
Manage organization secrets withtinfoil secret:
tinfoil repo secret:
--value-file accepts - for stdin, which is the recommended way to set secrets — it avoids leaking the value via shell history or process listings. See secrets and env vars for the underlying model.
SSH keys
Debug-mode containers authorize SSH access using public keys registered at the org level: Choose one of the supported input forms:--ssh-key NAME on tinfoil container create (or relaunch / start).
Registry credentials
For private images, set credentials per registry. Tinfoil supportsghcr, gcr, and dockerhub:
Custom domains
tinfoil container create ... --custom-domain api.example.com. See custom domains for the DNS record details and troubleshooting.
Connecting to a deployed container
tinfoil container connect <name> resolves a container’s enclave domain and source repo, then runs a verified local proxy — equivalent to tinfoil-proxy -e <domain> -r <repo> (the standalone proxy CLI) but without copy-pasting either value:
127.0.0.1 by default. Pass --bind <ADDRESS> to use another interface:
http://localhost:3301 exactly as you would to your container’s domain. The proxy verifies attestation on startup and pins the TLS certificate for subsequent requests. See connecting for the full client story (SDKs, raw tinfoil http).
Resource metrics
jq or a chart tool.
Scripting tips
-o jsonis supported on every list/get command.- Exit codes are non-zero on failure, with the controlplane error message printed to stderr.
- All commands respect
TINFOIL_API_KEY/TINFOIL_CONTROLPLANE_URL, so the CLI is safe to use from CI — store the admin key as a secret and pass it through the environment instead of runningtinfoil login. --verboseand--traceincrease log verbosity for debugging connectivity issues.

