{{tag>tools configuration distribution cli}} {{howhard>1}}
====== esgtools ======

==== Goals ====
esgt is a cli multi tool used internally by eSGR but will work on any standard environment. Please note that some functions (profiles for example) will work best on the eSGR Standard Image 2014 & 2017 & 2020 based in centos 6.9, 7.7 and 8.0 respectively.

=== Options ===
  * maintenance - Update esgtools to the latest version
  * install - Install supported applications (esgtools)
  * filetype - Will try to identify a file type
  * compress - Compress/Uncompress between, Snappy, S2, ZStandard, gzip, zlib, zip, Brotli
  * network - Network Related Tools (Check Internet Access, Monitor DHCP Leases)
  * profiles - Install esg profiles for selected apps (vim, tmux)
  * web - Web Tools (advertising tags, headers, max protocol, site size(experimental))
  * hash - Create file hash (sha1, sha256, sha512, sha3, sha3 384bit, sha3 512bit, blake2s, blake2b, md5)
  * minify - Minify CSS, HTML, JS, JSON, SVG, XML
  * versions - Retrieve version & download link for applications (go, php, nginx, rust)
  * hardware - Retrieve Hardware Information (ram, system, cpu, firmware)
  * debug - Show debug information

== profiles options ==
  * vim - Install the eSG vim profile
  * tmux - Install the eSG tmux profile

== web Options ==
  * size - Will calculate website size
  * headers - Will dump all http headers from a url
  * tags - Will detect tags like Google Analytics and AdSense
  * http - Detect http protocol

== install Options ==
  * tools - Will install esgtools to /usr/local/bin (v0.6.3+)

=== Download & Installation ===
The tool doesn't require any installation just use the following to download it.
<sortable>
^ OS ^ x64 ^ x86 ^ arm ^ arm64 ^ ppc64 ^ ppc64le ^ mips ^ mips64 ^ mipsle ^ mips64le ^
| Linux | [[https://tools.eservices-greece.net/download.php?f=esgt_linux_amd64|Download]] | [[https://tools.eservices-greece.net/download.php?f=esgt_linux_386|Download]] | [[https://tools.eservices-greece.net/download.php?f=esgt_linux_arm|Download]] | [[https://tools.eservices-greece.net/download.php?f=esgt_linux_arm64|Download]] | [[https://tools.eservices-greece.net/download.php?f=esgt_linux_ppc64|Download]] | [[https://tools.eservices-greece.net/download.php?f=esgt_linux_ppc64le|Download]] | [[https://tools.eservices-greece.net/download.php?f=esgt_linux_mips|Download]] | [[https://tools.eservices-greece.net/download.php?f=esgt_linux_mips64|Download]] |  [[https://tools.eservices-greece.net/download.php?f=esgt_linux_mipsle|Download]] | [[https://tools.eservices-greece.net/download.php?f=esgt_linux_mips64le|Download]] |
| Windows |  [[https://tools.eservices-greece.net/download.php?f=esgt_windows_amd64|Download]] | [[https://tools.eservices-greece.net/download.php?f=esgt_windows_386|Download]] | [[https://tools.eservices-greece.net/download.php?f=esgt_windows_arm|Download]] |
| OS X |  [[https://tools.eservices-greece.net/download.php?f=esgt_darwin_amd64|Download]] | [[https://tools.eservices-greece.net/download.php?f=esgt_darwin_386|Download]] |
| FreeBSD | [[https://tools.eservices-greece.net/download.php?f=esgt_freebsd_amd64|Download]] | [[https://tools.eservices-greece.net/download.php?f=esgt_freebsd_386|Download]] |
| Dragonfly |
| NetBSD |
| openBSD |  [[https://tools.eservices-greece.net/download.php?f=esgt_openbsd_amd64|Download]] | [[https://tools.eservices-greece.net/download.php?f=esgt_openbsd_386|Download]] | [[https://tools.eservices-greece.net/download.php?f=esgt_openbsd_arm|Download]] |
| Android |
| Plan 9 |
| Solaris |
</sortable>
You can use curl like this (x64 Linux)
<sxh>curl -L https://tools.eservices-greece.net/download.php?f=esgt_linux_amd64 -o esgt;chmod +x esgt</sxh>

=== Usage Examples ===

== Install profiles ==
<sxh>./esgt profiles vim</sxh>
<sxh>./esgt profiles tmux</sxh>

== File hash ==
<sxh>./esgt hash filename</sxh>

== Webpage Size ==
<sxh>./esgt web size https://eservices-greece.com</sxh>

== Webpage Headers ==
<sxh>./esgt web headers https://eservices-greece.com</sxh>

== Webpage Tags (analytics etc) ==
<sxh>./esgt web tags https://eservices-greece.com</sxh>

== Webpage protocol ==
<sxh>./esgt web http https://eservices-greece.com</sxh>

== Minify File ==
<sxh>./esgt minify inputfilename outputfilename</sxh>

== Update esgtools ==
<sxh>./esgt maintenance -u</sxh>