Kubently CLI v2.0.0 (Node.js)
A modern, beautiful Node.js/TypeScript implementation of the Kubently CLI - your interactive Kubernetes debugging companion.
🚀 Features
✨ Modern User Experience
- Beautiful Terminal UI: Colored output, ASCII art banners, and formatted tables
- Interactive Prompts: User-friendly input
- Real-time Feedback: Loading spinners for all async operations
- Rich Formatting: Clear visual hierarchy with chalk styling
📦 Administrative Commands
- Cluster Management: Add, list, status check, and remove clusters
- Token Generation: Automatic agent token creation and management
🐛 A2A Debug Mode
- Interactive Terminal: Real-time chat interface with the Kubently agent
- Natural Language: Ask questions in plain English
- Session Management: TTL-based sessions with unique IDs
- Command History: Navigate previous commands easily
📋 Requirements
- Node.js 18.0.0 or higher
- npm or yarn
- Access to a Kubently API server
🔧 Installation
git clone <repository-url>
cd nodejs-cli
npm install
npm run build
npm link
🚀 Quick Start
1. Initialize Configuration
kubently init
This will prompt you for:
2. Start Debug Session
kubently debug my-cluster
kubently debug
📝 Configuration
Configuration is stored in ~/.kubently/config.json with restrictive permissions (600).
Environment Variables
export KUBENTLY_API_URL=http://your-api-url
export KUBENTLY_API_KEY=your-api-key
Environment variables take precedence over config file values.
🎨 Debug Mode Commands
When in debug mode, you can use:
help - Show available commands
clear - Clear the screen
history - Show command history
exit or quit - Exit the session
- Natural language queries (e.g., "What pods are failing?")
🛠️ Development
npm run dev
npm test
npm run lint
npm run format
📂 Project Structure
nodejs-cli/
├── src/
│ ├── index.ts # Main entry point
│ ├── commands/ # Command implementations
│ │ ├── init.ts # Configuration setup
│ │ ├── cluster.ts # Cluster management
│ │ ├── exec.ts # Command execution
│ │ └── debug.ts # A2A debug session
│ └── lib/ # Core libraries
│ ├── config.ts # Configuration management
│ ├── adminClient.ts # Admin API client
│ ├── a2aClient.ts # A2A protocol client
│ └── templates.ts # Manifest generators
├── dist/ # Compiled JavaScript
├── package.json # Dependencies and scripts
└── tsconfig.json # TypeScript configuration
🤝 Contributing
Contributions are welcome! Please ensure:
- Code is TypeScript compliant
- All tests pass
- Linting rules are followed
- Documentation is updated
📄 License
APACHE 2.0
🆘 Support
For issues or questions, please file an issue in the repository.
Built with ❤️ using Node.js and TypeScript