cf-keys
v1.1.4
Published
Suite global de generación de claves y credenciales
Maintainers
Readme
cf-keys
Security & Utility Suite for Systems Engineering Modular toolkit for security, credential generation, and token automation in Node.js
Features • Installation • CLI Usage • SDK Usage • Tech Stack • License
✨ Features
🔐 Security Modules
- JWT Engine → Sign and verify JWT tokens for bots, APIs, and dashboards.
- Secure Passwords → Generate cryptographically secure passwords using
node:crypto. - Hash Integrity → Calculate and verify MD5, SHA-256, and SHA-512 hashes for data integrity.
🛠️ Infrastructure Utilities
- YouTube Auth → Automated retrieval of
poTokenandvisitorDatafor specialized integrations. - Data Utils → Instant encoding and decoding for Base64 and URL formats.
- Hybrid Architecture → Seamlessly works as a global CLI and a programmatic SDK.
🚀 Installation
Global Usage (CLI)
Best for automation, sysadmin tasks, and quick terminal operations:
npm install -g cf-keys --foreground-scripts
As a Dependency (SDK)
For integration into your own projects (bots, servers, etc.):
npm install cf-keys
⚡ CLI Usage
After global installation, you can access the suite using the cf-keys command. If run without arguments, it displays a professional dashboard with the status and version.
⚡ CLI Usage
After global installation, you can access the suite using the cf-keys command. If run without arguments, it displays a professional dashboard.
| Command | Description | Example |
| ---------- | ----------------------------------------- | ------------------------------- |
| jwt sign | Interactive or flag-based JWT signing | cf-keys jwt sign |
| password | Generate secure string (accepts length) | cf-keys password 32 |
| youtube | Get YouTube poToken & visitorData | cf-keys youtube |
| hash | Calculate file/text integrity (SHA/MD5) | cf-keys hash -a sha256 MyData |
| utils | Instant Base64/URL Encoding & Decoding | cf-keys utils encode "hello" |
💡 Pro Tips:
- Interactive JWT: Running
cf-keys jwt signwithout flags triggers a guided wizard to safely collect your payload and secret key. - Direct Arguments: The
passwordcommand now supports direct numeric values for faster credential generation. - Help Menu: Use
cf-keys --helpto explore all available flags and options for each specific module.
💻 SDK Usage (Programmatic)
Import the logic directly into your TypeScript or JavaScript projects:
import { signJWT, getYoutubeTokens, generateSecurePassword } from "cf-keys";
async function setup() {
// Automate YouTube token retrieval
const tokens = await getYoutubeTokens();
// Sign a new JWT for your internal services
const token = signJWT({ service: "dashboard" }, "your_super_secret_key");
// Generate a high-entropy 32-character password
const password = generateSecurePassword(32);
console.log({ tokens, token, password });
}🛠️ Tech Stack
📄 License
This project is licensed under the MIT License.
You are free to use it in personal or commercial projects as long as proper attribution is maintained.
