Sitemap

Member-only story

How to Replacing iTerm2’s Password Manager in VS Code

2 min readJun 25, 2026

--

Here is the fast track to setting up a secure, native, and searchable password picker directly inside VS Code using macOS Keychain.

Press enter or click to view image in full size
Password Copy Screen

Step 1: Save Secrets to macOS Keychain

Run these commands in your terminal to save your passwords securely. The -U flag updates the password if the item already exists.

security add-generic-password -a "$USER" -s "dev-pass" -w "dev123" -U
security add-generic-password -a "$USER" -s "db-pass" -w "database789" -U
security add-generic-password -a "$USER" -s "git-pass" -w "token_xyz" -U

Step 2: Configure the Searchable Dropdown

Open the Command Palette (Cmd ⌘ + Shift + P), select Preferences: Open User Tasks, and paste this JSON. This creates a hidden task that copies the selected keychain password to your clipboard.

{
"version": "2.0.0",
"tasks": [
{
"label": "Get Saved Password",
"type": "shell",
"command": "security find-generic-password -s '${input:passwordChoice}' -w | pbcopy",
"presentation": {
"reveal": "never",
"echo": false,
"focus": false,
"panel": "dedicated",
"showReuseMessage": false,
"close": true
}
}
]…

--

--

Jinna Baalu
Jinna Baalu

Written by Jinna Baalu

Devops Solution Architect | Managing Consensus based Distributed Clusters | Centralised Logging 4M/15min | ELK | Prometheus | Kafka | Cassandra | Mongo