CLI Commands
Learn about Enkryptify CLI commands with examples and best practices
Command Overview
The Enkryptify CLI provides three powerful commands to manage your secrets effectively:
configure
: Set up your CLI and authenticate with Enkryptifyrun
: Execute commands with automatically injected secretsexport
: Extract secrets in various formats for different workflows
Each command is designed to handle specific use cases while maintaining security best practices. We followed the ‘less is more’ approach to keep the commands simple and easy to understand.
Configure
The configure command establishes a secure connection between your environment and Enkryptify. You only need to run this command once per project or when you want to change the environment.
Interactive Setup (Recommended)
A user-friendly way to configure the CLI:
TODO: Screenshots + what you need
Manual Configuration
For automated setups or CI/CD environments:
Changing environment
Configuration Files
After successful configuration, Enkryptify stores your settings in:
- Unix-like systems:
~/.enkryptify/config.json
- Windows:
%USERPROFILE%\.enkryptify\config.json
Enkryptify securely stores sensitive data like tokens in your system’s native keyring/keychain.
Run
The run command creates a secure environment with your secrets injected as environment variables, then executes your specified command within this context.
Key Benefits
- Secrets never are written to disk
- Automatic cleanup after command completion
- Environment isolation
- Compatible with any command or script
Common Use Cases
Local Development
Perfect for running development servers with live secret injection:
Database Operations
Safely manage database connections and migrations:
Container Operations
Seamlessly integrate with Docker workflows:
Testing Workflows
Ensure your tests have access to the right secrets:
Export
The export command provides flexible ways to extract and format your secrets for various use cases.
Available Formats
JSON Format
Structured data format ideal for programmatic access:
Dotenv Format
Compatible with most development frameworks and tools:
Shell Environment Format
Direct shell integration for immediate use:
Secret Selection
Using —select
Include only specific secrets:
Using —exclude
Exclude specific secrets:
Tips
- Avoid storing exported secrets in version control
- Limit export scope to necessary secrets only
- Clean up exported files after use
- Use appropriate file permissions
- Maintain separate exports for different environments
- Use clear naming conventions