@customkeys/node
v1.0.0
Published
Official Node.js/TypeScript SDK for CustomKeys secrets management
Maintainers
Readme
@customkeys/node
Official Node.js/TypeScript SDK for CustomKeys secrets management.
Install
npm install @customkeys/nodeOptional WebSocket support:
npm install wsQuick Start
import { CustomKeysClient } from '@customkeys/node';
const client = new CustomKeysClient({
token: process.env.CUSTOMKEYS_TOKEN!,
env: process.env.CUSTOMKEYS_ENV_ID!,
});
await client.ready();
const dbUrl = await client.get('DATABASE_URL');
const all = await client.getAll();
// On shutdown
client.destroy();Next.js Usage
Works in API routes, getServerSideProps, middleware, and server components.
Important: Server-side only. Never expose your token to the client bundle.
Documentation
Full docs at customkeys.superxepic.dev/docs/sdk
Security
- HTTPS enforced in production
- Token sanitization (rejects control chars)
- Response body size limits (10 MB)
- Content-Type validation
- Memory zeroing on destroy()
- No secrets written to disk
License
MIT
