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

@vasudevshetty/safekey

v1.2.1

Published

πŸ›‘οΈ SafeKey: Secure Secrets Manager CLI - Offline-first, developer-friendly secrets management with team collaboration and cloud sync

Readme

πŸ›‘οΈ SafeKey: Secure Secrets Manager CLI

SafeKey is an offline-first, developer-friendly secrets manager CLI. Built in TypeScript, it supports advanced encryption, config injection, and a powerful extensible architecture. It is inspired by the Go-based prototype, but enhanced with modern Node.js and developer tooling.

Think of it as the "Vault meets Dotenv" β€” with CLI, TUI, and Web Dashboard phases.


βœ… 1. Product Design Philosophy

πŸ“¦ CLI (Must-Have – Phase 1)

  • Why: Devs and DevOps engineers love fast, scriptable tools.
  • Built With: TypeScript + commander.js (or oclif) + ESM support.
  • Usage: safekey init, safekey add <key>, safekey get <key>, safekey inject

πŸ–₯️ TUI (Nice-to-Have – Phase 2)

  • Why: Friendly dashboard for non-terminal folks.
  • Built With: Ink (React-like CLI UIs).
  • Features: Browse vault, edit secrets, copy to clipboard.

🌐 Web Dashboard (Optional – Phase 3+)

  • Why: Visualize vault, sync across systems.
  • Built With: Next.js 15, TailwindCSS, shadcn/ui, and optionally wrapped in Electron.

🧱 2. Architecture Overview (Clean + Scalable)

safekey/
β”œβ”€β”€ bin/                 # CLI entry (compiled JS files here)
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ cli/             # CLI commands
β”‚   β”‚   β”œβ”€β”€ init.ts
β”‚   β”‚   β”œβ”€β”€ add.ts
β”‚   β”‚   β”œβ”€β”€ get.ts
β”‚   β”‚   β”œβ”€β”€ inject.ts
β”‚   β”‚   └── utils.ts
β”‚   β”œβ”€β”€ tui/             # Ink-based terminal UI (optional)
β”‚   β”‚   └── App.tsx
β”‚   β”œβ”€β”€ core/            # Vault + secrets management
β”‚   β”‚   β”œβ”€β”€ index.ts
β”‚   β”‚   β”œβ”€β”€ vault.ts
β”‚   β”‚   β”œβ”€β”€ secrets.ts
β”‚   β”‚   └── store.ts
β”‚   β”œβ”€β”€ crypto/          # AES/GPG encryption utilities
β”‚   β”‚   β”œβ”€β”€ aes.ts
β”‚   β”‚   β”œβ”€β”€ gpg.ts
β”‚   β”‚   └── utils.ts
β”‚   β”œβ”€β”€ config/          # User config profiles
β”‚   β”‚   └── config.ts
β”‚   └── index.ts         # Main CLI entrypoint
β”œβ”€β”€ tests/
β”‚   └── vault.test.ts
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
└── README.md

βš™οΈ 3. Tech Stack & Tools

| Area | Stack/Library | Reason | | ----------------- | --------------------------------------- | ----------------------------- | | CLI Framework | commander.js or oclif | Structured CLI with help docs | | Module Format | type: module (ESM) + .mts files | Future-proof, cleaner syntax | | Packaging | pkg, nexe, or esbuild | Create native binaries | | TUI | Ink, React, ink-select-input | Interactive terminal UI | | Encryption | Node.js crypto module | AES-256-GCM, secure randoms | | File Ops | fs/promises, path, os | Vault I/O and config loading | | Config Store | conf, cosmiconfig, or custom JSON | Persistent config management | | Formats Supported | JSON, YAML, TOML via js-yaml | Interop and export/import | | Secrets Injection | dotenv, child_process, .env | Auto inject to env or command | | Web UI | Next.js 15, Tailwind, shadcn/ui | Web management panel | | State Mgmt (Web) | Zustand, Redux | Web vault syncing | | Testing | vitest, jest | Unit + integration tests | | Linting & Format | eslint, prettier | Dev quality & consistency | | Security Audits | snyk, npm audit, node-sec-check | Safe dep check |


πŸ“… 4. Feature Roadmap (By Phase)

πŸš€ Phase 1: CLI Core MVP

  • safekey init – initializes an AES-256 encrypted vault (JSON-backed).
  • safekey add <key> / get <key> / rm <key> – CRUD secrets.
  • safekey list – view all keys.
  • safekey export / import – move vault across machines.
  • .env generator from stored secrets.
  • ~/.safekeyrc.json for config profiles.
  • AES-GCM for confidentiality + integrity.
  • Versioning support for vault entries.

πŸ–₯️ Phase 2: Optional TUI

  • Ink-based terminal interface with panels and navigation.
  • Display secrets, profiles, and vault metadata.
  • Copy to clipboard, toggle reveal/hide secrets.

πŸ” Phase 3: Inject Secrets into Shell/Commands

  • safekey inject -- <cmd>:
    • Inject stored secrets as env vars.
    • Automatically wrap any npm run, python, etc.
    • Output .env file or execute inline with process.env.

🌍 Phase 4: Vault Sync & GitOps (Optional)

  • safekey push: Encrypt + commit vault to Git repo (GPG/AES).
  • safekey pull: Decrypt remote vault + restore.
  • GitHub/GitLab integration for secrets-as-code workflows.

πŸ§‘β€πŸ’» Phase 5: Web Dashboard

  • Built with Next.js 15 + Tailwind CSS + Zustand.
  • View/edit vault from local or synced file.
  • Optional: Electron desktop wrapper.
  • Secure local access with vault password (no cloud).

πŸ“ 5. Modular Folder Structure (Scalable)

Everything is TypeScript + ESM (type: module in package.json).

safekey/
β”œβ”€β”€ bin/                 β†’ Compiled binaries
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ cli/             β†’ All command line logic
β”‚   β”œβ”€β”€ core/            β†’ Vault core encryption logic
β”‚   β”œβ”€β”€ crypto/          β†’ AES + GPG handling
β”‚   β”œβ”€β”€ tui/             β†’ Optional Ink-based terminal UI
β”‚   β”œβ”€β”€ config/          β†’ Profile & vault config parsing
β”‚   └── index.ts         β†’ Entrypoint
β”œβ”€β”€ tests/               β†’ Unit + integration tests
β”œβ”€β”€ package.json         β†’ Scripts + dependencies
β”œβ”€β”€ tsconfig.json        β†’ ESM + strict TS options
└── README.md

πŸŽ“ 6. Skills You’ll Master Along the Way

| Area | Skills | | --------------- | ------------------------------------- | | TypeScript | Advanced types, module systems (ESM) | | CLI Dev | Commander/Oclif, Ink (TUI) | | Cryptography | AES, GPG, nonce, IV, secure randomness | | File Systems | Cross-platform, os.homedir(), etc. | | Testing | vitest, mocking fs, vault logic | | Config Mgmt | JSON schemas, validation, profiles | | Web Dev (Later) | TailwindCSS, Zustand, UI UX | | Security | Permissions, vault integrity checks | | DevOps Ready | NPM packaging, CLI release, CI/CD | | OSS Publishing | GitHub actions, releases, README |


🧠 Next Steps to Start:

  1. πŸ”§ Setup basic ESM Node.js CLI (commander.js + tsconfig.json)
  2. πŸ” Implement vault.ts using AES-GCM encryption
  3. πŸ’Ύ Add file storage support (versioned JSON in ~/.safekey-vault.json)
  4. βœ… Build core commands: init, add, get, list
  5. πŸ§ͺ Add unit tests with vitest
  6. πŸ–₯️ (Optional): Start building TUI in Ink after CLI is stable
  7. πŸš€ Package with pkg or nexe, publish to GitHub/NPM

Let me know when you’re ready to build the first file!