Skip to content

envpkt env scan

Scan process.env for credential-shaped variables. Matches against ~45 known service names, ~13 generic suffix patterns, and ~29 value shape patterns.

Terminal window
envpkt env scan [options]
OptionDescriptionDefault
--format <format>Output format: table, jsontable
--writeWrite/append discovered credentials to envpkt.tomlfalse
--dry-runPreview TOML that would be written (implies --write)false
--include-unknownInclude vars with no inferred servicefalse
Terminal window
# Scan and display results
envpkt env scan
# JSON output
envpkt env scan --format json
# Write to envpkt.toml
envpkt env scan --write
# Preview what would be written
envpkt env scan --dry-run
# Include unidentified credential-shaped vars
envpkt env scan --include-unknown
LevelIconMeaning
HighExact name match (e.g., OPENAI_API_KEY) or recognized value prefix (e.g., sk-)
MediumGeneric suffix pattern (e.g., *_API_KEY, *_TOKEN) with derived service name
  1. Exact name (~45 patterns) — Known service-specific variable names like STRIPE_SECRET_KEY, AWS_ACCESS_KEY_ID, GITHUB_TOKEN
  2. Value shape (~29 patterns) — Recognized value prefixes like sk-, ghp_, AKIA, postgres://
  3. Generic suffix (~13 patterns) — Suffixes like _API_KEY, _SECRET, _TOKEN, _PASSWORD

See the Environment Scanning guide for details on the pattern registry.