{"_id":"@cyberwhales/access-keys","_rev":"2-2b7230e22a0c6bac8e093edb2b7b42fb","name":"@cyberwhales/access-keys","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@cyberwhales/access-keys","version":"1.0.0","keywords":["cli","api","keys","access","typescript","yaml","temporary"],"author":{"name":"CyberWhales Team"},"license":"MIT","_id":"@cyberwhales/access-keys@1.0.0","maintainers":[{"name":"cyberwhales","email":"idgidk@proton.me"}],"bin":{"access-keys":"bin/access-keys"},"dist":{"shasum":"6934b61224fb4bb300c7174c3777caf7bd228fd4","tarball":"https://registry.npmjs.org/@cyberwhales/access-keys/-/access-keys-1.0.0.tgz","fileCount":27,"integrity":"sha512-Hr3wSpwhRdo2cZCWgIgLskBE481BH/L/d0V21mJ82seZkhrpFtCXqeoEzDS/EuVolIf/vI24d18o4Ij9aNsJlw==","signatures":[{"sig":"MEQCIBARUlECcywPlouMwOfJaa48DlOeJ7G3UX5l+cuGVByjAiBQuuARzXxmi5TZk6hIiSycVSP7HG0WKutahf187ZFEyQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":29583},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=16.0.0"},"scripts":{"dev":"ts-node src/index.ts","build":"tsc","clean":"rm -rf dist","start":"node dist/index.js","prebuild":"npm run clean"},"_npmUser":{"name":"cyberwhales","actor":{"name":"cyberwhales","type":"user","email":"idgidk@proton.me"},"email":"idgidk@proton.me"},"_npmVersion":"11.3.0","description":"CLI tool for generating temporary API access keys using YAML configuration","directories":{},"_nodeVersion":"24.1.0","dependencies":{"ora":"^8.2.0","axios":"^1.10.0","chalk":"^5.4.1","js-yaml":"^4.1.0","commander":"^14.0.0","clipboardy":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"ts-node":"^10.9.2","typescript":"^5.8.3","@types/node":"^24.0.7","@types/js-yaml":"^4.0.9"},"_npmOperationalInternal":{"tmp":"tmp/access-keys_1.0.0_1751233445563_0.33667238581498027","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@cyberwhales/access-keys","version":"1.0.1","description":"CLI tool for generating temporary API access keys using YAML configuration","main":"dist/index.js","bin":{"access-keys":"bin/access-keys"},"scripts":{"build":"tsc","dev":"ts-node src/index.ts","start":"node dist/index.js","clean":"rm -rf dist","prebuild":"npm run clean"},"keywords":["cli","api","keys","access","typescript","yaml","temporary"],"author":{"name":"CyberWhales Team"},"license":"MIT","type":"module","engines":{"node":">=16.0.0"},"devDependencies":{"@types/js-yaml":"^4.0.9","@types/node":"^24.0.7","ts-node":"^10.9.2","typescript":"^5.8.3"},"dependencies":{"axios":"^1.10.0","chalk":"^5.4.1","clipboardy":"^4.0.0","commander":"^14.0.0","js-yaml":"^4.1.0","ora":"^8.2.0"},"_id":"@cyberwhales/access-keys@1.0.1","types":"./dist/index.d.ts","_nodeVersion":"24.1.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-pxm0T3dIdCIacFmhzi32aa5H25E8Yrg4K95QpAn0GA9i/ElhGpMokFwTBWoOkRxJ/QxauxpQATjS+q+7tjPSsg==","shasum":"039291bc3e825054e29cd20e02ba9e7846ad4b92","tarball":"https://registry.npmjs.org/@cyberwhales/access-keys/-/access-keys-1.0.1.tgz","fileCount":27,"unpackedSize":29581,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCx6HtRjLWvdZxnMo/j95Pa/pA/HJXGNwaYkiC8AG9klgIgfuM4lNQl3cA4FXflIZlGLTbyqGSklaDsSMiaRR1w1tI="}]},"_npmUser":{"name":"cyberwhales","email":"idgidk@proton.me","actor":{"name":"cyberwhales","email":"idgidk@proton.me","type":"user"}},"directories":{},"maintainers":[{"name":"cyberwhales","email":"idgidk@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/access-keys_1.0.1_1751233948340_0.9631074942698661"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-29T21:44:05.480Z","modified":"2025-06-29T21:52:28.729Z","1.0.0":"2025-06-29T21:44:05.756Z","1.0.1":"2025-06-29T21:52:28.531Z"},"author":{"name":"CyberWhales Team"},"license":"MIT","keywords":["cli","api","keys","access","typescript","yaml","temporary"],"description":"CLI tool for generating temporary API access keys using YAML configuration","maintainers":[{"name":"cyberwhales","email":"idgidk@proton.me"}],"readme":"# 🔑 Access Keys CLI\n\nA beautiful and powerful CLI tool for generating temporary API access keys using YAML configuration.\n\n[![npm version](https://badge.fury.io/js/%40cyberwhales%2Faccess-keys.svg)](https://badge.fury.io/js/%40cyberwhales%2Faccess-keys)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## ✨ Features\n\n- 🚀 **Simple Configuration** - Use YAML file for API settings\n- 🎨 **Beautiful Output** - Colorful CLI with spinners and emojis\n- 📋 **Auto Copy** - Automatically copy keys to clipboard\n- 🔒 **Secure** - No hardcoded secrets in your code\n- 📊 **JSON Output** - Machine-readable output for automation\n- ⚡ **Fast** - Built with TypeScript for optimal performance\n\n## 🚀 Quick Start\n\n### Installation\n\n```bash\n# Global installation\nnpm install -g @cyberwhales/access-keys\n\n# Or with yarn\nyarn global add @cyberwhales/access-keys\n```\n\n### Configuration\n\nCreate `authorize-key.yml` file in your project root:\n\n```yaml\napi:\n  base_url: \"https://api.example.com\"\n  dev_secret: \"your_developer_secret_here\"\n```\n\n### Usage\n\n```bash\n# Generate a new temporary key\naccess-keys\n\n# Generate and copy to clipboard\naccess-keys --copy\n\n# Output in JSON format\naccess-keys --json\n\n# Combine options\naccess-keys --copy --json\n```\n\n## 📖 Examples\n\n### Basic Usage\n\n```bash\n$ access-keys\n✅ Generating temporary API key...\n✅ Temporary API key generated successfully!\n\nYour temporary API key:\n   tk_abc123def456ghi789jkl012mno345pqr678stu901vwx234yz\n\nExpires in: 24 hours\nExpires at: 12/25/2024, 2:30:45 PM\n\nUsage:\n   curl -H \"Authorization: Bearer tk_abc123def456ghi789jkl012mno345pqr678stu901vwx234yz\" <API_URL>\n\nEnvironment variable:\n   export TEMP_API_KEY=\"tk_abc123def456ghi789jkl012mno345pqr678stu901vwx234yz\"\n```\n\n### With Auto Copy\n\n```bash\n$ access-keys --copy\n✅ Generating temporary API key...\n✅ Temporary API key generated successfully!\n✅ Key copied to clipboard!\n\nYour temporary API key:\n   tk_abc123def456ghi789jkl012mno345pqr678stu901vwx234yz\n```\n\n### JSON Output\n\n```bash\n$ access-keys --json\n{\n  \"temp_key\": \"tk_abc123def456ghi789jkl012mno345pqr678stu901vwx234yz\",\n  \"expires_in\": 86400,\n  \"expires_at\": \"2024-12-25T14:30:45.123Z\"\n}\n```\n\n## ⚙️ Configuration\n\n### YAML File Structure\n\n```yaml\napi:\n  base_url: \"https://api.example.com\"    # Your API base URL\n  dev_secret: \"your_developer_secret\"    # Your developer secret key\n```\n\n### Environment Variables\n\nYou can also use environment variables to override YAML settings:\n\n```bash\nexport API_BASE_URL=\"https://api.example.com\"\nexport DEV_SECRET=\"your_developer_secret\"\n```\n\n## 🛠️ Development\n\n### Prerequisites\n\n- Node.js >= 16.0.0\n- npm or yarn\n\n### Setup\n\n```bash\n# Clone the repository\ngit clone <repository-url>\ncd access-keys-cli\n\n# Install dependencies\nnpm install\n\n# Build the project\nnpm run build\n\n# Run in development mode\nnpm run dev\n```\n\n### Scripts\n\n- `npm run build` - Build the TypeScript project\n- `npm run dev` - Run in development mode\n- `npm run clean` - Clean build directory\n- `npm start` - Run built version\n\n## 📁 Project Structure\n\n```\naccess-keys-cli/\n├── src/\n│   ├── index.ts              # CLI entry point\n│   ├── commands/\n│   │   └── generate.ts       # Generate command\n│   ├── utils/\n│   │   ├── api.ts            # API functions\n│   │   ├── config.ts         # Configuration loader\n│   │   └── logger.ts         # Logging utilities\n│   └── types/\n│       └── index.ts          # TypeScript types\n├── bin/\n│   └── access-keys           # Executable\n├── authorize-key.yml         # Configuration file\n├── package.json\n└── README.md\n```\n\n## 🔧 API Endpoints\n\nThe CLI expects the following API endpoints:\n\n- `POST /temp-keys/generate` - Generate temporary key\n- `GET /temp-keys/info/{key}` - Get key information\n- `POST /temp-keys/revoke` - Revoke key\n- `GET /temp-keys/stats` - Get statistics\n\n## 🐛 Error Handling\n\nThe CLI provides detailed error messages for common issues:\n\n- **401 Unauthorized** - Invalid developer secret\n- **403 Forbidden** - Insufficient permissions\n- **404 Not Found** - API endpoint not found\n- **429 Rate Limited** - Too many requests\n- **500 Server Error** - API server error\n- **Network Error** - Connection issues\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 📞 Support\n\nIf you encounter any issues or have questions:\n\n- Create an issue on GitHub\n- Check the error messages for troubleshooting tips\n- Ensure your `authorize-key.yml` file is properly configured\n\n---\n\nMade with ❤️ by CyberWhales Team ","readmeFilename":"README.md"}