README
¶
Kenv - Advanced Application Management Toolkit
Kenv is a robust command-line application management toolkit designed to streamline the orchestration and monitoring of multiple applications. It offers a comprehensive suite of features for process control, log management, and detailed application diagnostics.
Key Features
- YAML-based configuration for multi-application management
- Process lifecycle control (start, stop, restart)
- Real-time application health monitoring and auto-recovery
- Log streaming capabilities
- Detailed application diagnostics including PID, port allocation, and Nginx configuration
- Cross-platform compatibility (Linux, macOS, Windows)
Installation
Ensure Go 1.16 or later is installed on your system. Install Kenv using:
go get github.com/bagaking/kenv
Configuration
Kenv utilizes a YAML configuration file (kenv.conf.yml) located in the same directory as the Kenv executable. The configuration structure is as follows:
apps:
- name: app1
command: /path/to/app1
- name: app2
command: /path/to/app2
Usage
Kenv provides the following CLI commands:
list: Enumerate all managed applications and their current statusstart <app_name>: Initiate a specific applicationstop <app_name>: Terminate a specific applicationrestart <app_name>: Reinitiate a specific applicationlog <app_name>: Stream the log output of a specific applicationstat <app_name>: Display comprehensive status information for a specific application
Examples
- List all managed applications:
kenv list
- Initiate an application:
kenv start app1
- Terminate an application:
kenv stop app1
Use -f or --force flag to forcefully terminate applications not managed by Kenv.
- Reinitiate an application:
kenv restart app1
Similarly, use -f or --force flag for forceful restart of non-Kenv managed applications.
- Stream application logs:
kenv log app1
- Retrieve detailed application status:
kenv stat app1
Advanced Capabilities
Autonomous Monitoring and Recovery
Kenv implements a watchdog mechanism to monitor all managed applications, automatically attempting to reinitiate them upon unexpected termination.
Cross-Platform Compatibility
Kenv is engineered to support Linux, macOS, and Windows operating systems, providing platform-specific system commands as necessary.
Process State Persistence
Kenv persists process information to process_info.json, enabling state recovery upon Kenv restart.
Contributing
Contributions in the form of code, issue reports, or feature suggestions are welcome. Please adhere to the following protocol:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contact
For inquiries or suggestions, please reach out through the following channels:
- GitHub Repository: https://github.com/khgame/kenv
- Author: bagaking
- Email: kinghand@foxmail.com
We appreciate your interest in Kenv!
Documentation
¶
There is no documentation for this package.