Skip to content

File Reference

This page documents all files that Hush creates, reads, and manages.

File Overview

FileCommittedPurpose
hush.yamlYesConfiguration file
.sops.yamlYesSOPS encryption config
.hush.encryptedYesEncrypted shared secrets
.hush.development.encryptedYesEncrypted development secrets
.hush.production.encryptedYesEncrypted production secrets
.hush.local.encryptedNoEncrypted personal overrides (not committed)

Configuration Files

hush.yaml

The main configuration file. Defines sources and targets.

sources:
shared: .hush
development: .hush.development
production: .hush.production
targets:
- name: root
path: .
format: dotenv

Location: Repository root
Commit: Yes
Created by: hush init or manually

.sops.yaml

SOPS configuration file. Defines which keys can encrypt/decrypt.

creation_rules:
- encrypted_regex: '.*'
age: age1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Location: Repository root
Commit: Yes
Created by: Manually (SOPS requirement)

Source Files (For Initial Setup Only)

These plaintext .hush files are only used during initial setup when you first encrypt your secrets. After running hush encrypt, they are automatically deleted.

.hush

Shared variables used across all environments.

Terminal window
DATABASE_URL=postgres://user:pass@host/db
STRIPE_SECRET_KEY=sk_xxx
EXPO_PUBLIC_API_URL=${API_BASE}/v1

.hush.development

Development-specific overrides.

Terminal window
API_BASE=http://localhost:8787
DEBUG=true

.hush.production

Production-specific overrides.

Terminal window
API_BASE=https://api.example.com
DEBUG=false

.hush.local

Personal overrides for your machine only.

Terminal window
# Add a local override (encrypted)
hush set MY_VAR --local
# Edit all local overrides
hush edit local

This creates .hush.local.encrypted which keeps your personal overrides encrypted too.

Encrypted Files

These are the SOPS-encrypted versions of your secrets. Safe to commit (except .hush.local.encrypted).

.hush.encrypted

Encrypted shared secrets used across all environments.

Commit: Yes

.hush.development.encrypted

Encrypted development-specific secrets.

Commit: Yes

.hush.production.encrypted

Encrypted production-specific secrets.

Commit: Yes

.hush.local.encrypted

Encrypted personal overrides for your machine only.

Commit: No (add to .gitignore)


Created by: hush encrypt, hush set, hush edit
Used by: hush run, hush inspect, hush has, hush edit

Output Files (Generated by decrypt)

The following files should only exist if you’ve run hush decrypt --force:

FileWhy It Might Exist
.env / .env.development / .env.productionCreated by hush decrypt --force for legacy tools
.dev.varsCreated by hush decrypt --force for Wrangler
.env.*.json / .env.*.sh / .env.*.yamlCreated by hush decrypt --force

If you see these files and didn’t run decrypt --force, they may be from legacy tooling. Hush will warn about them in hush check and hush status.

Typical Project Structure

With the “encrypted at rest” model, your project should look like this:

  • .sops.yaml # SOPS config (committed)
  • hush.yaml # Hush config (committed)
  • .hush.encrypted # Encrypted shared (committed)
  • .hush.development.encrypted # Encrypted dev (committed)
  • .hush.production.encrypted # Encrypted prod (committed)
  • .hush.local.encrypted # Personal overrides (NOT committed)
  • Directorypackages/
    • Directoryapp/
      • package.json
    • Directoryapi/
      • package.json
      • wrangler.toml

Note: No plaintext .hush or .env files! Secrets are decrypted to memory by hush run.

Add these entries to your .gitignore:

Terminal window
# Hush - Plaintext source files (deleted after encrypt)
.hush
.hush.development
.hush.production
.hush.local
# Hush - Personal encrypted overrides (not shared)
.hush.local.encrypted
# Hush - Output files (generated by decrypt --force)
.env
.env.*
.env.*.json
.env.*.sh
.env.*.yaml
.dev.vars
*/.env.*
*/.dev.vars
# Keep encrypted files (these ARE committed)
!.hush.encrypted
!.hush.development.encrypted
!.hush.production.encrypted

Age Key File

SOPS uses age for encryption. Your private key is stored at:

~/.config/sops/age/key.txt

Key Format

# created: 2024-01-01T00:00:00Z
# public key: age1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
AGE-SECRET-KEY-1XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Multiple Keys

For team environments, each member has their own key. All public keys are listed in .sops.yaml:

creation_rules:
- encrypted_regex: '.*'
age: >-
age1alice...,
age1bob...,
age1charlie...

Anyone with any of these private keys can decrypt the secrets.