@ai-digital-factory/sms-cli
v0.1.3
Published
Command-line interface for provider-neutral secret management.
Readme
@ai-digital-factory/sms-cli
Command-line interface for provider-neutral secret management.
Install
Run it without a global install:
npx --yes --package=@ai-digital-factory/[email protected] sms read API_KEYOr install it into a project:
npm install @ai-digital-factory/sms-cliConfigure
The CLI reads configuration only from process environment variables. It never
loads .env files itself.
export SMS_ENDPOINT=https://secrets.example.com
export SMS_CREDENTIAL=replace-with-a-secret-credential
export SMS_SCOPE=services/my-app/production
# export SMS_TIMEOUT_MS=10000For local workspace development, pnpm cli sources
apps/cli/.env.local before starting the CLI. Published usage, including
npx, must provide the variables through the environment:
SMS_ENDPOINT=https://secrets.example.com \
SMS_CREDENTIAL=replace-with-a-secret-credential \
SMS_SCOPE=services/my-app/production \
npx --yes --package=@ai-digital-factory/[email protected] sms read API_KEYRequired variables:
SMS_ENDPOINT=https://secrets.example.com
SMS_CREDENTIAL=replace-with-a-secret-credential
SMS_SCOPE=services/my-app/productionCommands
sms save API_KEY secret-value
sms read API_KEY
sms read DATABASE_PASSWORD --scope services/my-app/production/database
sms remove API_KEY
sms search scopes
sms search scopes production
sms search names
sms search names DATABASE --scope services/my-app/production/databasesearch scopes lists descendant scopes beneath SMS_SCOPE; search names
lists secret names in SMS_SCOPE or in the selected --scope. Both commands
accept an optional case-insensitive substring query and print one result per
line. Search output contains names and scopes only, never secret values. A scope
returned by discovery can be passed directly to search names or read.
read writes only the secret value to standard output. Invalid input, missing
configuration, missing secrets, insufficient listing permissions, and provider
failures return a non-zero exit code and write an error to standard error.
Vault discovery requires list permission for the configured scope subtree.
