A VS Code extension to browse, edit, and search every .NET user secrets file
(secrets.json) on your machine — the files managed by
dotnet user-secrets,
stored under %APPDATA%\Microsoft\UserSecrets (Windows) or
~/.microsoft/usersecrets (macOS/Linux).


Features
- Dedicated Activity Bar view listing all secrets files in two groups:
- Workspace projects — resolved from
<UserSecretsId>in the open workspace's.csprojfiles, shown by project name (with a one-click "Create secrets.json" for projects that don't have one yet). - Other secrets on this machine — every remaining
UserSecretsfolder, shown by GUID.
- Workspace projects — resolved from
- Two editors per file:
- Raw JSON — the normal text editor.
- Table view — flattened
Section:Keyrows (the .NET configuration convention). Handles both nested JSON and the flat colon keys the CLI writes. Cells are editable inline; rows can be added and deleted. Edits go through the document, so dirty state, Ctrl+Z undo and Ctrl+S save all work as usual, and formatting/comments in the file are preserved.
- Double-click a table cell to jump to the raw JSON with that secret's
name or value selected, depending on which cell you double-clicked.
(Single click still edits inline after a short delay; each row also has a
{ }button.) - Search all secrets (search icon in the view, or ".NET Secrets: Search All Secrets" in the Command Palette): fuzzy-search every key and value across every file on the machine; picking a result opens the raw JSON with the value selected.
- Table filter box for narrowing rows within one file.
- Live refresh when files change on disk — e.g. after running
dotnet user-secrets setin a terminal.
Development
npm install
npm run build # bundle extension + webview into dist/
npm test # vitest unit tests for the pure core (flatten/edit/locate)
npm run check # tsc --noEmit
Press F5 in VS Code to launch the Extension Development Host.
Architecture notes
src/core/is pure TypeScript (novscodeimports): flattening, editing and token-locating logic built onjsonc-parser, fully unit-tested.- The table is a
CustomTextEditorProvider(priority: "option"), so the underlyingTextDocumentstays the single source of truth. - Because CLI-written files use flat keys that already contain colons
(
{"A:B": "x"}) while hand-edited files nest ({"A": {"B": "x"}}), every row tracks its real JSON path separately from the displayed flattened key.