Advanced system administration toolkit with safety-first approach and intelligent automation
SystemAdmin-CLI v2 is a powerful command-line tool designed for system administrators who need reliable, safe, and efficient system management capabilities. Built with TypeScript and featuring a comprehensive safety framework, it provides enterprise-grade system administration tools with intelligent automation.
- π‘οΈ Safety-First Approach: Built-in validation and confirmation for destructive operations
 - π Dry-Run Mode: Test changes before applying them
 - π Cross-Platform: Full support for Linux distributions and macOS
 - π¦ Smart Package Management: Automatic detection of package managers (apt, yum, brew, etc.)
 - βοΈ Service Management: Cross-platform service control (systemctl/launchctl)
 - π§Ή Intelligent Cleanup: Advanced file cleanup with smart filtering
 - π Process Management: Comprehensive process monitoring and control
 - π§ MCP Integration: Model Context Protocol server for extensibility
 - π¨ Beautiful Interface: Colorful, intuitive command-line interface
 
# Clone the repository
git clone https://github.com/systemadmin-cli/systemadmin-cli-v2.git
cd systemadmin-cli-v2
# Install dependencies
npm install
# Build the project
npm run build
# Start using the CLI
./sysadmin-cli --help# Get system information
./sysadmin-cli system info
# Install a package (dry-run by default)
./sysadmin-cli install docker
# Check service status
./sysadmin-cli service status nginx
# List running processes
./sysadmin-cli process list
# Clean up temporary files
./sysadmin-cli cleanup /tmp --dry-runsysadmin-cli system info              # Comprehensive system information
sysadmin-cli system info --hardware   # Hardware details
sysadmin-cli system info --network    # Network configurationsysadmin-cli install <package>        # Install package (dry-run)
sysadmin-cli install <package> --confirm  # Actually install
sysadmin-cli update                   # Update package lists
sysadmin-cli update --upgrade         # Upgrade all packagessysadmin-cli service status <service>    # Check service status
sysadmin-cli service start <service>     # Start service
sysadmin-cli service stop <service>      # Stop service
sysadmin-cli service restart <service>   # Restart service
sysadmin-cli service enable <service>    # Enable service
sysadmin-cli service disable <service>   # Disable servicesysadmin-cli process list             # List running processes
sysadmin-cli process info <pid>       # Get process information
sysadmin-cli process kill <pid>       # Kill process
sysadmin-cli process killall <name>   # Kill processes by namesysadmin-cli cleanup <path>           # Clean directory (dry-run)
sysadmin-cli cleanup <path> --confirm # Actually clean
sysadmin-cli cleanup /tmp --extensions tmp,log,cache
sysadmin-cli cleanup /var/log --older-than 30dsysadmin-cli mcp-server start         # Start MCP server
sysadmin-cli mcp-server stop          # Stop MCP server
sysadmin-cli mcp-server test          # Test MCP server
sysadmin-cli mcp-server list-tools    # List available toolsSystemAdmin-CLI v2 follows a modular architecture with clear separation of concerns:
systemadmin-cli-v2/
βββ packages/
β   βββ core/                 # Core system administration logic
β   β   βββ src/
β   β   β   βββ system/       # System detection and info
β   β   β   βββ safety/       # Safety validation framework
β   β   β   βββ mcp/          # MCP server implementation
β   β   β   βββ tools/        # Core administration tools
β   β   βββ package.json
β   βββ cli/                  # Command-line interface
β   β   βββ src/
β   β   β   βββ commands/     # CLI command implementations
β   β   β   βββ utils/        # CLI utilities
β   β   βββ package.json
β   βββ ui/                   # Optional UI components
βββ docs/                     # Documentation
βββ tests/                    # Test files
βββ package.json
- SystemDetector: Automatic OS and package manager detection
 - SafetyValidator: Pre-execution safety checks and confirmations
 - MCPServer: Model Context Protocol server for tool integration
 - PackageManager: Abstract package management interface
 - ServiceManager: Cross-platform service management
 - ProcessManager: Process monitoring and control
 - FileManager: Safe file operations and cleanup
 
SystemAdmin-CLI v2 prioritizes safety with multiple layers of protection:
- Command risk assessment
 - System state verification
 - Permission checks
 - Resource availability validation
 
- Required for destructive operations
 - Clear explanation of actions
 - Reversibility information
 - Impact assessment
 
- Test operations without making changes
 - Preview of actions to be taken
 - Safety impact analysis
 - Resource usage estimation
 
- Automatic backups before destructive operations
 - Rollback capabilities
 - Recovery instructions
 - State restoration
 
SystemAdmin-CLI v2 can be configured through:
export SYSCLI_SAFETY_LEVEL=high     # Safety level (low|medium|high)
export SYSCLI_DRY_RUN=true          # Enable dry-run by default
export SYSCLI_LOG_LEVEL=info        # Log level (debug|info|warn|error)
export SYSCLI_BACKUP_DIR=/tmp/syscli-backupsCreate ~/.syscli/config.json:
{
  "safety": {
    "level": "high",
    "requireConfirmation": true,
    "dryRunDefault": true
  },
  "logging": {
    "level": "info",
    "file": "~/.syscli/logs/syscli.log"
  },
  "backup": {
    "enabled": true,
    "directory": "~/.syscli/backups",
    "retention": "30d"
  }
}SystemAdmin-CLI v2 includes comprehensive testing:
# Run all tests
npm test
# Run tests with coverage
npm run test:coverage
# Run specific test suite
npm run test:unit
npm run test:integration
npm run test:safety- Unit Tests: Individual component testing
 - Integration Tests: Cross-component functionality
 - Safety Tests: Validation of safety mechanisms
 - System Tests: End-to-end functionality
 - Performance Tests: Resource usage and response times
 
| Platform | Support Level | Package Managers | Service Management | 
|---|---|---|---|
| Ubuntu/Debian | β Full | apt, snap | systemctl | 
| CentOS/RHEL | β Full | yum, dnf | systemctl | 
| Fedora | β Full | dnf | systemctl | 
| Arch Linux | β Full | pacman | systemctl | 
| macOS | β Full | brew | launchctl | 
| Alpine | π Partial | apk | rc-service | 
| Windows | π Planned | choco | sc.exe | 
We welcome contributions! Please see our Contributing Guide for details.
# Clone the repository
git clone https://github.com/systemadmin-cli/systemadmin-cli-v2.git
cd systemadmin-cli-v2
# Install dependencies
npm install
# Build the project
npm run build
# Run tests
npm test
# Start development mode
npm run dev- TypeScript with strict mode
 - ESLint for linting
 - Prettier for formatting
 - Conventional commits
 
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Built with TypeScript
 - Command-line interface powered by Commander.js
 - Beautiful terminal output with Chalk and Boxen
 - MCP integration using @modelcontextprotocol/sdk
 
- π Documentation
 - π Bug Reports
 - π‘ Feature Requests
 - π¬ Discussions