Git Product home page Git Product logo

fabrun's Introduction

FabRun

Disclaimer: FabRun is currently under development and is not ready for production use. Use at your own risk.

FabRun is a simple utility designed to run predefined commands stored in command.md files. Initially created to simplify running long and complex Fabric commands, FabRun now serves as a general-purpose tool for executing any custom commands with shorter, more memorable names.

Folder Structure

FabRun uses a straightforward folder structure to organize your commands. Each folder name corresponds to the command you will use with FabRun. Inside each folder, the command.md file contains the actual command to be executed.

Here is an example of how you can organize your commands:

~/.config/fabrun/commands/
├── git_commit/
│   └── command.md
├── deploy/
│   └── command.md
├── backup/
│   └── command.md
└── diff/
    └── command.md

In this structure:

  • Each folder name (git_commit, deploy, backup, diff) corresponds to the command you will use with FabRun.
  • Inside each folder, the command.md file contains the actual command to be executed.

Purpose

The primary purpose of FabRun is to make it easier to run lengthy and intricate Fabric commands. By storing these commands in a structured way, FabRun allows you to execute them effortlessly from the command line, reducing the need to remember and type out long command sequences. Additionally, FabRun can be used to manage and execute any custom command you need, providing a more convenient way to run your scripts.

Installation

Via Homebrew

  1. Add the tap:
brew tap HTA86/fabrun
  1. Install FabRun:
brew install fabrun
  1. Verify installation:
fabrun --version

Update

Via Homebrew

  1. Update:
brew update

Update Commands

To update the commands from the GitHub repository, use the --update-commands flag:

fabrun --update-commands

Usage

Copy all Commands

cp -r commands/ ~/.config/fabrun/commands/

Listing Available Commands

fabrun --list

Running a Command

fabrun <command_name>

This command runs the command defined in ~/.config/fabrun/commands/diff/command.md.

Create a custom Command

Store your commands in command.md files within folders. The folder name will be used to identify and run the corresponding command.

Example

  1. Create a folder and a command.md file for your command:
mkdir -p ~/.config/fabrun/commands/diff
echo "fabric --stream --pattern create_git_diff_commit" > ~/.config/fabrun/commands/diff/command.md
  1. Run the command using FabRun:
fabrun diff

Develop

Build

# Bygg för macOS på Intel/AMD64
GOOS=darwin GOARCH=amd64 go build -o releases/fabrun-darwin-amd64

# Bygg för macOS på M1 (ARM64)
GOOS=darwin GOARCH=arm64 go build -o releases/fabrun-darwin-arm64

# Bygg för Linux på AMD64
GOOS=linux GOARCH=amd64 go build -o releases/fabrun-linux-amd64

# Bygg för Windows på AMD64
GOOS=windows GOARCH=amd64 go build -o releases/fabrun-windows-amd64.exe

Use build script

Make the script executable and run it:

chmod +x build.sh
./build.sh

fabrun's People

Contributors

hta86 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.