Giter Site home page Giter Site logo

webdev23 / phi Goto Github PK

View Code? Open in Web Editor NEW
9.0 4.0 4.0 19 KB

Shell script installer, updater, and dependency manager

Home Page: https://github.com/webdev23/phi

License: MIT License

PHP 100.00%
php-cli shell-script dependency-manager installer remote-execution remote-admin-tool linux-app bash-script linux dependency-parser

phi's Introduction

φ | php helper installer

Install shell scripts as system apps, install dependencies, and from your own repository.

Made to fast deploy and update shell scripts from a remote index (yours!).

This is alpha quality software for aware peoples.

Currently, it suit perfectly my needs, but feel free to participate or give a star if you see usefulness.

It is tested in debian base, ubuntu, mint, raspbian.

Should work on mac os with a little patch (using .bash_profiles instead of .bashrc, please report).

Usage: phi [list[install|local|update] [url|path]
---------------------------------------------------
Install remote shell scripts (sh,bash,php,csh,python,perl..) as linux applications

Parse remote directories or file to find shell script and install them.

Will configure the shell and save big time to create launchers and aliases. 

[list]     Parse script to display infos
            Parse remote index defined in script, or the url given as 2nd argument
            
[install]  Get all remote scripts from index or url given as 2nd argument.
            Create launcher.desktop for each scripts
            Create aliases in .bashrc
            Create shortcuts in the gnome programming submenu
            
[update]   Update/replace local scripts by all scripts from remote index 
            or url given as 2nd argument
            
[local]    Install local script given as 2nd argument (local path)

Any script can after install be started by:

  • Clicking his icon in the gnome programming menu
  • Typing his name in terminal
  • Call his name from other shell scripts

When done, icons can be changed as regular, scripts can be uninstalled by right click from the menu.

Keyboards shortcuts commands will directly works with no paths headaches.

We can then create scripts without caring of paths, they will work on other machines when deployed with phi.

How are parsed scripts:

I use scripts without extensions, i recommend you to do so, and this is how this program is written.

Scripts are valids only if they are extensionless.
Anything without extensions won't download at all.

#! Script: are valids only when a shebang #! match the document two first chars

#  Comments: lines begining with a # will be displayed as informations

#> Dependencies: lines with #> will be silently installed via apt.
    Specify program names separated by spaces
    Example, this line anywhere on a script
    #> lolcat
    Will install lolcat with apt, 
    just like: sudo apt install lolcat
 

The directory path is a hidden folder .phi in home.

Files in this folder will be erased while updating.

Editing is best done from remote, then to update changes locally: phi update

Installation:

Php is needed on the system: sudo apt install php

Installation of phi alone from github source:

php <(curl https://webdev23.github.io/phi/phi) install https://webdev23.github.io/phi/phi

Yes, to say it differently, this command will install phi from himself.

You can as well download the archive and run ./phi

Examples of uses:

Launch phi without installing

php <(curl https://webdev23.github.io/phi/phi) 

Check infos from a remote script url:

phi list https://webdev23.github.io/gif/gif

List scripts in the defined main remote index:

phi list

Install all scripts from the main defined index: You will find somes helloworld demo (https://ponyhacks.com/open/cli/)

phi install

Parse and install all scripts including those in remote subfolders (caution..)

phi install URL

Update all scripts from the main remote index whithout checking local installs

phi update

Install local script:

phi local LOCALPATH

(Advanced:) Pipe install phi and all scripts from remote index

php <(curl https://webdev23.github.io/phi/phi) install 

(Advanced:) pipe install from another remote script (!)

There is no needs of sudo when piping, but for apt scripts depedencies, if required.

This is golden if you got it.. enjoy

php <(curl https://webdev23.github.io/phi/phi) install https://webdev23.github.io/gif/gif

(Advanced:) Check a website to find shell scripts, including those in subfolders.

 phi list URL

TODO

Add #@ parsing to update scripts from a fixed url.

Add #^ parsing to define an icon from script.

Add #? parsing to define the launcher to run as super user.

Ability to update remote from local.

phi's People

Contributors

webdev23 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.