Usage
initiat secret export <secret-key> --output FILE [options]
Arguments
secret-key
required
The key/name for the secret
Options
--output
required
Output file path
-f
|
--force
Overwrite existing key without confirmation
-P
|
--project-path
Full project path (org/project) or alias
-p
|
--project
Project name (uses default org or --org)
--org
Organization slug (used with --project)
Examples
Export secret to a file
initiat secret export API_KEY --output .env --project-path acme-corp/production
Export to deep directory (creates folders)
initiat secret export API_KEY --output config/secrets.env -P acme-corp/production
Export with force override
initiat secret export API_KEY --output secrets.txt --force
How it works
-
→
Retrieves and decrypts secret from server
-
→
Creates output directory if it doesn't exist
-
→
Checks for existing key in file (prompts if found)
-
→
Writes secret in KEY=VALUE format
-
→
Detects git repository and suggests .gitignore
Output
🔍 Getting secret 'API_KEY' from project acme-corp/production...
🔓 Decrypting secret value...
⚠️ File 'secrets.env' is not in .gitignore. Add it? (y/N): y
✅ Added 'secrets.env' to .gitignore
✅ Secret 'API_KEY' exported to secrets.env