Skip to content

Latest commit

 

History

History
67 lines (57 loc) · 1.28 KB

README.md

File metadata and controls

67 lines (57 loc) · 1.28 KB

Genie

Store and execute commands based on yaml configuration files.

Installation

Prebuilt binaries

  • Download the binary for your platform from the Github releases page
  • Copy the executable to a location within your PATH (ex: /usr/local/bin)

From Source

The tool is written in Golang. To compile and run the program first install your Golang development environment and run the following commands

go build
mv genie /usr/local/bin

Usage

Genie looks for command.yaml files in your current directory and its children

Create genie.yaml file

genie init

List detected commands

genie

Execute command

genie {command name}

Global genie-commands.yaml file

Genie will load global commands from a .genie-commands.yaml file in your home directory

---
shell: /bin/zsh
commands:
  hello:
    - command: echo "From the home directory!"
    - command: echo done

Example genie.yaml

---
shell: /bin/zsh
commands:
  hello:
    - command: echo "Hello world, how're we today!"
    - command: echo done
  something:
    - command: echo
  test-environment:
    - command: echo It is $ENV before $ENV2
      environment:
        - name: ENV
          value: ITWORKS
        - name: ENV2
          value: ITWORKS2