Giter VIP home page Giter VIP logo

ovm's Introduction

OVM : my simple Bash functions loader

ovm stands for overmind.

In some universe (like Starcraft), the overmind is the master controlling everything.

This project is a Bash functions loader that handles all my Bash functions wrapper.

Why ?

This project aims to be simple.

It enables to:

  • Centralize scripts execution (regardless their locations)
  • Create scripts shortcuts
  • Loading only needed Bash functions
  • Have a lightweight .bashrc
  • Separate professionnal workflow with personnal workflow
  • Organize your workspace
  • ...

Setup

Steps to perform:

  • git clone this repository
  • define to your .bashrc the variable OVM_PATH and OVM_MODULES_PATH (for custom modules)
  • source the global ovm bash function
$ cat ~/.bashrc
...
export OVM_PATH="$HOME/perso/git/ovm"
export OVM_MODULES_PATH="$OVM_PATH/modules:$HOME/work/git/ovm-modules"
source $OVM_PATH/ovm
...

By default, if no OVM_MODULES_PATH environment variable is defined, the value will be export OVM_MODULES_PATH="$OVM_PATH/modules".

If you don't want to use the default modules, you can just do OVM_MODULES_PATH="$HOME/my/custom/ovm-modules".

Command

Help

OVM
===

This project is a dynamic Bash functions loader.

Commands
--------
ovm <command>
    config    show environment variables defined/used in modules
    env       show loaded OVM environment variables
    info      show module information in README.md (if available)
    load      load all functions in a module
    ls        list available modules and functions

Listing modules

$ ovm ls

~/perso/git/ovm/modules
fsalias
  go
  save
tor
  vt
  vtchecksum

Loading a module

$ ovm load tor
$ tor-vt<tab>
tor-vt          tor-vtchecksum

Info about a module

 ovm info tor

   [ tor ]                                                                                          
                                                                                                    
  This module contains different scripts needing a Tor support.                                     
                                                                                                    
  ## Requirements:                                                                                  
                                                                                                    
  • Virus Total API key                                                                             
  • Proxychains installed and configured                                                            
  • Tor installed and configured                                                                    
                                                                                                    
  ## tor-vt                                                                                         
                                                                                                    
  Compute a file checksum and query VT API via curl (using tor)                                     
                                                                                                    
  The scan results can be found in  /tmp/torvt                                                      
                                                                                                    
    $ tor-vt <sample>                                                                               
                                                                                                    
  ## tor-vtchecksum                                                                                 
                                                                                                    
  Query VT API via curl (using tor) based on a SHA256 file checksum                                 
                                                                                                    
  The scan results can be found in  /tmp/torvt                                                      
                                                                                                    
    $ tor-vtchecksum <SHA256>                                                                       

Modules

Directory structure

└── modules
    └── fsalias
        ├── functions
        │   ├── go
        │   └── save
        ├── loader
        └── README.md

A module is a directory (for example here named fsalias) containing a:

  • functions directory with Bash functions to load
  • loader file defining which functions to load
  • README.md file describing module features (aka module manual)

Also

Functions named like .disabled will not be loaded. By doing ovm ls, you will see them in red.

License

ovm is available under the Beerware license.

If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.

ovm's People

Contributors

bib0x avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

jouty

ovm's Issues

Nixos compatibility issue

Some binaries' path have been harcoded, but due to the different nature of Nixos, it does not work.

➜ ovm info postgres
bash: /bin/cat: No such file or directory

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.