Expand description
§herolib-os
Unified system utilities for OS interaction, process management, git operations, network operations, and SSH.
§Modules
os: Operating system interaction utilities (filesystem, downloads, packages, platform detection)process: Cross-platform process management and command executiongit: Git repository management and operationsnet: Network connectivity utilities (TCP, HTTP)ssh: SSH connections, file transfers, key management
For installation utilities, see the separate herolib-installers package.
For virtualization, containerization, and Kubernetes tools, see the separate herolib-virt package.
§Features
rhai(default): Enable Rhai scripting support for all moduleskubernetes: Enable Kubernetes management functionalityfull: Enable all features
§Example
use herolib_os::{os, process, git, net, ssh};
// Use OS utilities
let exists = os::exist("/tmp/myfile.txt");
// Run a command
let result = process::run_command("echo hello");
// Work with git repositories
let tree = git::GitTree::new("/path/to/repos");
// Check network connectivity
let is_open = net::tcp::TcpConnector::new().check_port_by_name("google.com", 443);
// SSH connection
let conn = ssh::SshConnection::builder()
.host("example.com")
.user("ubuntu")
.build();Modules§
- git
- Git repository management and operations.
- net
- Network connectivity and communication utilities.
- os
- Operating system utilities and abstractions.
- process
- SAL Process Package
- profiling
- System Profiling Module
- rhai
- Rhai integration for the OS System package
- rsync
- Rsync module for file synchronization.
- ssh
- SSH operations module.