Skip to content

Powerful commands manager that simplifies your scripts, and your life

License

Notifications You must be signed in to change notification settings

mogharsallah/gom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleCI Go Report Card Beta

Got a question? / Want to collaborate? Feel free to open an issue or reach me at gmedhoover@gmail.com

Introduction

gom is a Powerful commands manager that simplifies complex scripts execution by defining aliases and execution policies. gom reads your commands from the YAML config file, and execute the passed command alias.

Usage

asciicast

Create a config file

Create a configuration file named gom.yaml and add your commands. More information in config file

Launch your commands!

Just type : $ gom [option] command [command_option...]

For more details check the help manual : $ gom -h

Install

If you have GO installed you just need to type:
$ go get github.com/medhoover/gom


For others, since this project is still in beta, you would have to do a manual install. Just download the binary file from release page,
rename it, and place it in one of your path folders.

Config file

By default, gom looks for gom.yaml file in your current directory. But you can manually set the file location by (-f, --file) flags:

$ gom -f path/to/file.yaml ...

The config file follows the YAML syntax, and contains the name and the commands properties:

name: gom
commands:
# To execute a command, use its path name
# Example: $ gom install
  install:
    - go fmt github.com/medhoover/gom
    - go install github.com/medhoover/gom
  greet:
    morning: echo $GREET_M $USER !
    evening: echo $GREET_E $USER !
# Use -e flag to set an environment
# Example: $ gom -e fr greet morning
env:
  fr:
    GREET_M: Bonjour
    GREET_E: Bonne nuit
  en:
    GREET_M: Good morning
    GREET_E: Good Evening

A command have a string value, which gets executed using its YAML path: $ gom greet evening

An array of strings is considered as a command list, which gets executed sequently: $ gom install

Define environment variables within the 'env' property. Set the defined variables using the (-e , --environment) flags: $ gom -e en greet morning

TODO

  • Add unit tests
  • Add config file initialisation
  • Add support for parallel execution
  • Simplify installation

Questions and issues

Please feel free to share your questions and issues in here, I will be happy to help.

Collaborate

Please do 😃.

About

Powerful commands manager that simplifies your scripts, and your life

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages