PentaVault keeps a team's secrets encrypted on a server and hands them to developers, apps and AI coding tools only at runtime, so nobody needs a plaintext .env file. I'm building it alone: a Next.js dashboard, a Fastify API and a Rust CLI, 202 commits since April 2026.

What it is

A place to keep API keys and database URLs, and to control who can use them. You store a secret once in the dashboard. Your laptop, your CI job or your AI agent then gets it through the CLI or a proxy token, and every read lands in an audit log.

Why it matters

Most projects still keep their keys in a .env file on every developer's machine. That used to be a quiet risk. Now AI assistants read the whole workspace, so a key in a file can end up in a prompt, a log or a commit. I wanted the key to stay off the laptop entirely where possible, and to be easy to revoke when it isn't.

What I built

Every commit and pull request in the public repo is mine, and so are the planning and security-review docs.

  1. Clients
    Next.js dashboard · Rust pv CLI
  2. API
    Fastify · Better Auth
  3. Storage
    PostgreSQL · Drizzle
  • The dashboard (Next.js 16, React 19, TanStack Query): organisations, projects, environments and configs, masked secrets with bulk import, proxy tokens, members and roles, change requests, activity, and MFA with recovery codes.

  • The CLI (Rust): pv login uses a device-code flow, so you approve the terminal in the browser instead of pasting a token. Credentials go in the OS credential store. pv run -- pnpm dev fetches the project's secrets and starts your command with them in its environment.

  • The API (Fastify, Better Auth, Drizzle, PostgreSQL): encryption, access policy, tokens and audit. Every secret is sealed with envelope encryption: its own AES-256-GCM data key, wrapped by a key-encryption key. Proxy tokens are stored hashed and shown once.

What happens on pv run: the CLI asks the API, the access policy denies STRIPE_SECRET_KEY and allows DATABASE_URL, the allowed value goes into the child process's memory with no .env file written, and the read appears in the audit log
pv run: the policy decides per secret, the value lives only in the process, and the read is logged

The tests: 36 Vitest files for the dashboard, Playwright browser flows that run against mock auth, and Rust tests for the CLI, including checks that credentials never show up in normal output.

What was hard

Being honest about which controls are real. I planned output scrubbing for pv run, so a secret printed by mistake would be masked. A security review showed the limit: the child process already holds the plaintext, so a hostile one can send it anywhere. I kept scrubbing as accidental-leak hygiene and stopped counting it as a boundary. The real boundary is the proxy token, where the provider key stays on the server and the gateway adds it to the request.

Finding the paths that fail open. The same review traced every way a request reaches a secret. It found that a planned kill switch would not have stopped CLI reads, because that path skipped the token evaluator. An IP blocklist would have matched nothing on the gateway, which never passed the client IP. Both fixes went into the build order as must-dos, with a rule that the project guard denies when it can't load its policy.

Where the master key lives. Envelope encryption means a database dump alone is ciphertext. The key-encryption key still comes from server configuration today, which is fine for development and not enough for production. I wrote a blueprint for an internal KMS so that a database-only compromise can't decrypt anything. That's the trade-off I accepted to get the rest working first.

Where it is now

PentaVault is in active development, and there is no public demo yet. A production build is deployed, but it sits behind access protection, so it is not public.

Working today: the dashboard, encrypted and versioned secret storage, environments and configs, proxy tokens, change requests, email verification, TOTP MFA, and CLI login, pv secrets and pv run. Next are the production database rollout, the internal KMS, syncs to CI and hosting platforms, rotation, and SSO.