Skip to content

Providers Reference

SecretSpec supports multiple storage backends for secrets. Each provider has its own URI format and configuration options.

URI: dotenv://[path] - Stores secrets in .env files

Terminal window
dotenv:// # Uses default .env
dotenv:///config/.env # Custom path
dotenv://config/.env # Relative path

Features: Read/write, profiles, human-readable, no encryption

URI: env:// - Read-only access to system environment variables

Terminal window
env:// # Current process environment

Features: Read-only, no setup required, no persistence

URI: keyring:// - Uses system keychain/keyring for secure storage

Terminal window
keyring:// # System default keychain

Features: Read/write, secure encryption, profiles, cross-platform Storage: Service secretspec/{project}, username {profile}:{key}

URI: lastpass://[folder] - Integrates with LastPass via lpass CLI

Terminal window
lastpass://work # Store in work folder
lastpass:///personal/projects # Nested folder
lastpass://localhost # Root (no folder)

Features: Read/write, cloud sync, profiles via folders, auto-sync Prerequisites: lpass CLI, authenticated with lpass login Storage: Item name {folder}/{profile}/{project}/{key}

URI: onepassword://[account@]vault or onepassword+token://user:token@vault

Terminal window
onepassword://MyVault # Default account
onepassword://work@CompanyVault # Specific account
onepassword+token://user:op_token@SecureVault # Service account

Features: Read/write, cloud sync, profiles via vaults, service accounts Prerequisites: op CLI, authenticated with op signin Storage: Item name {project}/{key}, tags automated, {project}

Terminal window
# Simple provider names
secretspec get API_KEY --provider keyring
secretspec get API_KEY --provider dotenv
secretspec get API_KEY --provider env
# URIs with configuration
secretspec get API_KEY --provider dotenv:/path/to/.env
secretspec get API_KEY --provider onepassword://vault
secretspec get API_KEY --provider "onepassword://account@vault"
Terminal window
export SECRETSPEC_PROVIDER=keyring
export SECRETSPEC_PROVIDER="dotenv:///config/.env"
ProviderEncryptionStorage LocationNetwork Access
DotEnv❌ Plain textLocal filesystem❌ No
Environment❌ Plain textProcess memory❌ No
Keyring✅ System encryptionSystem keychain❌ No
LastPass✅ End-to-endCloud (LastPass)✅ Yes
OnePassword✅ End-to-endCloud (OnePassword)✅ Yes