Skip to content

A versatile command-line tool for automating tasks, executing scripts, and running applications. Simplify your workflow and boost productivity effortlessly.

License

Notifications You must be signed in to change notification settings

GabrielJuliao/godo

Repository files navigation

GODO

A versatile and user-friendly command-line tool designed to streamline your most frequently used actions, ranging from simple system commands to executing custom scripts and running applications. With GODO, you can effortlessly automate repetitive tasks, improve productivity, and simplify your workflow.

Usage

godo [macro name or action] [--godo-<option>] [additional arguments]

Note: [additional arguments] will be appended to the end of the string arguments, defined in the configuration file.

Examples

# Pings google DNS.
godo ping-google

# Calls a script to clear a database.
godo clear-database --db-url "jdbc:oracle:thin:@//localhost:1521/test_db" --db-pass 12345

# List all configuration in the specified file.
godo --godo-config-file /opt/godo/config.yaml list

# Opens config file with the specified editor (nano).
godo --godo-config-editor nano edit

Actions

  • list: List all the macros.
  • edit: Opens the configuration file with the default OS text editor (can be overwritten with options).

Options

  • --godo-config-file: Sets the path for the configuration file.
  • --godo-config-editor: Overrides the default text editor.
  • --godo-config-editor-args: Passes the arguments for the text editor. Must be split by commas (--arg1,value1,arg2).

Environment Variables

  • GODO_CONFIGURATION_FILE Sets the path for the configuration file.
  • GODO_CONFIGURATION_EDITOR Overrides the default text editor.
  • GODO_CONFIGURATION_EDITOR_ARGS Passes the arguments for the text editor. Must be split by commas ("--arg1,value1,arg2").

Configuration File

# Add all of your most used actions here
macros:

  - name: ping-google
    executable: ping
    arguments: 8.8.8.8 -c 4
    description: Ping Google DNS Shell

  - name: ping-google-cmd
    executable: cmd.exe
    arguments: /c ping 8.8.8.8
    description: Ping Google DNS Command Prompt

  - name: ping-google-powershell
    executable: powershell.exe
    arguments: ping 8.8.8.8
    description: Ping Google DNS Powershell

  # Scripts execution
  - name: hello-sh
    executable: bash
    arguments: ./examples/hello.sh godo
    description: Hello from Shell

  - name: hello-cmd
    executable: cmd.exe
    arguments: /c .\examples\hello.bat godo
    description: Hello from Command Prompt

  - name: hello-powershell
    executable: powershell.exe
    arguments: -f ./examples/hello.ps1 godo
    description: Hello from Powershell

  - name: hello-git-bash
    executable: C:/Program Files/Git/bin/bash.exe
    # In order for args to work in Git Bash, they must be quoted
    arguments: -c 'C:/Users/elonmusk/Downloads/examples/hello.sh arg-1 arg-2 arg-3' 
    description: Hello from Git Bash

  - name: interactive-sh
    executable: bash
    arguments: ./examples/interactive.sh
    description: Interactive hello from Shell

  # Other apps execution
  - name: run-spring-app
    executable: java
    arguments: -jar ./examples/demo-0.0.1-SNAPSHOT.jar
    description: Run my Spring Boot Application
  
  - name: risky-action
    executable: echo
    arguments: Hey there! Running `sudo rm -r /*` is like hitting the self-destruct button on your computer!
    isRiskyAction: true
    description: "A one-way ticket to data oblivion!"

How to Build From Source

Prerequisites

Make sure you have the following installed on your machine:

Getting Started

  1. Clone the repository:

    git clone https://github.com/GabrielJuliao/godo.git

Build the Go Application

Windows

To build the Go application on Windows, run the following command in Command Prompt or PowerShell:

go build -o godo.exe

This will create an executable binary with a .exe extension.

macOS and Linux

To build the Go application on macOS or Linux, run the following command in the terminal:

go build -o godo

This will create an executable binary without an extension.

Execute the Go Application

Windows

After building the application, you can execute it on Windows by running:

godo.exe

macOS and Linux

After building the application, you can execute it on macOS or Linux by running:

./godo

Clean Up

If you want to clean up the generated binary, you can run:

go clean

This removes the compiled binary.

Additional Notes

About

A versatile command-line tool for automating tasks, executing scripts, and running applications. Simplify your workflow and boost productivity effortlessly.

Resources

License

Stars

Watchers

Forks

Packages

No packages published