1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# Example fnox configuration file
#
# This file demonstrates the various features of fnox:
# - Multiple environments (default, staging, production)
# - Different secret sources (encrypted, provider, default, env var)
# - Per-secret metadata (description, if_missing behavior)
# - Provider configuration
# - Configuration imports and merging
# Optional: Import other configuration files
= [
# "../shared-config.toml",
# "/etc/fnox/global.toml"
]
# Optional: Stop parent directory search at this level
# root = true
# Optional: Configure encryption
# Generate a key with: age-keygen -o ~/.config/fnox/age.txt
# Copy the public key (age1...) to the recipients list below
[]
= "age"
= [
"age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p"
]
# Optional: Configure secret providers
[]
= "1password"
= "Development"
[]
= "aws"
= "us-east-1"
= "myapp/"
[]
= "vault"
= "http://localhost:8200"
= "secret/myapp"
# Default profile secrets (top level)
# Used when --profile is not specified or FNOX_PROFILE is not set
[]
# Example: Encrypted secret
# This will be automatically encrypted when you run: fnox set DATABASE_URL <value>
= { = "Database connection string", = "error", = "YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0..." }
# Example: Secret fetched from current environment variable
# If NPM_TOKEN is set in the environment, it will be used
# Otherwise, a warning will be shown (if_missing = "warn")
= { = "NPM registry authentication token", = "warn" }
# Example: Secret with a default value
# If NODE_ENV is not set in the environment, "development" will be used
= { = "development" }
# Example: Simple encrypted secret (no metadata)
= { = "YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0..." }
# Example: Secret with provider reference
# This will be fetched from the 1Password vault at runtime
= { = "Stripe API key", = "onepass", = "stripe-dev-key", = "warn" }
# Staging profile
# Use with: fnox exec --profile staging -- <command>
# Or set: export FNOX_PROFILE=staging
[]
# Fetch from AWS Secrets Manager
= { = "Staging database connection", = "aws_prod", = "staging/database-url", = "error" }
# Fetch from 1Password
= { = "onepass", = "npm-token", = "error" }
# Simple default value
= { = "staging" }
# Encrypted value specific to staging
= { = "YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0..." }
# Production profile
# Use with: fnox exec --profile production -- <command>
[]
# Production secrets are typically fetched from a secure provider
= { = "Production database (read-write)", = "aws_prod", = "prod/database-url", = "error" }
= { = "Production Redis cluster", = "aws_prod", = "prod/redis-url", = "error" }
= { = "onepass", = "error" }
= { = "production" }
# Critical secrets are encrypted
= { = "YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0..." }
= { = "YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0..." }
# Custom profile example
# You can create any number of custom profiles
[]
= { = "postgresql://localhost:5432/test" }
= { = "test" }
= { = "true" }
# Example commands:
#
# Initialize:
# fnox init
#
# Set a secret (will be encrypted if encryption is configured):
# fnox set DATABASE_URL "postgresql://user:pass@localhost/db"
# fnox set API_KEY "secret-key" --profile production
#
# Set only metadata (value from env var):
# fnox set NPM_TOKEN --description "NPM token" --if-missing warn
#
# Get a secret:
# fnox get DATABASE_URL
# fnox get API_KEY --profile production
#
# List secrets:
# fnox list
# fnox list --profile production --values
#
# Run a command with secrets:
# fnox exec -- npm start
# fnox exec --profile production -- node app.js
# fnox exec --profile staging -- ./deploy.sh
#
# Manage providers:
# fnox provider list
# fnox provider add my-vault vault
# fnox provider remove my-vault
#
# Configuration features:
# - Recursive loading: fnox searches parent directories for fnox.toml files
# - Import files: Use import = ["path/to/config.toml"] to include other configs
# - Root boundary: Set root = true to stop parent directory search
# - Explicit paths: Use -c path/to/config.toml to bypass recursive search