---
title: "ezgh secrets"
description: "Secrets: named sets of encrypted fields, with versions, in a project."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh secrets

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh secrets <command>
```

EZGH Secrets keeps sensitive values, such as the contents of a .env file, encrypted, in a project (`--project`, `EZGH_PROJECT` or the profile's). A secret has a name (prod/db) and is made of fields: a field is a name (not confidential) and a value (up to 8 KiB, text or binary). Every change writes a new version; "latest" is the newest. A secret is named on the command line; ezgh finds it in the project by that name (or by ID).

Values are never printed except by `ezgh secrets read`, which is a billed read. Every other command shows names and metadata only.

## Flags

This command also takes the [global flags](/cli/reference#global-flags).

## Subcommands

| Command | Description |
| --- | --- |
| [`ezgh secrets create`](/cli/reference/secrets-create) | Create a secret, with its first version when fields are given |
| [`ezgh secrets delete`](/cli/reference/secrets-delete) | Delete a secret and every version |
| [`ezgh secrets destroy-version`](/cli/reference/secrets-destroy-version) | Destroy a version's values for good |
| [`ezgh secrets get`](/cli/reference/secrets-get) | Show a secret's metadata and the field names of its latest version |
| [`ezgh secrets grants`](/cli/reference/secrets-grants) | Grants: the products allowed to read a secret |
| [`ezgh secrets list`](/cli/reference/secrets-list) | List the project's secrets |
| [`ezgh secrets put`](/cli/reference/secrets-put) | Write a new version of a secret |
| [`ezgh secrets read`](/cli/reference/secrets-read) | Print a secret's values (a billed read) |
| [`ezgh secrets versions`](/cli/reference/secrets-versions) | List a secret's versions, newest first |

Source: https://docs.ezghcloud.com/cli/reference/secrets/index.mdx
