npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

secret-safe-env

v0.1.2

Published

MCP server that lets an agent write secrets into .env without ever seeing the value — user pastes into a native Windows masked dialog; PowerShell writes the file.

Readme

secret-safe-env

讓 agent 把祕密(API key 等)寫進 .env全程看不到值。agent 呼叫 set_env_secret({ key }) 只傳 key 名稱;本機跳出一個原生遮罩對話框,由你貼上祕密,再由 PowerShell 小幫手直接寫入 .env。agent 只收到 OKCANCELERR:<CODE> 狀態,永遠拿不到值。

需求

  • Windows + Windows PowerShell 5.1(以釘死路徑 System32\WindowsPowerShell\v1.0 啟動)
  • Node 18+
  • PowerShell 測試需要 Pester 5:Install-Module Pester -MinimumVersion 5.0 -Scope CurrentUser

建置與測試

npm install
npm run build
npm test          # Node 單元測試
npm run test:ps   # PowerShell upsert + 不洩漏測試(Pester)
npm run lint:ps   # value-path 靜態 lint

安裝(一次性 global install)

npm i -g secret-safe-env

在專案的 .mcp.json 加入(啟動瞬間、不依賴網路):

{ "mcpServers": { "secret-safe-env": { "command": "secret-safe-env" } } }

重載 Claude Code。提供兩個工具:set_env_secret(讓使用者在本機遮罩框輸入 secret 寫進 .env,agent 永不看到值)與 env_key_exists(只回 true/false 確認寫入,不回值)。

零安裝備援:.mcp.json{ "command": "npx", "args": ["-y", "secret-safe-env"] }(建議釘版本,如 [email protected])。代價:每次 session 啟動會冷啟動,離線會啟動失敗。

值為單行;多行 PEM/JSON 請使用者自行編輯 .env。env_path 請傳專案根的絕對 .env 路徑。

範圍/保證

保護範圍:從你貼上、到值寫入 .env 落地這一段,沒有任何受稽核的 Windows/agent 通道會記錄到值(PSReadLine、4688/Sysmon、4103/4104、Transcription、AMSI、MCP/agent 上下文、OTEL、mcp-debug)。

不在範圍(由你自負):值落地 .env 之後的處置——雲端同步/OneDrive、VSS/備份快照、防毒掃描、檔案 ACL、agent 事後讀取 .env