sys-info-cli is a powerful command-line interface tool for retrieving and displaying system information on your computer. It provides detailed statistics about CPU, RAM, disk usage, processes, and more.
To install sys-info-cli, follow these steps:
- Ensure you have Go 1.23.1 or later installed on your system.
- Clone the repository:
README.md git clone https://github.com/kasyap1234/sys-info-cli.git
- Navigate to the project directory:
cd sys-info-cli
- Build the project:
go build -o sysinfo
- Move the binary to a directory in your PATH:
sudo mv ./sysinfo /usr/local/bin/
After installation, you can use sys-info-cli by running the sysinfo
command followed by a subcommand:
sysinfo [command]
sys-info-cli supports the following commands:
cpu
: Display CPU statistics and informationram
: Show RAM usage statisticsdisk
: List disk partitions and their detailsprocessList
: Display information about running processesList Pids
: Show all process IDs currently running on the systemExistsPid
: Check if a process with a given PID exists
To get CPU statistics:
sysinfo cpu
This command displays CPU usage percentage and detailed information about each CPU core.
To get RAM statistics:
sysinfo ram
This command shows total RAM, used RAM, free RAM, and usage percentage.
To get disk partition information:
sysinfo disk
This command lists all disk partitions with their device names, mount points, file system types, and mount options.
To get a list of running processes:
sysinfo processList
This command displays information about all running processes, including PID, name, status, CPU usage, and memory usage.
To list all running process IDs:
sysinfo List Pids
To check if a specific PID exists:
sysinfo ExistsPid [PID]
Replace [PID]
with the process ID you want to check.
sys-info-cli uses a configuration file located at $HOME/.sysinfo.yaml
by default. You can specify a different configuration file using the --config
flag:
sysinfo --config /path/to/config.yaml [command]
Contributions to sys-info-cli are welcome! Please follow these steps to contribute:
- Fork the repository
- Create a new branch for your feature or bug fix
- Make your changes and commit them with descriptive commit messages
- Push your changes to your fork
- Submit a pull request to the main repository