ModelSwap ModelSwap User Manual English中文
☰ Chapters

6. Working with the Vault

Vault page

6.1 Add & view

6.2 Import / export

In the toolbar menu: export produces a JSON file (containing all plaintext — keep it safe); import deduplicates per entry and reports how many were added/skipped.

6.3 Command line

modelswap vault list                  # list all keys (masked)
modelswap vault set <key>             # store a key (interactive, recommended)
printf '%s' "$SECRET" | modelswap vault set <key> --stdin   # automation: keeps the secret out of shell history
modelswap vault get <key>             # print plaintext
modelswap vault delete <key>          # delete

Inject keys into your current terminal (use with eval):

eval "$(modelswap vault inject --keys OPENAI_API_KEY,OPENROUTER_KEY)"
modelswap vault inject --keys GEMINI_API_KEY --shell zsh   # shell format: bash/zsh/powershell