SCLI is a collection of CLI commands to automate daily repetitive tasks.
The boilerplate for this project has been generated using goboiler which is a fork of go-wagen.
The generated structure has been further modified as per the Golang Standards Project Layout alongwith further customizations to modularize the code and add support for HTML templating and scratch docker image.
- Cobra for implementing the CLI interactions
- Go-Homedir or detecting and expanding the user's home directory without cgo
- Go-Resty as its HTTP client library
- Govvv to add version information during its build process
- Logrus as its logging library
- Dotsql for SQL migrations (not being used currently)
- Gopsutil/CPU for CPU information (not being used currently)
- Gopsutil/Load for system load information (not being used currently)
- Viper for reading configuration files
- Times for file times (atime, mtime, ctime, btime)
- Go-Chi for HTTP routing
- Go-Chi/HttpRate for rate-limiting HTTP requests via Go-Chi
- Minify provides minifiers for web-formats -
CSS
,HTML
,JavaScript
,JSON
,SVG
andXML
- Gofast provides FastCGI "client" library written purely in go
- Fsnotify - provides cross-platform file system notifications for Go.
- Cobra Docs - Cobra documentation plugin
Requirements Grid | |
---|---|
Software | Version |
Docker | >= 19.03.13 |
--- | --- |
Docker Compose | >= 2.0.0 |
Ubuntu build-essential package |
The default app can be run/built using the following make
targets.
run
- Builds and runs the default app using the docker
image shammishailaj/gobuilder:0.0.6
build
- Builds the project using the docker
image shammishailaj/gobuilder:0.0.6
first and then copies all the required project files into a scratch
image. The resultant is a docker image and not an executable.
cli
- Builds the executable which is extracted to the bin/
directory. cli parameters os=<os-name> arch=<arch-name>
. The accepted values can be seen by go tool dist list
- scli CLI and Web server
git clone https://github.com/shammishailaj/scli.git
make run
Also read the details for cli
in Section C.
git clone https://github.com/shammishailaj/scli.git
make cli