clitool
is a command-line interface (CLI) tool written in Go that provides various functionalities organized into "palettes." Currently, it includes commands for performing network-related tasks and retrieving disk usage information.
-
Network Palette:
ping
: Sends a ping request to a specified URL and returns the response status code.
-
Information Palette:
diskusage
: Displays information about disk usage, including total, free, and used space in gigabytes.
To install clitool
, follow these steps:
-
Clone the repository:
git clone https://github.com/hditano/go-clitool.git cd go-clitool
-
Build the project:
Make sure you have Go installed on your system. Then, run:
go build -o clitool
-
Run the tool:
./clitool
Once you have installed clitool
, you can use it from the command line. Here are some examples of how to use the available commands:
-
Ping:
clitool net ping --url <your-url>
Replace
<your-url>
with the URL you want to ping.
-
Disk Usage:
clitool info diskusage
- Add more information commands (e.g., CPU usage, memory usage).
- Create unit tests for all functionalities.
- Add support for additional output formats (e.g., JSON, XML).
- Implement a help command to list all available commands and their usage.
- Implement Azure/Aws Storage solutions
- Implement VMs/EC2 Solution usage
This project utilizes the following Go modules:
- Cobra: For creating the CLI.
- golang.org/x/sys/unix: For retrieving system information, such as disk usage.
Contributions are welcome! If you would like to contribute, please open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.
If you have any questions or comments, feel free to reach out to me at [email protected].