zetools

command module
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2022 License: BSD-3-Clause Imports: 11 Imported by: 0

README

Open Source codecov Golang Go Report Card CodeQL

ZETools

Unified Extensible Command line tools for common tasks - A plugin based CLI toolset that allows adding functionality you need. Create single standalone binaries that include common features that can run on multiple platforms.

Using Docker

docker run -it ghcr.io/tejzpr/zetools:main zetools -h

Using standalone CLI

Download a release, extract the archive and run

zetools -h

Contributing

Follow the below steps to contribute a command plugin

  1. Fork the Hello Git repo and implement the

commands/Command interface 2. call commands.RegisterCommand

function in init() function

Example:

func init() {
	commands.RegisterCommand(HelloCommandName, &helloCommand{}, nil)
}
  1. Add a plugin entry into Zetools -> main.go using "_" import, update Readme.md with plugin features and create a PR

Available Commands

base64

Usage
zetools base64 <encode|decode> string

decode [string]

  • Decode a Base64 encoded string.

encode [string]

  • Base64 Encode a string.

hmac

Usage
Hash a string
zetools hmac <sha256|sha512> -text <string> -key <your-key>
Hash a file
zetools hmac <sha256|sha512> -filename <string> -key <your-key>

sha256

  • Generate a SHA256 hash.

sha512

  • Generate a SHA512 hash.

checkPort

Usage
Check if a port is in use
zetools checkPort --port 8080 --host localhost

ping

Usage
Ping a remote server
zetools ping --host www.google.com

ls

Usage
Lists the contents of a directory
zetools ls -bs M -p ../

tail

Usage
Tails a file
zetools tail -f test.log -fw true

cat

Usage
Cat a file
zetools cat file.txt

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL