Skip to content

A set of CLI commands to automate daily repetitive tasks

Notifications You must be signed in to change notification settings

shammishailaj/scli

Repository files navigation

SCLI


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.

A. Direct Go Dependencies (3rd-party only)


  1. Cobra for implementing the CLI interactions
  2. Go-Homedir or detecting and expanding the user's home directory without cgo
  3. Go-Resty as its HTTP client library
  4. Govvv to add version information during its build process
  5. Logrus as its logging library
  6. Dotsql for SQL migrations (not being used currently)
  7. Gopsutil/CPU for CPU information (not being used currently)
  8. Gopsutil/Load for system load information (not being used currently)
  9. Viper for reading configuration files
  10. Times for file times (atime, mtime, ctime, btime)
  11. Go-Chi for HTTP routing
  12. Go-Chi/HttpRate for rate-limiting HTTP requests via Go-Chi
  13. Minify provides minifiers for web-formats - CSS, HTML, JavaScript, JSON, SVG and XML
  14. Gofast provides FastCGI "client" library written purely in go
  15. Fsnotify - provides cross-platform file system notifications for Go.
  16. Cobra Docs - Cobra documentation plugin

B. Requirements


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.

C. 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

D. Included Applications


  • scli CLI and Web server

How to run Webserver

git clone https://github.com/shammishailaj/scli.git
make run

How to build cli

Also read the details for cli in Section C.

git clone https://github.com/shammishailaj/scli.git
make cli

About

A set of CLI commands to automate daily repetitive tasks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published